{"id":336960,"name":"TIMES MIRO App","description":"An open source platform primarily intended to promote the dissemination and use of existing TIMES models.","url":"https://github.com/gams-dev/times_miro","last_synced_at":"2026-05-01T22:30:12.722Z","repository":{"id":42125682,"uuid":"270993652","full_name":"GAMS-dev/TIMES_MIRO","owner":"GAMS-dev","description":"MIRO app for the IEA-ETSAP TIMES model","archived":false,"fork":false,"pushed_at":"2024-07-29T09:55:15.000Z","size":414755,"stargazers_count":19,"open_issues_count":6,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-04-22T18:03:02.099Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GAMS-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-06-09T12:14:50.000Z","updated_at":"2025-12-05T15:13:46.000Z","dependencies_parsed_at":"2025-04-14T12:29:58.209Z","dependency_job_id":null,"html_url":"https://github.com/GAMS-dev/TIMES_MIRO","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/GAMS-dev/TIMES_MIRO","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GAMS-dev%2FTIMES_MIRO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GAMS-dev%2FTIMES_MIRO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GAMS-dev%2FTIMES_MIRO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GAMS-dev%2FTIMES_MIRO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GAMS-dev","download_url":"https://codeload.github.com/GAMS-dev/TIMES_MIRO/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GAMS-dev%2FTIMES_MIRO/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32478162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"GAMS-dev","name":"GAMS Development Corp.","uuid":"30145628","kind":"organization","description":"General Algebraic Modeling System","email":"support@gams.com","website":"https://www.gams.com/","location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/30145628?v=4","repositories_count":7,"last_synced_at":"2023-03-08T13:49:29.452Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/GAMS-dev","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-18T05:27:44.011Z","updated_at":"2023-03-08T13:49:29.461Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GAMS-dev","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GAMS-dev/repositories"},"packages":[],"commits":{"id":11598249,"full_name":"gams-dev/times_miro","default_branch":"master","total_commits":218,"total_committers":4,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":54.5,"dds":0.42201834862385323,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-04-28T08:07:14.807Z","last_synced_commit":"6b161d3aabc28acaeecf260eadecd7be32ff9f2a","created_at":"2025-12-10T02:00:58.438Z","updated_at":"2026-04-28T08:07:14.769Z","committers":[{"name":"rschuchmann","email":"rschuchmann@gams.com","login":"rschuchmann","count":126},{"name":"Fred","email":"ffiand@gams.com","login":"FFiand","count":51},{"name":"Michael Bussieck","email":"mbussieck@gams.com","login":"mbussieck","count":21},{"name":"Frederik Proske","email":"fproske@gams.com","login":"fproske","count":20}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/gams-dev%2Ftimes_miro/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-28T00:00:07.369Z","repositories_count":6221538,"commits_count":900151477,"contributors_count":34899731,"owners_count":1146842,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"GAMS-dev/TIMES_MIRO","html_url":"https://github.com/GAMS-dev/TIMES_MIRO","last_synced_at":"2026-04-12T13:02:56.795Z","status":"error","issues_count":14,"pull_requests_count":35,"avg_time_to_close_issue":15985266.25,"avg_time_to_close_pull_request":2112066.882352941,"issues_closed_count":8,"pull_requests_closed_count":34,"pull_request_authors_count":4,"issue_authors_count":3,"avg_comments_per_issue":0.42857142857142855,"avg_comments_per_pull_request":0.11428571428571428,"merged_pull_requests_count":33,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2025-09-01T03:59:18.742Z","updated_at":"2026-04-12T13:02:56.795Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/GAMS-dev%2FTIMES_MIRO","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/GAMS-dev%2FTIMES_MIRO/issues","issue_labels_count":{"enhancement":3},"pull_request_labels_count":{"enhancement":3,"bug":2},"issue_author_associations_count":{"CONTRIBUTOR":13,"NONE":1},"pull_request_author_associations_count":{"CONTRIBUTOR":34,"NONE":1},"issue_authors":{"FFiand":7,"rschuchmann":6,"Antti-L":1},"pull_request_authors":{"rschuchmann":16,"mbussieck":10,"FFiand":8,"LeonardMK":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-26T00:00:11.126Z","repositories_count":14421130,"issues_count":34448019,"pull_requests_count":112726035,"authors_count":11246315,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[],"active_maintainers":[]},"events":{"total":{"ForkEvent":2,"WatchEvent":2},"last_year":{"WatchEvent":1}},"keywords":[],"dependencies":[],"score":4.605170185988091,"created_at":"2025-12-06T00:05:48.488Z","updated_at":"2026-05-01T22:30:12.737Z","avatar_url":"https://github.com/GAMS-dev.png","language":"R","category":"Energy Systems","sub_category":"Energy System Modeling Frameworks","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# TIMES MIRO App\u003ca name=\"times_miro-app\"\u003e\u003c/a\u003e\nThis is a [GAMS MIRO](https://gams.com/miro) app for the [IEA-ETSAP TIMES](https://github.com/etsap-TIMES/TIMES_model) model.\nTIMES MIRO is seen as an open source platform primarily intended to promote the dissemination and use of existing TIMES models. \nIt allows users to make changes to model assumptions and perform sensitive runs based on the initial model assumptions. \nIt then facilitates the comparison of results across multiple scenarios to evaluate the impact of the alternate futures. \nThe app comes with predefined TIMES MIRO Scenarios, e.g. the [TIMES_Demo](https://github.com/etsap-TIMES/TIMES_Demo) (default) \nand the the [TIMES-DK\\_COMETS](https://github.com/energy-modelling-club/TIMES-DK_COMETS) data sets. \nOthers can be created from TIMES model Excel input files (\\*.xlsx) or \\*.dd files.\n\n![overview](img/overview.png)\n\nTo obtain the app, including the TIMES source from the [TIMES_model](https://github.com/etsap-TIMES/TIMES_model) repository \nplus the [TIMES_Demo](https://github.com/etsap-TIMES/TIMES_Demo) and the the \n[TIMES-DK\\_COMETS](https://github.com/energy-modelling-club/TIMES-DK_COMETS) data sets, run the following command:\n\u003e git clone --recurse-submodules https://github.com/GAMS-dev/TIMES_MIRO.git\n\n# Prerequisites\u003ca name=\"prerequisites\"\u003e\u003c/a\u003e\nIn order to use the TIMES MIRO app locally you need\n* to clone this repository or download the self contained *.miroapp file(s) (https://github.com/GAMS-dev/TIMES_MIRO/releases)\n* to install GAMS 31.2.0 or newer (https://www.gams.com/download/)\n* to install GAMS MIRO 2.9.0 or newer (https://www.gams.com/miro/download.html)\n\n**Note:** Starting the app locally for the first time may take some time because the predefined scenario data sets have to be imported to the MIRO database.\n\nTo be able to import TIMES model Excel input files in MIRO, [python](https://www.python.org/) and the python package \n[xl2times](https://github.com/etsap-TIMES/xl2times) are required. The Excel input format accepted by this tool is documented \nin the [TIMES Model Documentation PART IV](https://iea-etsap.org/docs/Documentation_for_the_TIMES_Model-Part-IV.pdf). Make \nsure that python and the tool can be found by putting it in the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable.\n\n# Example Application with Customized Visualizations\nIf the TIMES MIRO application is used without further ado, the output section shows all model results in a powerful pivot table \n(generated by [GDX2VEDA](https://www.gams.com/latest/docs/T_GDX2VEDA.html)) that \nallows slicing and dicing the data as needed. In addition to a table, the renderer also supports the visualization of \ndata in the form of a heatmap or as a chart (line chart, bar chart, etc.). \n\nWith a configuration adapted to your model, you can significantly improve the visualization of the results in the form of a \ndashboard and/or a so-called data explorer, both in the regular output section and as a separate scenario comparison module. \nYou can find more details about the renderers [below](#output-view).\n\nThese renderers must be configured for the specific data of the model used. To make it easier to get started, this repository \nincludes a slimmed-down version of the [TIMES Ireland model](https://github.com/MaREI-EPMG/times-ireland-model) that has \nalready been configured for use with the dashboard and data explorer. The files can be found in the `example` folder and must \nbe moved to the correct location in order to use the TIMES/MIRO app for the TIMES Ireland model.\n\n- config.json \u0026#8594; move to `renderer_times_miro`\n- schema files \n  - Schema.xlsx \u0026#8594; move to `renderer_times_miro`\n  - Schema_colors.xlsx \u0026#8594; move to `renderer_times_miro`\n  - Schema_Technology.xlsx \u0026#8594; move to `renderer_times_miro`\n- views.json \u0026#8594; move to `conf_times_miro`\n- times_ireland_demo.miroscen \u0026#8594; move to `data_times_miro`\n\nTo initialize the use of these files, open the `conf_times_miro/times_miro.json` and change the `dataRendering` entry of the `cubeOutput` symbol from \n\n```\n\"dataRendering\": {\n  \"cubeoutput\": {\n    \"outType\": \"miroPivot\",\n    \"height\": 700,\n    \"options\": {\n      \"aggregationFunction\": \"sum\",\n      \"pivotRenderer\": \"table\",\n      \"enableHideEmptyCols\": true,\n      \"hideEmptyCols\": true,\n      \"emptyUEL\": \"-\",\n      \"rows\": [\"soname\", \"sow\", \"com_grp\", \"prc\", \"allyear\", \"all_reg\", \"vintage\", \"all_ts\", \"uc_n\"]\n    }\n  },\n  [...]\n}\n```\n\nto\n\n```\n\"dataRendering\": {\n  \"cubeoutput\": {\n    \"outType\": \"mirorenderer_cubeoutput\"\n  },\n  [...]\n }\n```\n\nIn the same file make sure that `\"customCss\": true` is set. If not, add it to the root configuration. \n\nTo enable the custom scenario comparison module, add the following configuration:\n\n```\n\"customCompareModules\": [\n  {\n    \"id\": \"explorer\",\n    \"label\": \"Dashboard compare\"\n  }\n]\n```\n\nOptionally, one can enable the custom scenario comparison as default comparison module by setting\n\n```\n\"defCompMode\": \"explorer\"\n```\n\nThe MIRO app can now be started and the Ireland dataset imported from the database via the `Load data` button. \n\n# Usage of the App\u003ca name=\"usage-of-the-app\"\u003e\u003c/a\u003e\nFollowing the common [MIRO App Structure](https://www.gams.com/miro/start.html#miro-structure), the app has a navigation bar \non the left side to switch between the following views: \n* Input\n* Output\n* GAMS Interaction\n* Load Scenarios\n* Compare Scenarios\n\n##  Import Data\u003ca name=\"import-data\"\u003e\u003c/a\u003e\nThe input section can be used to prepare data for the next model run. \n\n### Database Scenarios\u003ca name=\"import-database-scenarios\"\u003e\u003c/a\u003e\nA TIMES MIRO Scenario (all visible data and attachments) can be stored in the database at any \ntime as a MIRO scenario for later use under `Scenario` \u0026rarr; `Save as`. To load an existing \nscenario from the database, click the `Load data` button in the input view. In the dialog that \nopens, the `Database` tab lists all available scenarios. If there are many saved scenarios, \nthe [Load scenarios view](#load-scenarios) can give a better overview. \n\n![load_db](static_times_miro/load_db.png)\n\n\u003cbr /\u003e\n\n### Local File Scenarios\u003ca name=\"import-local-file-scenarios\"\u003e\u003c/a\u003e\nScenario files previously exported from MIRO can be re-imported via the `Local` tab in the same dialog. \n\n### External Scenarios\u003ca name=\"import-external-scenarios\"\u003e\u003c/a\u003e\nNew data can be imported via the `External` tab. Either TIMES model Excel input files (\\*.xlsx) or \\*.dd files can be used as data source. Optionally, it is \npossible to provide a \\*.run file as produced by \n[VEDA](https://iea-etsap.org/index.php/etsap-tools/data-handling-shells/veda). The data must be \nzipped (file paths can remain) and uploaded via the fileinput widget. \nClick on `Load` to start the data import. As soon as this is finished, MIRO will inform you whether the import was successful. \n\n![load_external](static_times_miro/load_external.png)\n\n---\n**NOTE**\n\nTo be able to import Excel input files, [python](https://www.python.org/) and the python package \n[xl2times](https://github.com/etsap-TIMES/xl2times) are required. The Excel input format accepted by this tool is documented \nin the [TIMES Model Documentation PART IV](https://iea-etsap.org/docs/Documentation_for_the_TIMES_Model-Part-IV.pdf). Make \nsure that python can be found by putting it in the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable.\n\n---\n\nThe following happens when importing data via the `External` tab:\n\n- XLSX: If .xlsx files are provided as input data, the python tool [xl2times](https://github.com/etsap-TIMES/xl2times) is first \ncalled in the background, which converts these files into \\*.dd files (`output.dd` and `ts.dd`). In the next step, \nGAMS is called to convert these \\*.dd files into MIRO-compatible input data. \n- DD: If \\*.dd files are provided as input data, GAMS is directly called to convert the \\*.dd files into MIRO-compatible input data.\n\nIf a (optional) run file is used in any of these cases, the MIRO input data will be completed by automatically extracting TIMES \nextensions, active \\*.dd files, etc. from the \\*.run file. Note that this approach is convenient but also fragile because if the \n\\*.run file contains unexpected content, things might fail. You should therefore ensure that the content of the run file is \ncompatible with the data provided.\n\n**Milestone years**\n\nThe representative years for the model periods are taken from different sources depending on the input files used. \n- If TIMES model Excel input files (.xlsx) files are imported, the milestone years are always extracted from them, regardless of any .run file that may have been provided.\n- If .dd files are imported together with a run file, the milestone years are extracted from the run file. There must be no `milestonyr` entry in the dd files. \n- If .dd files are imported without a run file, the milestone years are set to the default: `2005, 2010, 2015, 2020, 2030, 2050`. There must be no `milestonyr` entry in the dd files. \n\n## Prepare Model Run\u003ca name=\"prepare-model-run\"\u003e\u003c/a\u003e\n\nIn the `Settings` tab the main configuration is done. There are three sections: `Model setup`, \n`Options / Extensions` and `Solver`.\n\n### Model Setup\n- `DD Files order / Read under $offEps`: In this table, the names of all \\*.dd files that belong to the current TIMES MIRO scenario are listed. The user can adjust the read order and specify whether a \\*.dd file should be read in GAMS under `$offEps`. If a \\*.dd file should not be used for the next model run, this can be specified by an order value of `0`. Note that the [xl2times](https://github.com/etsap-TIMES/xl2times) tool, which is used when [importing xlsx files](#import-external-scenarios), only generates 2 \\*.dd files as output.\n- `Milestone years`: This table allows to select the set of years for which the model will run.\n- `Time slices available`: This table cannot be edited by the user, but only serves as an overview of the available time slices in the data. The set of timeslices and the representation of the intra-annual resolution is pre-configured and of central importance to many model data structures. A re-configuration of this set would require extensive modifications in the input data cube.\n- `Additional statements`: This table allows you to add GAMS code to the run file that is \ngenerated during the model run. The custom code will be placed before the \n`$batInclude maindrv.mod`. This setting is recommended for expert TIMES users only.\n\n![model_setup](static_times_miro/model_setup.png)\n\n\u003cbr /\u003e\n\n### Options / Extensions\nIn this tab, TIMES options/extensions can be configured. A tooltip with a description of the option appears when you hover \nover an option. Each value cell contains a dropdown menu which allows you to select available options. Note that values can \nalso be entered manually. \n\n![options_extensions](static_times_miro/options_extensions.png)\n\n\u003cbr /\u003e\n\n### Solver Options\nIn this tab, the solver to be used and (optional) options can be defined.\n- `Solver options`: This table allows to change/define solver options to be used.\n- `Solver to use`: Select a solver to use. \n- `Time limit for solve [seconds]`: Time limit for solving the model.\n- `Basis indicator (bRatio)`: The value specified for [bRatio](https://www.gams.com/latest/docs/UG_GamsCall.html#GAMSAObratio) will cause a basis to be discarded if the number of basic variables is smaller than bRatio times the number of equations.\n\n![solver_options](static_times_miro/solver_options.png)\n\n### Input data\u003ca name=\"input-data\"\u003e\u003c/a\u003e\nThis is the central tab for browsing and editing input data in a powerful pivot table. The concept of this tab follows the idea to look at data based on \"important\" indices (e.g. Region, Year, Process, Commodity, Time Slice, ...). Each dimension of the cube can be filtered, aggregated, dragged into the columns, etc. using drag and drop. The cells are editable. Note, however, that when a dimension of the cube is in the `Aggregate` field, the table is read-only. More information about the pivot tool in general can be found [here](https://www.gams.com/miro/charts.html#pivot-chart).\n\n![input_table](static_times_miro/input_table.png)\n\n\u003cbr /\u003e\n\n### RES viewer\u003ca name=\"res-viewer\"\u003e\u003c/a\u003e\nIn the upper right corner of the input data tab there is a *switch view* button that allows to look at the RES network. The RES viewer provides `process centric`, `commodity centric` and `user constraint centric` views. All displayed items are clickable which allows convenient switching between different views. The corresponding table at the right and the pivot table at the bottom are updated automatically and show related data. Note that the pivot table uses the package [rpivotTable](https://cran.rstudio.com/web/packages/rpivotTable/index.html) which is loaded when the application is started.\n\n![res_network](static_times_miro/res_network.png)\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n### Solve model\u003ca name=\"solve-model\"\u003e\u003c/a\u003e\nWhen all data has been prepared and settings have been made in the input view, the model can be solved by clicking on the `solve model` button in the navigation bar in the `Input` section.\n\n![solve](static_times_miro/solve.png)\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n## GAMS Interaction View\u003ca name=\"gams-interaction-view\"\u003e\u003c/a\u003e\nThe GAMS Interaction View is automatically focused during a run. It shows the log file while it is written. The log and listing file can be accessed after a run. Note that the listing file shown in the app is a combination of the listing files written when running the wrapper `times_miro.gms` and the driver `timesdriver.gms`. You can find more information about the underlying code structure [here](https://github.com/GAMS-dev/TIMES_MIRO#code-structure).\n\nFor more details on this view, please consult the [GAMS MIRO Documentation](https://www.gams.com/miro/start.html#miro-structure).\n\n## Output View\u003ca name=\"output-view\"\u003e\u003c/a\u003e\nOnce a TIMES model has been solved, the Output view is filled with results data (generated by [GDX2VEDA](https://www.gams.com/latest/docs/T_GDX2VEDA.html)).\n\nIf the TIMES MIRO application is used without further ado, the output section shows data in a powerful pivot table that allows slicing and dicing the results as needed. In addition to a table, the renderer also supports the visualization of data in the form of a heatmap or as a chart (line chart, bar chart, etc.). The MIRO pivot table renderer allows you to store \"views\" - the current representation of the data - to the database and load it together with the scenario data. This is very convenient for views that are frequently needed.\n\nWith a configuration adapted to the model, you can significantly improve the results visualization. Up to 4 output screens are available for integration. \n\n1. __Dashboard__\nThe dashboard is an interactive tool with different views showing key insight data. The dashboard is navigated via the ‘tiles’ on the right-hand side of the screen. A click on a tile switches the view to configured charts/tables. \n\n   ![dashboard](img/dashboard.png)\n\n2. __Data Explorer__\nThe data explorer is an interactive tool that provides insights into the most important sectors. You can filter the data based on different indicators and switch between several chart types.\n   \n   ![dataexplorer](img/dataexplorer.png)  \n\n3. __Data Explorer (Pivot)__\nPivot table that holds the same data as Data Explorer. The pivot table allows you to filter, aggregate and pivot data freely. \n   \n   ![dataexplorerpivot](img/dataexplorerpivot.png)  \n \n4. __Full Output__\nPivot table that holds all output data. Similar to the Input data, the concept of the data in the Full Output tab follows the idea to look at data based on \"important\" indices (e.g. Region, Attribute, Commodity, Process, Time Slice, …). \n\n   ![fulloutput](img/fulloutput.png)  \n\n## Load Scenarios \u003ca name=\"load-scenarios\"\u003e\u003c/a\u003e\n`Load scenarios` provides a powerful batch load module that graphically assists you to create and execute complex database queries. Filters can be applied to scenario metadata such as the creation time, scenario name, or optional tags you have assigned to a scenario. You can also filter by any input and output scalars defined in your model as well as any [double-dash parameters](https://www.gams.com/latest/docs/UG_GamsCall.html#UG_GamsCall_DoubleDashParametersEtc) and GAMS [command line parameters](https://www.gams.com/latest/docs/UG_GamsCall.html#UG_GamsCall_ListOfCommandLineParameters). You can combine any of these filters with the logical operators AND and OR. You can execute your query by clicking on the Fetch results button. After the results have been retrieved, the page will be updated and you will see a table with the scenarios that correspond to your query. Once you have found the scenarios you were looking for, you can select them and, for example, [compare them](#compare-scenarios-view) or load them into the sandbox for editing. More information about this in the [official MIRO documentation](https://www.gams.com/miro/start.html#scenario-loading).\n\n## Compare Scenarios \u003ca name=\"compare-scenarios-view\"\u003e\u003c/a\u003e\n\nThis section can be used to compare MIRO scenarios that are stored in the database. There are three different types of comparison available per default: `Split view`, `Tab view` and `Pivot view`. \nIn the `split view` comparison the data of two scenarios can be compared side by side. Scenarios can also be loaded into tabs (as you know it from e.g. your internet browser) in the `tab view` comparison. This allows to compare more than two scenarios. In the `pivot view` comparison the data of all selected scenarios is merged into a pivot table which allows to create charts that combine data from multiple scenarios.\n\nOnce the configuration for the output renderers (see below) has been completed, the dashboard and the data explorer tab can also be used in a custom scenario comparison module without much additional effort. In such a module, all data of several selected scenarios is visualized in the renderers at once:\n\n![scenariocompare](img/scenariocompare.png)  \n\nYou can find more information on custom scenario comparison in MIRO [here](https://www.gams.com/miro/configuration_json_only.html#custom-compare-mode).\n\n# Output configuration\nPlease note that the configuration discussed below is very data-specific and tailored to a particular model (e.g. TIMES Ireland). It is therefore likely that an application configured for Model X will not work with data from Model Y. \n\nMost of the configuration of the output is done in the file `renderer_times_miro/config.json`. This file is divided into several sections:\n- `generalConfig`: General configuration\n- `dataProcessing`: Conditions for excluding specific data points from the results.\n- `dataExplorer`: Configuration for the data explorer tab\n- `dashboard`: Configuration for the dashboard tab\n\nMake sure that correct json syntax is used and that upper/lower case is respected. \n\nTo initialize the use of the `config.json`, open the `conf_times_miro/times_miro.json` and change the `dataRendering` entry of the `cubeOutput` symbol from \n\n```\n\"dataRendering\": {\n  \"cubeoutput\": {\n    \"outType\": \"miroPivot\",\n    \"height\": 700,\n    \"options\": {\n      \"aggregationFunction\": \"sum\",\n      \"pivotRenderer\": \"table\",\n      \"enableHideEmptyCols\": true,\n      \"hideEmptyCols\": true,\n      \"emptyUEL\": \"-\",\n      \"rows\": [\"soname\", \"sow\", \"com_grp\", \"prc\", \"allyear\", \"all_reg\", \"vintage\", \n               \"all_ts\", \"uc_n\"]\n    }\n  }\n}\n```\n\nto\n\n```\n\"dataRendering\": {\n  \"cubeoutput\": {\n    \"outType\": \"mirorenderer_cubeoutput\"\n  }\n }\n```\n\nIn the same file make sure that `\"customCss\": true` is set. If not, add it to the root configuration. \n\n## generalConfig (General Configuration)\nGeneral configuration in the `renderer_times_miro/config.json` file.\n\n### tabNames\nDefines names for main output tabs in the application. If a tab name is missing, the corresponding tab will be hidden in the user interface. This is also true for the optional scenario comparison module. \nFor the `dataExplorerPivot` tab to be used, the main [dataExplorer](#dataexplorer) configuration (not `tabNames.dataExplorer`) needs to be available. \n\nExample:\n```\n\"tabNames\": {\n  \"dashboard\": \"Dashboard\",\n  \"dataExplorer\": \"Data Explorer\",\n  \"dataExplorerPivot\": \"Data Explorer (Pivot)\",\n  \"fullOutput\": \"Full Output\"\n}\n```\n\n## dataProcessing (Data Processing)\n\n### excludeNonNumericPeriods\nIndicates whether rows with non-numeric period values should be excluded from the results data.\n\nExample: \n\n```\n\"excludeNonNumericPeriods\": true\n```\n\n### skip\nDescription: Specifies conditions for excluding specific data points from the results.\n\nExample:\n\n```\n\"skip\": { \n  \"Period\": [2016, 2018], \n  \"Commodity\": [\"COseq\"] \n}\n```\n\n## dashboard (Dashboard)\u003ca name=\"dashboard\"\u003e\u003c/a\u003e\nThe dashboard configuration takes place exclusively in `renderer_times_miro/config.json`. All configurations made in this section apply exclusively to the dashboard tab. This includes:\n- Configuration of the tiles (value boxes), which are used to navigate between views in the dashboard. Optionally, value boxes can display KPIs.\n- Configuration of the view to be displayed when clicking on a value box. A view can contain several charts/tables.\n- Configuration of the individual charts/tables.\n\n### valueBoxesTitle\nTitle to be displayed above the value boxes section in the dashboard.\n\nExample: \n```\n\"valueBoxesTitle\": \"Summary indicators\"\n```\n\n### valueBoxes\u003ca name=\"valueBoxes\"\u003e\u003c/a\u003e\nConfiguration for the value boxes (tiles) in the dashboard. A valuebox can display a title and a single value (optional). As a value box is linked to a view, the title/value should be selected according to this. A valuebox has several properties that can be configured. Each property of each value box must always be specified so that all property lists have the same number of entries. An example will be given below\n- Id: Each valuebox needs a unique id. The id of a dataview with charts and tables (see below) is linked to the id of a valuebox. This can be any string. \n- Color: A valuebox can have an individual color. The color code can either be provided as Hex Color Code (e.g. `#29B675`) or can be chosen from the following options: `red`, `yellow`, `aqua`, `blue`, `light-blue`, `green`, `navy`, `teal`, `olive`, `lime`, `orange`, `fuchsia`, `purple`, `maroon`, `black`.\n- Icon: A valuebox can have an individual icon. For all available icons see [fontawesome.com](https://fontawesome.com/search?o=r\u0026m=free).\n- Title: Title that is displayed in the valuebox.\n- ValueScalar: If the value box should display a value, this needs to be configured here. Valid ValueScalar entries are scalar output symbols of the model, which are integrated in MIRO. Names must be specified in the lowercase. \n- Prefix: String that is displayed ahead of the value. If `+` is defined as a prefix, a `+` is appended to a positive value. If the value is negative, the sign automatically changes to `-`.\n- Postfix: String that is displayed after the value.\n- redPositive: Positive values are displayed in green by default, negative values in red. If this logic should be reversed (positive: red, negative: green), the redPositive property of the valuebox must be set to true, otherwise false. \n- NoColor: If the value of the valuebox should not have a red/green color, but should be gray instead, the NoColor property needs to be set to true, else false.\n- Decimals: Number of decimal places that should be displayed for a value.\n\nExample:\n```\n \"valueBoxes\": {\n   \"Id\": [\"allEmissions\", \"transportEnergy\"],\n   \"Color\": [\"#848991\", \"#29B675\"],\n   \"Icon\": [\"smog\", \"truck\"],\n   \"Title\": [\"All Emissions\", \"Transport energy consumption\"],\n   \"ValueScalar\": [null, null],\n   \"Prefix\": [\"+\", \"+\"],\n   \"Postfix\": [\"%\", \"%\"],\n   \"redPositive\": [false, false],\n   \"NoColor\": [false, false],\n   \"Decimals\": [null, null]\n }\n```\n\n### dataViews\u003ca name=\"dataViews\"\u003e\u003c/a\u003e\nA data view is shown if  the corresponding value box is clicked in the user interface. It can display multiple charts and tables. In `dataViews` you define how many charts/tables a view should contain. The actual configuration of the charts/tables is done in [dataViewsConfig](#dataViewsConfig) (see below). \nThe name/id of a data view must match the id of a valuebox. This represents the link between the valuebox and the view. After the name/id, the title is specified, which is displayed above the chart/table. \nIf only one chart is specified for a view, the chart and corresponding table of the data set are displayed one below the other. If there is more than 1 chart per view configured, you can choose between chart and table via dropdown in the dashboard.\n\nIn the following example two data views are configured. The ids (`allEmissions` and `transportEnergy`) match the ones used for the [valueBoxes](#valueBoxes) (see above). The `allEmissions` view will show two charts/tables, the `transportEnergy` view will show one.\n\nExample: \n\n```\n\"dataViews\": {\n  \"allEmissions\": {\n    \"allEmissions\": \"All Energy Related Annual Emissions\",\n    \"IndustryEmissions\": \"Industry emissions\"\n  },\n  \"transportEnergy\": {\n    \"transportEnergy\": \"Transport final energy consumption?\"\n  }\n}\n```\n\n### dataViewsConfig\u003ca name=\"dataViewsConfig\"\u003e\u003c/a\u003e\nThe individual charts/tables are configured for specific data here. A separate configuration in `dataViewsConfig` is required for each chart listed in the `dataViews`. The ids need to be the same. \n\nA data view configuration describes how the original data should be filtered, pivoted, aggregated and which renderer should be used. The configuration of a chart is almost the same as that of a configured view in the pivot table (learn more about views [here](https://www.gams.com/miro/start.html#metadata-views) and [here](https://www.gams.com/miro/charts.html#pivot-chart)). The easiest way to configure a dashboard chart is therefore as follows: \n\n1. Start the app, load scenario data with results data (or solve first).\n2. Navigate to the full output pivot table tab in the output section\n3. In the pivot table, slice and dice data as desired, select a renderer and save the whole thing as a view by clicking on the `+`  on the left side of the pivot table. \n4. Click on `Scenario` → `Edit metadata` in the top right corner of the app and switch to the `View` tab in the dialog box that opens.\n5. Select the configured view (or several views) by clicking on it and click on `Download views`.\n6. Open the downloaded json file and unminify the contents if necessary (e.g. via [unminify.com](https://unminify.com/)). \n7. Many settings of a view (marked green below) can be copied 1:1 for the configuration of a chart in the dashboard. \n8. In addition to the attributes of the downloaded pivot-table view, there are further attributes available in the dashboard configuration: \n    1. `customLabels`: Listing of individual elements that should be relabeled in the chart/table. Note that applying custom labels to a dataset can be compute-intensive depending on the amount of data. Rendering the output might increase significantly. \n    2. `userFilter`: Adds multi-dropdown menu(s) to a chart/table in which elements of the configured dimension can be selected for being rendered. \n    3. `Decimals`: Number of decimal places to be displayed\n\n```\n\"dataViewsConfig\": {\n  \"allEmissions\": {\n    \"rows\": [\"Period\"],\n    \"filter\": { \"Attribute\": \"VAR_Comnet\", \"Process\": \"-\", \"UserConstraint\": \"-\", \"Vintage\": \"-\" },\n    \"aggregations\": { \"all_ts\": null },\n    \"aggregationFunction\": \"sum\",\n    \"cols\": { \"Region\": null, \n              \"Commodity\": [\"AGRCO2\", \"COMCO2\", \"INDCO2\", \"RESCO2\", \"TRACO2\"] },\n    \"tableSummarySettings\": { \"enabled\": false, \"rowSummaryFunction\": \"sum\", \"colSummaryFunction\": \"sum\" },\n    \"pivotRenderer\": \"stackedbar\",\n    \"chartOptions\": { \"yTitle\": \"CO2 Emissions\",\n                      \"customLabels\": {\n                        \"NI\": \"North Island\",\n                        \"SI\": \"South Island\",\n                        \"AGRCO2\": \"Agriculture\",\n                        \"COMCO2\": \"Commercial\",\n                        \"INDCO2\": \"Industry\",\n                        \"RESCO2\": \"Residential\",\n                        \"TRACO2\": \"Transport\"\n                      } \n    },\n    \"userFilter\": \"Region\",\n    \"decimals\": 2\n    }\n}\n```\n\n## dataExplorer (Data Explorer)\u003ca name=\"dataexplorer\"\u003e\u003c/a\u003e\nAll configurations made in this section apply exclusively to the Data explorer tab.\n\n### schemaFiles\nSpecifies three schema files for the data explorer tab. \n- `dataSchema`: This schema is mandatory if the data explorer tab is used. It maps Attribute/Process/Commodity combinations to a Sector, Subsector, Technology, Fuel, Enduse, Unit, Parameter and Fuel group. \n  The data schema must include the following column names: `Attribute`, `Process`,\t`Commodity`, `Sector`, `Subsector`,\t`Technology`, `Fuel`, `Enduse`, `Unit`, `Parameters`, `FuelGroup`. These are also the column names that form the basis for further modifications in the `dataExplorer` section. \n- `technologySchema`: This schema is mandatory if the data explorer tab is used. It maps Technologies (as used in dataSchema, column ‘Technology’) to technology groups. The data schema must include the following column names: `Technology`, `Technology_Group`.\n- `colorSchema`: Optional schema. It maps Technologies (as used in `dataSchema`, column `Technology`) to colors and symbols (for data points in a chart) that are then used in the data explorer tab. If no schema is specified, default colors and symbols are used. Possible symbols are  `circle`, `cross`, `crossRot`, `dash`, `line`, `rect`, `rectRounded`, `rectRot`, `star`, `triangle`.\n\n```\nExample:\n\"schemaFiles\": {\n  \"dataSchema\": \"Schema.xlsx\",\n  \"technologySchema\": \"Schema_Technology.xlsx\",\n  \"colorSchema\": \"Schema_colors.xlsx\"\n}\n```\n\n### tabNames\nDefines names and metadata for sector tabs in the data explorer. For each tab name/sector provided there will be a tab in the data explorer. For a tab name, the string under which the sector can be found in the Sector column in the output data (as used in `dataSchema`, column `Sector`) must be provided. An optional tooltip can be added that will be shown in the interface when hovering a tab.\nNote that if a sector string is changed via the [mutateColumns](#mutateColumns) configurations (see below), the new value needs to be used here. \nExample: \n\n```\n\"tabNames\": {\n  \"All Sectors\": { \n    \"dataString\": null, \n    \"tooltip\": \"\" \n  },\n  \"Transport\": { \n    \"dataString\": \"Transport\", \n    \"tooltip\": \"\" \n  },\n  \"Electricity\": { \n    \"dataString\": \"Other\", \n    \"tooltip\": \"Electricity Generation\"\n  }\n}\n```\n\n\n### nonEmissionFuel\nSpecifies non-emission fuels for analysis. In addition to fuels (as used in `dataSchema`, column `Fuel`) that are declared as non-emission fuels, the parameter that represents emissions (as used in `dataSchema`, column `Parameters`) must also be specified. As a result, the emission value of the specified fuels is set to `0` in the result data.\nExample:\n\n```\n\"nonEmissionFuel\": {\n  \"fuels\": [\"Electricity\", \"Wood\", \"Hydrogen\", \"Hydro\", \"Wind\", \"Solar\", \"Biogas\"],\n  \"emissionParameter\": \"Emissions\"\n}\n```\n\n\n### mutateColumns \u003ca name=\"mutateColumns\"\u003e\u003c/a\u003e\nDefines rules for mutating or transforming specific columns in the results data. Each rule has a condition column with a condition, a target column and a new value that should be applied. Column names correspond to the ones in `dataSchema`.\n\nExample:\nIn the following example there are three mutations defined. \n- In the first one all `Electricity` entries in the `Sector` column should be renamed to `Other`.\n- The second modification looks into column `Parameters`. Whenever there is an `Emissions` entry in that column, the value of that row (column `Value`) should be divided by 1000.\n- The third change is a consequence of the second one. Wherever there is an `Emissions` entry in the `Parameters` column, the unit (column `Unit`) should be changed to `Mt CO2/yr` (was `kt CO2/yr` before).\n\n```\n\"mutateColumns\": [\n  {\n    \"targetColumn\": \"Sector\",\n    \"conditionColumn\": \"Sector\",\n    \"condition\": \"Electricity\",\n    \"newValue\": \"Other\"\n  },\n  {\n    \"targetColumn\": \"Value\",\n    \"conditionColumn\": \"Parameters\",\n    \"condition\": \"Emissions\",\n    \"newValue\": \"Value/1000\"\n  },\n  {\n    \"targetColumn\": \"Unit\",\n    \"conditionColumn\": \"Parameters\",\n    \"condition\": \"Emissions\",\n    \"newValue\": \"Mt CO2/yr\"\n  }\n]\n```\n\n### removeData\nDefines rules for excluding specific data entries in the results data. Each rule has a target column with a condition. Column names correspond to the ones in `dataSchema`.\n\nExample: \nIn the following example there are two deletions defined.\n- In the column `Parameters` all rows with the entry `Annualised Capital Costs` should be removed.\n- In the column `Parameters` all rows with the entry `Technology Capacity` should be removed.\n\n```\n\"removeData\": [\n  {\n    \"targetColumn\": \"Parameters\",\n    \"condition\": \"Annualised Capital Costs\"\n  },\n  {\n    \"targetColumn\": \"Parameters\",\n    \"condition\": \"Technology Capacity\"\n  }\n]\n```\n\n### preprocessing\nIn case the available options to mutate or remove data is not sufficient, one can include an additional R file for cleaning and preprocessing data for the data explorer further. In the output renderer file `mirorenderer_cubeoutput.R`, the preprocessing file is included right after the (optional) data mutations (`mutateColumns`, `removeData`). The data tibble that needs to be used is named `clean_df`. Resulting data must be named `explorer_df` and needs to have the columns `Sector`, `Subsector`, `Technology`, `Enduse`, `Unit`, `Parameters`, `Fuel`, `Period`, `FuelGroup`, `Technology_Group`, `Value`. The preprocessing file needs to be located in `renderer_times_miro/data-processing`.\n\nExample: \n```\n\"preprocessing\": \"data-cleaning.R\"\n```\n\n# Scenario comparison configuration\nTo initialize the custom scenario comparison module, open the `conf_times_miro/times_miro.json` and add the following configuration:\n\n```\n\"customCompareModules\": [\n  {\n    \"id\": \"explorer\",\n    \"label\": \"Dashboard compare\"\n  }\n]\n```\n\nIn the same file make sure that \n\n```\n\"customCss\": true \n```\n\nis set. If not, add it to the root configuration. Optionally, one can enable the custom scenario comparison as default comparison module by setting\n\n```\n\"defCompMode\": \"explorer\"\n```\n\n## scenCompareDashboard (Scenario Comparison Dashboard)\n_Same structure as dashboard section._\n\n\nNote on `scenCompareDashboard.dataViewsConfig`:\n\nAs the result data in the scenario comparison has an additional `Scenario` dimension, it is advisable to use the [pivot compare mode](https://www.gams.com/miro/start.html#compare-pivot) for the chart configuration.\n\n1. Start the app.\n2. Go to section ‘Load Scenarios’ in the navigation pane and search for desired scenarios\n3. Select scenario(s) by clicking on them, click on ‘Choose selected scenarios’ and in the modal dialog that opens select ‘Compare (Pivot)’ as comparison module.\n4. Continue with step 3. in [dataViewsConfig](#dataViewsConfig) from the previous section.\n\n\n## scenCompareDataExplorer (Scenario Comparison Data Explorer)\n_Same structure as dataExplorer section._ \n\n\n# Code Structure\u003ca name=\"code-structure\"\u003e\u003c/a\u003e\nThe basic principle of the TIMES MIRO app is that it works as a wrapper around the existing TIMES source code and the well established data handling concept that feeds the model with data via so-called \\*.dd files.\n\nThe code sections referred to in the following overview are highlighted via corresponding comments in the wrapper file `times_miro.gms`. Also note that there is difference between running the file through the app (this is what happens in the background when the user hits \"solve\") and running it through Studio. Running the file through studio is mainly useful to prepare new TIMES data sets for usage with the app. To do so, run \n\n\u003etimes_miro.gms --RUNMODE=create --RUNFILE=\u003cpath/to/runfile.run\u003e --DDPREFIX=\u003cpath/to/ddFiles/\u003e\n\nwhere you replace `\u003cpath/to/runfile.run\u003e` by a locally available \\*.run file and replace `\u003cpath/to/ddFiles/\u003e` by a local folder that contains all the relevant \\*.dd files (**make sure to provide the final directory separator!!!**).\n\n![inputcube](img/code_structure.png)\n\n# Support\nIf you have any questions or comments regarding the TIMES/MIRO app, please contact support@gams.com.\n\n\n# License\u003ca name=\"license\"\u003e\u003c/a\u003e\nThe MIRO demo app is licensed under the MIT license (see file LICENSE). Note that everything inside the times\\_model, TIMES\\_Demo as well as the TIMES-DK_COMETS submodules is licensed under GPL-3. See files `times_model\\LICENSE.txt`, `TIMES_Demo\\LICENSE.txt` as well as `TIMES-DK_COMETS\\LICENSE` for more information.\nThe data processing and data explorer code in the custom renderer files was taken from https://github.com/EECA-NZ/TIMES-NZ-Visualisation (MIT licensed, see [here](https://github.com/EECA-NZ/TIMES-NZ-Visualisation/blob/master/LICENSE)). The code has been modified to meet the requirements of this application.","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/336960","html_url":"https://ost.ecosyste.ms/projects/336960"}