{"id":19129758,"url":"https://github.com/mathworks/climate-iam-explorer","last_synced_at":"2025-05-06T00:35:32.701Z","repository":{"id":49228188,"uuid":"309964235","full_name":"mathworks/Climate-IAM-Explorer","owner":"mathworks","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-17T15:07:25.000Z","size":36627,"stargazers_count":20,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T12:42:44.378Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-04T10:05:59.000Z","updated_at":"2025-04-04T04:23:20.000Z","dependencies_parsed_at":"2024-09-06T16:40:04.989Z","dependency_job_id":"d915a474-b461-448c-ba2b-3d3566a038a9","html_url":"https://github.com/mathworks/Climate-IAM-Explorer","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2FClimate-IAM-Explorer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2FClimate-IAM-Explorer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2FClimate-IAM-Explorer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2FClimate-IAM-Explorer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathworks","download_url":"https://codeload.github.com/mathworks/Climate-IAM-Explorer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252599937,"owners_count":21774498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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"}},"keywords":[],"created_at":"2024-11-09T06:08:24.481Z","updated_at":"2025-05-06T00:35:32.693Z","avatar_url":"https://github.com/mathworks.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Climate Integrated Assessment Models Explorer\n\n[![View Database Explorer for IIASA on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/82550-climate-iam-explorer)\n\n| **CI Platform** | **Badges** | **Results** | **Coverage** |\n|:----------------|:-----------|:------------|:-------------|\n| GitHub Actions | [![MATLAB](https://github.com/mathworks/Database-Explorer-for-IIASA/workflows/MATLAB/badge.svg)](https://github.com/mathworks/Database-Explorer-for-IIASA/actions?query=workflow%3AMATLAB) | [TestResults](https://mathworks.github.io/Climate-IAM-Explorer/test-results/report.html) | [CodeCoverage](https://mathworks.github.io/Climate-IAM-Explorer/code-coverage/report.html) |\n\nThis repository contains a set of tools to allow users explore integrated assesmemnt models and [**some examples**](https://github.com/mathworks/Climate-IAM-Explorer/tree/master/examples) showcasing how one can use this information in conjuntion to financial applications. The models accessible by the tool include the [different datasets](https://iiasa.ac.at/web/home/research/researchPrograms/Energy/Databases.en.html) hosted by the IIASA Energy program (ENE), but it is extensible to your own custom models. These databases contain a series models that predict the evolution magnitudes including CO2, Energy Prices, and Population among others. Each prediction is based in different climate scenarios established by the model. To understand more about how the different scenarios are built, we recommend visiting the technical documentation for each database. In particular, the links below point the user to the technical documentation for the IAMC1.5 and NGFS datasets.\n\u003c/br\u003e\n[Huppmann et al., Nature Climate Change (2018)](https://www.nature.com/articles/s41558-018-0317-4)\n\u003c/br\u003e\n[NGFS Climate Scenarios Database](https://www.ngfs.net/en/publications-and-statistics/publications/ngfs-climate-scenarios-central-banks-and-supervisors-phase-v)\n\nPlease note that this tool is complementary to the more complete (IIASA Scenario Explorer](https://data.ene.iiasa.ac.at/auth/#/) and the main purpose is to allow getting the data directly into MATLAB.\n\nThe repository mostly consists of two separate tools. A MATLAB API to the RESTful interface form IIASA below: \u003cbr /\u003e\nhttps://documenter.getpostman.com/view/1057691/SWE6Zcmd#a361ba3a-9c0b-47f5-be21-58202dd6c804 \nand a MATLAB App that provides a graphical interface to that same API.\n\n# Table of Contents\n1. [Using the data explorer App](#using-the-data-explorer-app)\n2. [Create a Connection](#creata-a-connection)\n3. [Exploring the databases](#exploring-the-databases)\n4. [Working with the IAM Timeseries](#working-with-the-iiasa-timeseries)\n\n## Using the data explorer App\n\nThe repository contains a MATLAB app that contains a visual interface to some limited access to the API. For a full \"dataset\" availability using the programmatic way is probably a better alternative. To Launch the app, you only need to run the command below directly into MATLAB.\n\n    IAMDataExplorer\n    \n![](tbx/doc/HowTo.gif)\n\nThe app will load the NGFS scenario by default, but this can be changed at will.\n\n## Create a Connection\n\nProgramatically, the connection to the IIASA database can be created with a default selected scenario or completely empty. To connect to a specific scenario, please select the product name (e.g. \"IXSE_NGFS\"), the scheme (e.g. \"IXMP Scenario Explorer SPA UI\"), the environment (e.g. \"ngfs\"), or the product name (e.g. \"NGFS Scenario Explorer\"). For example:\n\n    c = iam.data.IIASAConnection('ngfs');\n\nAt any point in time, a user can view all the available environments in the database:\n\n    c.getEnvironments()\n\n## Exploring the databases\n\nAlthough the Connection class allows you to perform various REST calls, the best way to explore a database is to use the environment class:\n\n    e = iam.IAMEnvironment(c)\n\nThis object loads by default all the available Models, Scenarios, Variables, Regions and Runs in the database (not the actual timeseries). For example, you can view all the models by running:\n\n    head(e.Variables)\n    head(e.Models)\n\nThe environment also allows you to change the underlying database:\n\n    e.changeEnvironment('iamc15');\n    disp(e)\n\n## Query datasets\n\nThere are different options to query and select timeseries within the database:\n\n### Both Model and Scenario are known\n\nIn that case, one can request all the information from the database:\n\n    data = e.getTimeSeries('model',\"GCAM 5.2\",'scenario','Current policies (Hot house world, Rep)')\n\nHowever, this query can be quite length as there are many different variables and regions that will be requested. Alternatively, the data can be filtered down by \"regions\" and \"variables as:\n\n    ts = e.getTimeSeries('model','AIM/CGE 2.0','scenario','ADVANCE_2020_1.5C-2100','regions','World','Variables','Emissions|CO2')\n\nThe data returned by the server is always stored in an array of IAM Timeseries objects. Each of these objects will allow you to automatically plot the data by running:\n\n    ts.plot('LineWidth');\n\n### Query by variable / region:\n\nIf neither model or scenario are known, it is also possible to query the data using only the filter values, for example:\n\n    e.changeEnvironment('ngfs');\n\n    ts = e.getTimeSeries('variables',\"Emissions|CO\", 'regions', \"World\");\n    [ts.Variable]'\n\n    ts(1:2).plot();\n\nFor simplicity, the legend will only plot those variables that are different in each curve. For example, the previous plot have equal model, scenario, run, and region. So the legend only reports the different variable.\n\n### Strict versus relaxed queries\n\nBy default, the queries will report any partial match to the dataset you enter. For example, the previous query returned all variables containing Emissions|CO. However, if we wanted a strict match to our inputs we could run:\n\n    ts = e.getTimeSeries('variables',\"Emissions|CO\", 'regions', \"World\", 'strict',true);\n    ts(1:2).plot();\n\n### Filtering variables\n\nThe getTimeSeries only accepts a single \"strict\" command. However, we can still manually filter our results by running:\n\n    e.filterVariables('emissions',false)\n    e.filterVariables('Emissions|CO',true)\n\nThis same process can be done with regions\n\n    e.filterRegions('japan',false)\n    e.filterRegions('State of Japan',true)\n\nand with model/scenarios to find out exact runs:\n\n    runs = e.filterRuns('model','GCAM','scenario','immediate','strict',false);\n    e.RunList(ismember(e.RunList.run_id,runs),1:8)\n\n## Working with the IAM Timeseries\n\n### Plotting Data\n\nA stack of IAMTimeseries objects can be plot in two main ways: line and bar plots. All plotting functions have two outputs: the array of graphics objects, and the legend.\n\n#### Line Plots\n\nThe data in the object can be plotted as a set of line plots. The plot function accepts the exact same options as the standard plot function in MATLAB. For example:\n\n    figure;\n    ts(1:2).plot('LineWidth',2);\n\n#### Bar Plots\n\nAlternatively, the data in the object can also be plotted as a set of bar plots. The bar funciton accepts the exact same options as the standard bar function in MATLAB.\n\n    figure;\n    [~,l] = ts(1).bar();\n    l.Location = 'northeast';\n\nOne useful utility consists in making a stack plot of several data. For example:\n\n    figure;\n    [h,l] = bar(ts(1:2),'stacked');\n    l.Location = 'northeast';\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks%2Fclimate-iam-explorer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathworks%2Fclimate-iam-explorer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks%2Fclimate-iam-explorer/lists"}