<jupyter_start><jupyter_text>pull the data from fig 2.9 (ccs by type) with scenario information<jupyter_code>import pandas as pd
import numpy as np
import warnings
import io
import itertools
import yaml
import math
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
plt.style.use('style_sr15.mplstyle')
%matplotlib inline
import pyam
sr1p5 = pyam.IamDataFrame(data='../data/iamc15_scenario_data_world_r1.1.xlsx')
sr1p5.load_metadata('../data/sr15_metadata_indicators.xlsx')
with open("sr15_specs.yaml", 'r') as stream:
    specs = yaml.load(stream, Loader=yaml.FullLoader)

rc = pyam.run_control()
for item in specs.pop('run_control').items():
    rc.update({item[0]: item[1]})
cats = specs.pop('cats')
all_cats = specs.pop('all_cats')
subcats = specs.pop('subcats')
all_subcats = specs.pop('all_subcats')
cats_15 = specs.pop('cats_15')
cats_15_no_lo = specs.pop('cats_15_no_lo')
marker= specs.pop('marker')
plotting_args = specs.pop('plotting_args')
# 3a

sr1p5.meta.rename(columns={'Kyoto-GHG|2010 (SAR)': 'kyoto_ghg_2010'}, inplace=True)
df = sr1p5.filter(category=cats_15, kyoto_ghg_2010='in range')
df.set_meta(meta='1.5C limited overshoot', name='supercategory', index=df.filter(category=cats_15_no_lo))
rc.update({'color': {'supercategory': {'1.5C limited overshoot': 'xkcd:bluish'}}})
filter_args = dict(df=df, category=cats, marker=None, join_meta=True)
# 2.9
df = sr1p5.filter(category=cats_15)
filter_args = dict(df=sr1p5, category=cats, marker=None, join_meta=True)
co2 = df.filter(variable='Emissions|CO2').timeseries()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1526813880126183, 'fraction_numerical': 0.038485804416403785, 'mean_word_length': 7.572972972972973, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '387446', 'license': 'Apache-2.0', 'n_tokens_mistral': 672, 'n_tokens_neox': 611, 'n_words': 111, 'path': 'assessment/rc_PullData.ipynb', 'repo_name': 'rciez2125/IPCCScenarioAnalysis', 'size': '1585'}