Adrien Banse commited on
Commit
f236326
โ€ข
1 Parent(s): 9c47a26

feat: existing electricity mixes

Browse files
Files changed (3) hide show
  1. app.py +31 -8
  2. data/electricity_mix.csv +4 -0
  3. data/mixes.py +154 -0
app.py CHANGED
@@ -1,7 +1,8 @@
1
- from typing import Optional
2
  import gradio as gr
3
  from pint import UnitRegistry
4
 
 
 
5
  from ecologits.tracers.utils import compute_llm_impacts, _avg
6
  from ecologits.impacts.llm import compute_llm_impacts as compute_llm_impacts_expert
7
  from ecologits.impacts.llm import IF_ELECTRICITY_MIX_GWP, IF_ELECTRICITY_MIX_ADPE, IF_ELECTRICITY_MIX_PE
@@ -48,7 +49,6 @@ MODELS = [
48
  ("Cohere / Command R+", "cohere/command-r-plus"),
49
  ]
50
 
51
-
52
  PROMPTS = [
53
  ("Write a Tweet", 50),
54
  ("Write an email", 170),
@@ -146,6 +146,11 @@ def model_total_params_fn(model_name: str, n_param: float):
146
  model = models.find_model(provider=provider, model_name=model_name)
147
  return model.total_parameters or _avg(model.total_parameters_range)
148
 
 
 
 
 
 
149
  with gr.Blocks() as demo:
150
 
151
  ### TITLE
@@ -244,18 +249,34 @@ with gr.Blocks() as demo:
244
  label="Output tokens",
245
  value=100
246
  )
247
- mix_gwp = gr.Number(
248
- label="Electricity mix - GHG emissions [kgCO2eq / kWh]",
249
- value=IF_ELECTRICITY_MIX_GWP
 
 
 
 
250
  )
251
  mix_adpe = gr.Number(
252
  label="Electricity mix - Abiotic resources [kgSbeq / kWh]",
253
- value=IF_ELECTRICITY_MIX_ADPE
 
254
  )
255
  mix_pe = gr.Number(
256
  label="Electricity mix - Primary energy [MJ / kWh]",
257
- value=IF_ELECTRICITY_MIX_PE
 
 
 
 
 
 
258
  )
 
 
 
 
 
259
 
260
  with gr.Row():
261
  energy = gr.Markdown(
@@ -314,7 +335,9 @@ with gr.Blocks() as demo:
314
 
315
  ### METHOD QUICK EXPLANATION
316
  with gr.Tab('Methodology'):
317
- gr.Markdown("""๐Ÿ“– Coming soon""")
 
 
318
 
319
  ### INFORMATION ABOUT INDICATORS
320
  with gr.Accordion("๐Ÿ“Š More about the indicators", open = False):
 
 
1
  import gradio as gr
2
  from pint import UnitRegistry
3
 
4
+ from data.mixes import MIXES, find_mix
5
+
6
  from ecologits.tracers.utils import compute_llm_impacts, _avg
7
  from ecologits.impacts.llm import compute_llm_impacts as compute_llm_impacts_expert
8
  from ecologits.impacts.llm import IF_ELECTRICITY_MIX_GWP, IF_ELECTRICITY_MIX_ADPE, IF_ELECTRICITY_MIX_PE
 
49
  ("Cohere / Command R+", "cohere/command-r-plus"),
50
  ]
51
 
 
52
  PROMPTS = [
53
  ("Write a Tweet", 50),
54
  ("Write an email", 170),
 
146
  model = models.find_model(provider=provider, model_name=model_name)
147
  return model.total_parameters or _avg(model.total_parameters_range)
148
 
149
+ def mix_fn(country_code: str, mix_adpe: float, mix_pe: float, mix_gwp: float):
150
+ if country_code == CUSTOM:
151
+ return mix_gwp, mix_adpe, mix_pe
152
+ return find_mix(country_code)
153
+
154
  with gr.Blocks() as demo:
155
 
156
  ### TITLE
 
249
  label="Output tokens",
250
  value=100
251
  )
252
+
253
+ mix = gr.Dropdown(
254
+ MIXES + [CUSTOM],
255
+ label="Location",
256
+ value="WOR",
257
+ filterable=True,
258
+ interactive=True
259
  )
260
  mix_adpe = gr.Number(
261
  label="Electricity mix - Abiotic resources [kgSbeq / kWh]",
262
+ value=IF_ELECTRICITY_MIX_ADPE,
263
+ interactive=True
264
  )
265
  mix_pe = gr.Number(
266
  label="Electricity mix - Primary energy [MJ / kWh]",
267
+ value=IF_ELECTRICITY_MIX_PE,
268
+ interactive=True
269
+ )
270
+ mix_gwp = gr.Number(
271
+ label="Electricity mix - GHG emissions [kgCO2eq / kWh]",
272
+ value=IF_ELECTRICITY_MIX_GWP,
273
+ interactive=True
274
  )
275
+
276
+ mix.change(fn=mix_fn, inputs=[mix, mix_adpe, mix_pe, mix_gwp], outputs=[mix_adpe, mix_pe, mix_gwp])
277
+ mix_adpe.input(fn=custom, outputs=mix)
278
+ mix_pe.input(fn=custom, outputs=mix)
279
+ mix_gwp.input(fn=custom, outputs=mix)
280
 
281
  with gr.Row():
282
  energy = gr.Markdown(
 
335
 
336
  ### METHOD QUICK EXPLANATION
337
  with gr.Tab('Methodology'):
338
+ gr.Markdown("""## ๐Ÿ“– Methodology
339
+ ๐Ÿšง Under construction
340
+ """)
341
 
342
  ### INFORMATION ABOUT INDICATORS
343
  with gr.Accordion("๐Ÿ“Š More about the indicators", open = False):
data/electricity_mix.csv ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ name,unit,source,WOR,EEE,ZWE,ZMB,ZAF,YEM,VNM,VEN,UZB,URY,USA,UKR,TZA,TWN,TTO,TUR,TUN,TKM,TJK,THA,TGO,SYR,SLV,SEN,SVK,SVN,SGP,SWE,SDN,SAU,RUS,SCG,ROU,QAT,PRY,PRT,POL,PAK,PHL,PER,PAN,OMN,NZL,NPL,NOR,NLD,NIC,NGA,NAM,MOZ,MYS,MEX,MLT,MNG,MMR,MKD,MDA,MAR,LBY,LVA,LUX,LTU,LKA,LBN,KAZ,KWT,KOR,PRK,KHM,KGZ,KEN,JPN,JOR,JAM,ITA,ISL,IRN,IRQ,IND,ISR,IRL,IDN,HUN,HTI,HRV,HND,HKG,GTM,GRC,GIB,GHA,GEO,GBR,GAB,FRA,FIN,ETH,ESP,ERI,EGY,EST,ECU,DZA,DOM,DNK,DEU,CZE,CYP,CUB,CRI,COL,CHN,CMR,CHL,CIV,CHE,COG,COD,CAN,BLR,BWA,BRA,BOL,BRN,BEN,BHR,BGR,BEL,BGD,BIH,AZE,AUS,AUT,ARG,AGO,ANT,ARM,ALB,ARE
2
+ adpe,kg รฉq. Sb,ADEME Base IMPACTS ยฎ,0.0000000737708,0.0000000642317,0.000000109502,0.000000162193,0.0000000862445,0.0000000163908,0.0000000945573,0.000000112811,0.000000103681,0.000000104586,0.0000000985548,0.0000000647907,0.000000132261,0.0000000578088,0.000000064552,0.0000000749765,0.0000000177021,0.000000131822,0.000000152621,0.0000000569593,0.000000134255,0.0000000268396,0.0000000472135,0.0000000470662,0.0000000606109,0.0000000992283,0.0000000198459,0.0000000777062,0.0000000955701,0.0000000134206,0.0000000960312,0.000000132772,0.0000000981761,0.00000001324,0.000000149181,0.0000000341863,0.000000101946,0.0000000842952,0.0000000595304,0.0000000952688,0.0000000790553,0.0000000374073,0.0000000720474,0.000000238273,0.000000127486,0.0000000329318,0.0000000414983,0.0000000621,0.000000128285,0.000000148382,0.000000044938,0.0000000578358,0.000000049475,0.000000176361,0.000000152699,0.000000119873,0.000000110674,0.0000000641089,0.0000000206592,0.000000153757,0.000000105692,0.0000000294596,0.0000000986932,0.0000000182134,0.000000135386,0.0000000141168,0.0000000518017,0.000000117457,0.0000000319202,0.000000181827,0.0000000958533,0.0000000596578,0.0000000147031,0.0000000196047,0.00000005439,0.0000000781905,0.0000000220304,0.0000000404306,0.000000100099,0.0000000610194,0.0000000219257,0.0000000610451,0.0000000644587,0.0000000937057,0.000000153989,0.0000000649373,0.0000000816213,0.0000000803251,0.0000000691645,0.0000000286211,0.000000156003,0.000000137999,0.0000000370973,0.000000113843,0.0000000485798,0.0000000805114,0.000000174161,0.0000000518326,0.0000000512406,0.000000033925,0.0000000990171,0.000000127168,0.0000000216438,0.0000000429285,0.0000000157411,0.0000000878733,0.0000000817565,0.0000000448771,0.0000000299542,0.0000000863908,0.000000122031,0.0000000851552,0.000000146313,0.000000105851,0.0000000949004,0.000000100467,0.000000265575,0.000000174647,0.0000000993179,0.0000000840478,0.0000000866014,0.00000010962,0.0000000969793,0.0000000185641,0.0000000239702,0.0000000135014,0.0000000823611,0.0000000337201,0.0000000394158,0.000000148007,0.000000092567,0.0000000790846,0.000000141124,0.0000000768612,0.000000124074,0.0000000449103,0.0000000854245,0.000000229556,0.0000000141548
3
+ pe,MJ,ADPf / (1-%renewable_energy),9.988,12.873,16.122,1.798,11.732,16.250,11.238,15.163,17.367,107.570,11.358,12.936,9.305,11.439,14.289,16.150,12.902,23.300,19.165,10.414,21.978,16.989,13.012,14.516,11.680,12.146,10.477,11.026,29.629,14.058,13.200,14.242,15.585,11.916,0.020,14.153,13.178,16.175,11.120,8.211,16.364,22.306,24.731,0.396,4.952,8.511,24.696,11.279,468.150,0.206,12.268,11.775,19.374,15.114,14.132,19.120,18.429,11.702,19.116,8.249,10.128,21.043,12.116,12.341,13.260,12.753,10.199,32.793,34.655,15.380,68.996,10.718,13.677,14.799,12.656,0.013,15.022,20.372,20.363,10.023,10.706,11.603,11.784,20.167,18.548,15.762,,14.340,14.487,,10.097,10.425,13.579,28.341,11.289,11.275,36.133,12.090,13.289,10.195,16.334,20.908,16.376,12.412,16.824,16.260,12.517,13.118,17.317,45.996,7.312,14.119,10.807,11.348,14.783,11.782,34.147,0.097,11.987,13.194,19.642,9.031,11.587,15.689,14.337,14.036,14.375,10.776,12.935,21.705,12.831,16.908,11.036,10.049,16.972,,13.380,0.201,19.032
4
+ gwp,kg รฉq. CO2,ADEME Base IMPACTS ยฎ,0.590478,0.509427,0.842811,0.0141304,1.17562,1.06777,0.555572,0.497373,0.81178,0.296953,0.67978,0.646745,0.475635,0.845351,0.933059,0.706988,0.80722,1.38296,0.0426743,0.646174,0.545455,1.08778,0.473128,1.1195,0.309341,0.498523,0.655825,0.0464664,1.12472,0.913677,0.66131,1.07808,0.664245,0.722125,0.241601,0.571172,1.15075,0.748727,0.761317,0.284364,0.53403,1.41292,0.293397,0.0841323,0.023754,0.544803,0.941626,0.693123,0.357253,0.00880732,0.832206,0.739214,1.31149,1.47192,0.48193,1.24074,1.04213,0.933694,1.35361,0.234273,0.490016,0.154229,0.709185,0.883627,1.128,0.885084,0.599585,0.797361,1.41054,0.156039,0.589603,0.540891,0.781372,1.07345,0.621329,0.0194609,0.930385,1.48728,1.58299,0.901842,0.648118,0.875394,0.541558,1.3858,0.535759,0.692837,0.95888,0.645801,1.13127,0.977477,0.540126,0.132046,0.602137,0.732511,0.0813225,0.322068,0.251299,0.467803,1.13153,0.587775,1.51492,0.627714,1.02318,0.909252,0.633534,0.657374,0.799077,0.978041,1.28325,0.224471,0.214014,1.05738,0.456622,0.574415,0.928583,0.0448568,0.904053,0.0613102,0.238191,0.795697,2.12572,0.278647,0.585131,0.997577,1.19128,0.804567,0.827087,0.256537,0.795168,1.56025,0.726126,1.12326,0.245573,0.476811,0.412014,1.13161,0.252002,0.0207635,1.09088
data/mixes.py ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from csv import DictReader
2
+
3
+ PATH = "data/electricity_mix.csv"
4
+ MIXES = [
5
+ ("๐ŸŒŽ World", "WOR"),
6
+ ("๐Ÿ‡ช๐Ÿ‡บ Europe", "EEE"),
7
+ ("๐Ÿ‡ฟ๐Ÿ‡ผ Zimbabwe", "ZWE"),
8
+ ("๐Ÿ‡ฟ๐Ÿ‡ฒ Zambia", "ZMB"),
9
+ ("๐Ÿ‡ฟ๐Ÿ‡ฆ South Africa", "ZAF"),
10
+ ("๐Ÿ‡พ๐Ÿ‡ช Yemen", "YEM"),
11
+ ("๐Ÿ‡ป๐Ÿ‡ณ Vietnam", "VNM"),
12
+ ("๐Ÿ‡ป๐Ÿ‡ช Venezuela", "VEN"),
13
+ ("๐Ÿ‡บ๐Ÿ‡ฟ Uzbekistan", "UZB"),
14
+ ("๐Ÿ‡บ๐Ÿ‡พ Uruguay", "URY"),
15
+ ("๐Ÿ‡บ๐Ÿ‡ธ United States", "USA"),
16
+ ("๐Ÿ‡บ๐Ÿ‡ฆ Ukraine", "UKR"),
17
+ ("๐Ÿ‡น๐Ÿ‡ฟ Tanzania", "TZA"),
18
+ ("๐Ÿ‡น๐Ÿ‡ผ Taiwan", "TWN"),
19
+ ("๐Ÿ‡น๐Ÿ‡น Trinidad and Tobago", "TTO"),
20
+ ("๐Ÿ‡น๐Ÿ‡ท Turkey", "TUR"),
21
+ ("๐Ÿ‡น๐Ÿ‡ณ Tunisia", "TUN"),
22
+ ("๐Ÿ‡น๐Ÿ‡ฒ Turkmenistan", "TKM"),
23
+ ("๐Ÿ‡น๐Ÿ‡ฏ Tajikistan", "TJK"),
24
+ ("๐Ÿ‡น๐Ÿ‡ญ Thailand", "THA"),
25
+ ("๐Ÿ‡น๐Ÿ‡ฌ Togo", "TGO"),
26
+ ("๐Ÿ‡ธ๐Ÿ‡พ Syrian Arab Republic", "SYR"),
27
+ ("๐Ÿ‡ธ๐Ÿ‡ป El Salvador", "SLV"),
28
+ ("๐Ÿ‡ธ๐Ÿ‡ณ Senegal", "SEN"),
29
+ ("๐Ÿ‡ธ๐Ÿ‡ฐ Slovak Republic", "SVK"),
30
+ ("๐Ÿ‡ธ๐Ÿ‡ฎ Slovenia", "SVN"),
31
+ ("๐Ÿ‡ธ๐Ÿ‡ฌ Singapore", "SGP"),
32
+ ("๐Ÿ‡ธ๐Ÿ‡ช Sweden", "SWE"),
33
+ ("๐Ÿ‡ธ๐Ÿ‡ฉ Sudan", "SDN"),
34
+ ("๐Ÿ‡ธ๐Ÿ‡ฆ Saudi Arabia", "SAU"),
35
+ ("๐Ÿ‡ท๐Ÿ‡บ Russian Federation", "RUS"),
36
+ ("๐Ÿ‡ท๐Ÿ‡ธ Serbia and Montenegro", "SCG"),
37
+ ("๐Ÿ‡ท๐Ÿ‡ด Romania", "ROU"),
38
+ ("๐Ÿ‡ถ๐Ÿ‡ฆ Qatar", "QAT"),
39
+ ("๐Ÿ‡ต๐Ÿ‡พ Paraguay", "PRY"),
40
+ ("๐Ÿ‡ต๐Ÿ‡น Portugal", "PRT"),
41
+ ("๐Ÿ‡ต๐Ÿ‡ฑ Poland", "POL"),
42
+ ("๐Ÿ‡ต๐Ÿ‡ฐ Pakistan", "PAK"),
43
+ ("๐Ÿ‡ต๐Ÿ‡ญ Philippines", "PHL"),
44
+ ("๐Ÿ‡ต๐Ÿ‡ช Peru", "PER"),
45
+ ("๐Ÿ‡ต๐Ÿ‡ฆ Panama", "PAN"),
46
+ ("๐Ÿ‡ด๐Ÿ‡ฒ Oman", "OMN"),
47
+ ("๐Ÿ‡ณ๐Ÿ‡ฟ New Zealand", "NZL"),
48
+ ("๐Ÿ‡ณ๐Ÿ‡ต Nepal", "NPL"),
49
+ ("๐Ÿ‡ณ๐Ÿ‡ด Norway", "NOR"),
50
+ ("๐Ÿ‡ณ๐Ÿ‡ฑ Netherlands", "NLD"),
51
+ ("๐Ÿ‡ณ๐Ÿ‡ฎ Nicaragua", "NIC"),
52
+ ("๐Ÿ‡ณ๐Ÿ‡ฌ Nigeria", "NGA"),
53
+ ("๐Ÿ‡ณ๐Ÿ‡ฆ Namibia", "NAM"),
54
+ ("๐Ÿ‡ฒ๐Ÿ‡ฟ Mozambique", "MOZ"),
55
+ ("๐Ÿ‡ฒ๐Ÿ‡พ Malaysia", "MYS"),
56
+ ("๐Ÿ‡ฒ๐Ÿ‡ฝ Mexico", "MEX"),
57
+ ("๐Ÿ‡ฒ๐Ÿ‡น Malta", "MLT"),
58
+ ("๐Ÿ‡ฒ๐Ÿ‡ณ Mongolia", "MNG"),
59
+ ("๐Ÿ‡ฒ๐Ÿ‡ฒ Myanmar", "MMR"),
60
+ ("๐Ÿ‡ฒ๐Ÿ‡ฐ North Macedonia", "MKD"),
61
+ ("๐Ÿ‡ฒ๐Ÿ‡ฉ Moldova", "MDA"),
62
+ ("๐Ÿ‡ฒ๐Ÿ‡ฆ Morocco", "MAR"),
63
+ ("๐Ÿ‡ฑ๐Ÿ‡พ Libya", "LBY"),
64
+ ("๐Ÿ‡ฑ๐Ÿ‡ป Latvia", "LVA"),
65
+ ("๐Ÿ‡ฑ๐Ÿ‡บ Luxembourg", "LUX"),
66
+ ("๐Ÿ‡ฑ๐Ÿ‡น Lithuania", "LTU"),
67
+ ("๐Ÿ‡ฑ๐Ÿ‡ฐ Sri Lanka", "LKA"),
68
+ ("๐Ÿ‡ฑ๐Ÿ‡ง Lebanon", "LBN"),
69
+ ("๐Ÿ‡ฐ๐Ÿ‡ฟ Kazakhstan", "KAZ"),
70
+ ("๐Ÿ‡ฐ๐Ÿ‡ผ Kuwait", "KWT"),
71
+ ("๐Ÿ‡ฐ๐Ÿ‡ท South Korea", "KOR"),
72
+ ("๐Ÿ‡ฐ๐Ÿ‡ต North Korea", "PRK"),
73
+ ("๐Ÿ‡ฐ๐Ÿ‡ญ Cambodia", "KHM"),
74
+ ("๐Ÿ‡ฐ๐Ÿ‡ฌ Kyrgyz Republic", "KGZ"),
75
+ ("๐Ÿ‡ฐ๐Ÿ‡ช Kenya", "KEN"),
76
+ ("๐Ÿ‡ฏ๐Ÿ‡ต Japan", "JPN"),
77
+ ("๐Ÿ‡ฏ๐Ÿ‡ด Jordan", "JOR"),
78
+ ("๐Ÿ‡ฏ๐Ÿ‡ฒ Jamaica", "JAM"),
79
+ ("๐Ÿ‡ฎ๐Ÿ‡น Italy", "ITA"),
80
+ ("๐Ÿ‡ฎ๐Ÿ‡ธ Iceland", "ISL"),
81
+ ("๐Ÿ‡ฎ๐Ÿ‡ท Iran", "IRN"),
82
+ ("๐Ÿ‡ฎ๐Ÿ‡ถ Iraq", "IRQ"),
83
+ ("๐Ÿ‡ฎ๐Ÿ‡ณ India", "IND"),
84
+ ("๐Ÿ‡ฎ๐Ÿ‡ฑ Israel", "ISR"),
85
+ ("๐Ÿ‡ฎ๐Ÿ‡ช Ireland", "IRL"),
86
+ ("๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia", "IDN"),
87
+ ("๐Ÿ‡ญ๐Ÿ‡บ Hungary", "HUN"),
88
+ ("๐Ÿ‡ญ๐Ÿ‡น Haiti", "HTI"),
89
+ ("๐Ÿ‡ญ๐Ÿ‡ท Croatia", "HRV"),
90
+ ("๐Ÿ‡ญ๐Ÿ‡ณ Honduras", "HND"),
91
+ ("๐Ÿ‡ญ๐Ÿ‡ฐ Hong Kong", "HKG"),
92
+ ("๐Ÿ‡ฌ๐Ÿ‡น Guatemala", "GTM"),
93
+ ("๐Ÿ‡ฌ๐Ÿ‡ท Greece", "GRC"),
94
+ ("๐Ÿ‡ฌ๐Ÿ‡ฎ Gibraltar", "GIB"),
95
+ ("๐Ÿ‡ฌ๐Ÿ‡ญ Ghana", "GHA"),
96
+ ("๐Ÿ‡ฌ๐Ÿ‡ช Georgia", "GEO"),
97
+ ("๐Ÿ‡ฌ๐Ÿ‡ง United Kingdom", "GBR"),
98
+ ("๐Ÿ‡ฌ๐Ÿ‡ฆ Gabon", "GAB"),
99
+ ("๐Ÿ‡ซ๐Ÿ‡ท France", "FRA"),
100
+ ("๐Ÿ‡ซ๐Ÿ‡ฎ Finland", "FIN"),
101
+ ("๐Ÿ‡ช๐Ÿ‡น Ethiopia", "ETH"),
102
+ ("๐Ÿ‡ช๐Ÿ‡ธ Spain", "ESP"),
103
+ ("๐Ÿ‡ช๐Ÿ‡ท Eritrea", "ERI"),
104
+ ("๐Ÿ‡ช๐Ÿ‡ฌ Egypt", "EGY"),
105
+ ("๐Ÿ‡ช๐Ÿ‡ช Estonia", "EST"),
106
+ ("๐Ÿ‡ช๐Ÿ‡จ Ecuador", "ECU"),
107
+ ("๐Ÿ‡ฉ๐Ÿ‡ฟ Algeria", "DZA"),
108
+ ("๐Ÿ‡ฉ๐Ÿ‡ด Dominican Republic", "DOM"),
109
+ ("๐Ÿ‡ฉ๐Ÿ‡ฐ Denmark", "DNK"),
110
+ ("๐Ÿ‡ฉ๐Ÿ‡ช Germany", "DEU"),
111
+ ("๐Ÿ‡จ๐Ÿ‡ฟ Czech Republic", "CZE"),
112
+ ("๐Ÿ‡จ๐Ÿ‡พ Cyprus", "CYP"),
113
+ ("๐Ÿ‡จ๐Ÿ‡บ Cuba", "CUB"),
114
+ ("๐Ÿ‡จ๐Ÿ‡ท Costa Rica", "CRI"),
115
+ ("๐Ÿ‡จ๐Ÿ‡ด Colombia", "COL"),
116
+ ("๐Ÿ‡จ๐Ÿ‡ณ China", "CHN"),
117
+ ("๐Ÿ‡จ๐Ÿ‡ฒ Cameroon", "CMR"),
118
+ ("๐Ÿ‡จ๐Ÿ‡ฑ Chile", "CHL"),
119
+ ("๐Ÿ‡จ๐Ÿ‡ฎ Cote d'Ivoire", "CIV"),
120
+ ("๐Ÿ‡จ๐Ÿ‡ญ Switzerland", "CHE"),
121
+ ("๐Ÿ‡จ๐Ÿ‡ฌ Congo", "COG"),
122
+ ("๐Ÿ‡จ๐Ÿ‡ฉ Democratic Republic of the Congo", "COD"),
123
+ ("๐Ÿ‡จ๐Ÿ‡ฆ Canada", "CAN"),
124
+ ("๐Ÿ‡ง๐Ÿ‡พ Belarus", "BLR"),
125
+ ("๐Ÿ‡ง๐Ÿ‡ผ Botswana", "BWA"),
126
+ ("๐Ÿ‡ง๐Ÿ‡ท Brazil", "BRA"),
127
+ ("๐Ÿ‡ง๐Ÿ‡ด Bolivia", "BOL"),
128
+ ("๐Ÿ‡ง๐Ÿ‡ณ Brunei", "BRN"),
129
+ ("๐Ÿ‡ง๐Ÿ‡ฏ Benin", "BEN"),
130
+ ("๐Ÿ‡ง๐Ÿ‡ญ Bahrain", "BHR"),
131
+ ("๐Ÿ‡ง๐Ÿ‡ฌ Bulgaria", "BGR"),
132
+ ("๐Ÿ‡ง๐Ÿ‡ช Belgium", "BEL"),
133
+ ("๐Ÿ‡ง๐Ÿ‡ฉ Bangladesh", "BGD"),
134
+ ("๐Ÿ‡ง๐Ÿ‡ฆ Bosnia and Herzegovina", "BIH"),
135
+ ("๐Ÿ‡ฆ๐Ÿ‡ฟ Azerbaijan", "AZE"),
136
+ ("๐Ÿ‡ฆ๐Ÿ‡บ Australia", "AUS"),
137
+ ("๐Ÿ‡ฆ๐Ÿ‡น Austria", "AUT"),
138
+ ("๐Ÿ‡ฆ๐Ÿ‡ท Argentina", "ARG"),
139
+ ("๐Ÿ‡ฆ๐Ÿ‡ด Angola", "AGO"),
140
+ ("๐Ÿ‡ฆ Netherlands Antilles", "ANT"),
141
+ ("๐Ÿ‡ฆ๐Ÿ‡ฒ Armenia", "ARM"),
142
+ ("๐Ÿ‡ฆ๐Ÿ‡ฑ Albania", "ALB"),
143
+ ("๐Ÿ‡ฆ๐Ÿ‡ช United Arab Emirates", "ARE")
144
+ ]
145
+
146
+ def find_mix(code: str):
147
+ # TODO: Maybe more optimal to construct database at the beginning of the app
148
+ # in the same fashion as find_model
149
+ res = []
150
+ with open(PATH) as fd:
151
+ csv = DictReader(fd)
152
+ for row in csv:
153
+ res += [float(row[code])]
154
+ return res