<jupyter_start><jupyter_text>Both together<jupyter_code>uk_capacity_long
ireland_capacity_long

both_capacity_long = uk_capacity_long.merge(ireland_capacity_long, on=["index",'variable'])
both_capacity_long['value_both'] = both_capacity_long['value_x'] +  both_capacity_long['value_y']
# both_capacity_long

sns.lineplot(data=both_capacity_long, x="index", y="value_both", hue="variable")
plt.legend(loc=(1.04,0))
plt.axvline(x=2017, color="black")
both_capacity_long.to_csv("/Users/alexanderkell/Documents/PhD/Projects/17-ftt-power-reinforcement/notebooks/data/processed/both_capacity_long.csv")

sns.lineplot(data=both_capacity_long[both_capacity_long['index']>2017], x="index", y="value_both", hue="variable")
plt.legend(loc=(1.04,0))

uk_capacity_long
ireland_capacity_long

both_capacity_long = uk_capacity_long.merge(ireland_capacity_long, on=["index",'variable'])
both_capacity_long['value_both'] = both_capacity_long['value_x'] +  both_capacity_long['value_y']
both_capacity_long
sns.lineplot(data=both_capacity_long[(both_capacity_long['index']>60) & (both_capacity_long['value_both']>1)], x="index", y="value_both", hue="variable")
plt.legend(loc=(1.04,0))


plt.plot(both_capacity_long[both_capacity_long['index']>2017].groupby("index").value_both.sum())
sns.lineplot(data=both_capacity_long[(both_capacity_long['index']<200) & (both_capacity_long['value_both']>2)], x="index", y="value_both", hue="variable")
plt.legend(loc=(1.04,0))<jupyter_output><empty_output><jupyter_text>Market Share<jupyter_code>def get_data(filename):
    plants = ["index","Nuclear", "Oil", "Coal", "Coal + CCS", "IGCC", "IGCC + CCS", "CCGT", "CCGT + CCS", "Solid Biomass", 'S Biomass CCS', "BIGCC", "BIGCC + CCS", "Biogas", "Biogas + CCS", "Tidal", "Large Hydro", "Onshore", "Offshore", 'Solar PV', "CSP", "Geothermal", "Wave", "Fuel Cells", "CHP"]

    results =  pd.read_csv("/Users/alexanderkell/Documents/PhD/Projects/17-ftt-power-reinforcement/data/outputs/{}.csv".format(filename), names=list(range(48)))
    uk_result = results.iloc[:,0:24].reset_index()
    ireland_result = results.iloc[:,24:].reset_index()

    uk_result.columns = plants
    ireland_result.columns = plants
    
    ireland_capacity_long = pd.melt(ireland_result, id_vars="index")
    uk_capacity_long = pd.melt(uk_result, id_vars="index")
    
    return (uk_capacity_long, ireland_capacity_long)
    
    
uk_market_share, ireland_market_share = get_data("market_share")
sns.lineplot(data=uk_market_share, x="index", y="value", hue="variable")
sns.lineplot(data=ireland_market_share, x="index", y="value", hue="variable")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17251908396946564, 'fraction_numerical': 0.017557251908396947, 'mean_word_length': 8.928030303030303, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 14, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '514154', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 1029, 'n_tokens_neox': 970, 'n_words': 114, 'path': 'notebooks/2.0-ajmk-visualising-results.ipynb', 'repo_name': 'alexanderkell/reinforcement-learning-investment-FTT-Power', 'size': '2620'}