{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# First steps with the ``pyam`` package \n", "\n", "## *An open-source Python package for IAM scenario analysis and visualization*\n", "\n", "\n", "\n", "\n", "## Scope and feature overview\n", "\n", "The ``pyam`` package provides a range of diagnostic tools and functions \n", "for analyzing and working with scenario data following the IAMC template format.\n", "A comprehensive documentation of the package is available\n", "at [software.ene.iiasa.ac.at/pyam/](http://software.ene.iiasa.ac.at/pyam/)\n", "\n", "An illustrative example of the IAMC template is shown below;\n", "see [data.ene.iiasa.ac.at/database/](http://data.ene.iiasa.ac.at/database/) for more information.\n", "\n", "\n", "| **Model** | **Scenario** | **Region** | **Variable** | **Unit** | **2005** | **2010** | **2015** |\n", "|---------------------|---------------|------------|----------------|----------|----------|----------|----------|\n", "| MESSAGE V.4 | AMPERE3-Base | World | Primary Energy | EJ/y | 454.5 |\t479.6 | ... |\n", "| ... | ... | ... | ... | ... | ... | ... | ... |\n", "\n", "This notebook illustrates some basic functionality of the ``pyam`` package\n", "and the ``IamDataFrame`` class:\n", "\n", "1. Importing timeseries data from `xlsx` or `csv` files.\n", "2. Listing models, scenarios and variables included in the data.\n", "3. Display of timeseries data \n", " as [pd.DataFrame](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html).\n", "4. Visualization tools for timeseries data using the [matplotlib](https://matplotlib.org/) package.\n", "5. Evaluating the model data and executing a range of diagnostic checks for identifying outliers.\n", "6. Categorization of scenarios according to timeseries data values or checks on required variables.\n", "7. Exporting data to `xlsx` using the IAMC template.\n", "\n", "\n", "## Tutorial data\n", "\n", "The timeseries data used in this tutorial is a partial snapshot of the scenario database \n", "compiled for the IPCC's Fifth Assessment Report (AR5):\n", "\n", "> Krey V., O. Masera, G. Blanford, T. Bruckner, R. Cooke, K. Fisher-Vanden, H. Haberl, E. Hertwich, E. Kriegler, D. Mueller, S. Paltsev, L. Price, S. Schlömer, D. Ürge-Vorsatz, D. van Vuuren, and T. Zwickel, 2014: *Annex II: Metrics & Methodology*. \n", "\n", "> In: *Climate Change 2014: Mitigation of Climate Change. Contribution of Working Group III to the Fifth Assessment Report of the Intergovernmental Panel on Climate Change* [Edenhofer, O., R. Pichs-Madruga, Y. Sokona, E. Farahani, S. Kadner, K. Seyboth, A. Adler, I. Baum, S. Brunner, P. Eickemeier, B. Kriemann, J. Savolainen, S. Schlömer, C. von Stechow, T. Zwickel and J.C. Minx (eds.)]. Cambridge University Press, Cambridge, United Kingdom and New York, NY, USA. [Link](https://www.ipcc.ch/report/ar5/wg3/)\n", "\n", "The complete database is publicly available at [tntcat.iiasa.ac.at/AR5DB/](https://tntcat.iiasa.ac.at/AR5DB/).\n", "\n", "\n", "\n", "\n", "The data snapshot used for this tutorial consists of selected data from two model intercomparison projects:\n", "\n", " - Energy Modeling Forum Round 27 \n", " ([EMF27](https://emf.stanford.edu/projects/emf-27-global-model-comparison-exercise)),\n", " see the Special Issue in [Climatic Change 3-4, 2014](https://link.springer.com/journal/10584/123/3/page/1).\n", " \n", " - EU FP7 project [AMPERE](https://tntcat.iiasa.ac.at/AMPEREDB/), \n", " see the following scientific publications:\n", " \n", " > - Riahi, K., et al. (2015). \"Locked into Copenhagen pledges — Implications of short-term emission targets \n", " > for the cost and feasibility of long-term climate goals.\" \n", " > *Technological Forecasting and Social Change* 90(Part A): 8-23. \n", " > [DOI: 10.1016/j.techfore.2013.09.016](https://doi.org/10.1016/j.techfore.2013.09.016)\n", " \n", " > - Kriegler, E., et al. (2015). \"Making or breaking climate targets: The AMPERE study on \n", " > staged accession scenarios for climate policy.\"\n", " > *Technological Forecasting and Social Change* 90(Part A): 24-44. \n", " > [DOI: 10.1016/j.techfore.2013.09.021](https://doi.org/10.1016/j.techfore.2013.09.021)\n", "\n", "