Plot Regional DataΒΆ

../_images/sphx_glr_plot_regions_001.png

Out:

model scenario region    ...          unit  year     value
0  MESSAGE-GLOBIOM  SSP2-26    ABW    ...     Mt CO2/yr  2050   159.556
1  MESSAGE-GLOBIOM  SSP2-26    AFG    ...     Mt CO2/yr  2050  5874.171
2  MESSAGE-GLOBIOM  SSP2-26    AGO    ...     Mt CO2/yr  2050  3111.971
3  MESSAGE-GLOBIOM  SSP2-26    AIA    ...     Mt CO2/yr  2050   159.556
4  MESSAGE-GLOBIOM  SSP2-26    ALA    ...     Mt CO2/yr  2050  5387.476

[5 rows x 7 columns]

import matplotlib.pyplot as plt
import pyam

fname = 'data.csv'

df = pyam.IamDataFrame(fname, encoding='ISO-8859-1')

df = (df
      .filter({'variable': 'Emissions|CO2', 'year': 2050})
      .filter({'region': 'World'}, keep=False)
      .map_regions('iso', region_col='R5_region')
      )

print(df.head())

df.region_plot()

plt.show()

Total running time of the script: ( 0 minutes 1.311 seconds)

Gallery generated by Sphinx-Gallery