Comments (1)
-
During an attempt to translate RTS GMLC data into SpineOpt, I found myself faced with the problem of having a tool to do what is described above. To try and solve this problem, I tried to build the beginnings of a tool to allow such database modifications. This is by no means a tool that aims to become the future data transformer. However, it can give an idea of the useful functionalities in practice.
-
First of all, I created an initial tool (cf. the Spine-Toolbox project RTS_To_SpineOpt_Basis), enabling systematic operations on parameters: renaming, multiplying by a constant factor, and between parameters on a SpineOpt database: creation of a parameter equal to the sum of two others, multiplication, division, maximum between two parameters, etc. In an Excel file, which acts as a user interface, you enter the name of the parameters you want to create or modify, the parameters you are using and then the operation you want to perform on these parameters. The python tool in Spine-Toolbox evaluates these different expressions in the Excel file, performs the operations on the specified input database, and creates the output database. In this way, all the mathematical operations of python (and numpy) can easily be performed on parameters in a SpineOpt database.
-
However, these operations are performed each time on all the values of the specified parameters. Translating RTS into a SpineOpt format database also required the ability to partially filter/select the input data, for example selecting parameters corresponding only to certain objects (i.e. selecting a parameter according to the value of another parameter), and to perform operations on the different values of the same parameter: maximum of the values taken by this parameter, etc. To do this I added a 'Filters and column operations' section to the previous workflow, upstream of the operations between/among the parameters described above (see the Spine-Toolbox RTS_To_SpineOpt_with_filters project).
-
However, the tool in question was very limited. Firstly, it used an Excel file as the user interface, which is undesirable. It also involved string evaluation operations in the code, which was not very practical, not very clean, and could lead to a large number of errors (typically this system was not at all resilient to the slightest typo). Finally, and most importantly, the tool didn't allow us to perform all the operations we would have liked, and which were necessary to translate the database we were trying to translate. In fact, we would have liked to be able to perform all the basic operations on databases: unions, intersections, etc. (all the operations described above). We therefore had to make a real decision about how to go about it (recode all the possible operations in SQL in a dedicated tool, use database management modules in Python or another language, etc.). Finally, the workflow in two distinct parts (essentially: selections, then operations) was not practical.
-
In conclusion, this attempt to translate the RTS database (for which you can find the codes here) is an example that shows the importance of such a translation tool, its necessary versatility - it must be capable of performing all the basic operations that can be performed in SQL - and the importance of having a single tool with a dedicated user interface.
from spine-toolbox.
Related Issues (20)
- Toolbox silent exit when refreshing DB
- Activating and deactivating scenario filters in db breaks graph view
- QSpinBoxes are unusable on Win11 HOT 1
- Default Python on bundled app should point to the embedded Python HOT 1
- Ship a Python kernel with the bundled app HOT 1
- Entity tree clears when adding new entity
- Spine-engine update fails in subprocess HOT 12
- Error on commit after removing alternative from scenario
- Importer does not import metadata
- Results database does not show parameter values HOT 1
- Importer specification with individual cells
- Disappearing importer specifications
- Dock widgets not visisible HOT 9
- Jupyter Consoles do not work in the bundled app HOT 1
- Traceback when entity item is selected and imported with purge
- Traceback when stopping tool execution
- Support numpy 2.0
- Get rid of all hamburger menus HOT 1
- Clear all filters doesn't reset checked state of items in dialog
- Spine-Toolbox-win-0.9.0.dev5+g64a369a5.zip (2024-06-18) broken HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spine-toolbox.