The pyam package includes the function require_variable() to check a-priori whether a variable exists. The option exclude: True marks these scenarios as "exclude" in the metadata, so that they can be easily removed from further analysis.

In [15]:

df.require_variable(variable=v,exclude=True)

INFO:root:8 scenarios do not include required variable `Temperature|Global Mean|MAGICC6|MED`, marked as `exclude: True` in metadata

We repeat the plot, this time excluding the uncategorized scenarios and using the 'temperature' metadata column to assign colors. The colors of the individual categories were defined in the function categorize() above.

Rather than plotting the development over time, it is often useful to extract and visualize key indicators. In this example, we determine the year of peak warming and plot this indicator against the cumulative CO2 emissions from 2010 until that year.