"""Chart III - Macro-Level Comparisons in Euros >>>
(GDP per capita,Average Gross Annual Salary, Government Expenditure per capita) translates to ...
Index(Per Capita GDP (Euros), Average gross annual salary (Euros), Public Expenditure Per Capita (€))
DATA: All must be written to new sheet from outdset_build(country)
"""#Create list of relevant figures (have to use lev distance because the euro symbol causes match problems)chart3_figures=['Per Capita GDP (Euros)','Average gross annual salary (Euros)','Public Expenditure Per Capita (€)']c3_figs=[]foriinrange(len(chart3_figures)):figs=process.extract(chart3_figures[i],outdset_build(country).index.get_level_values('figure'),limit=1)[0]c3_figs.append(figs[0])#Generate subindex to subset datachart3_index=outdset_build(country).index.get_level_values('figure').isin(c3_figs)#Subset datachart3_data=outdset_build(country)[chart3_index]#Create new sheettemp_data=jagx.add_worksheet('misc_data')#Write data to new sheettemp_data.write_row('A1',['index','EU','EU-10','CROATIA'])temp_data.write_column('A2',['Per Capita GDP','Average Gross Annual Salary',\'Public Expenditure Per Capita'])temp_data.write_column('B2',chart3_data['EU'])temp_data.write_column('C2',chart3_data['EU-10'])temp_data.write_column('D2',chart3_data[country])#Configure serieschart_list[2].add_series({'name':'EU','categories':'misc_data!A2:A4','values':'misc_data!B2:B4'})chart_list[2].add_series({'name':'EU-10','categories':'misc_data!A2:A4','values':'misc_data!C2:C4'})chart_list[2].add_series({'name':'CROATIA','categories':'misc_data!A2:A4','values':'misc_data!D2:D4'})#Add titlechart_list[2].set_title({'name':'Macro-level Comparison in Euros (per capita)','name_font':{'size':9}})