Created
January 1, 2020 04:39
-
-
Save yoanisgil/aace98c70bf0fe2ef8ab33d43e5d2fe2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
values = [ | |
dict(gni_ppp=7480, life_expectancy=79.6, education_index=0.768,country='CUBA', material_footprint=8.04, co2_emissions=3.42), | |
dict(gni_ppp=21000, life_expectancy=79.6, education_index=0.768,country='CUBA', material_footprint=8.04, co2_emissions=3.42), | |
dict(gni_ppp=14086, life_expectancy=79.6, education_index=0.713,country='COSTA RICA', material_footprint=8.08, co2_emissions=2.66), | |
dict(gni_ppp=53741, life_expectancy=79.2, education_index=0.9,country='US', material_footprint=32.36, co2_emissions=18.35), | |
dict(gni_ppp=38146, life_expectancy=81.4, education_index=0.911,country='UNITED KINGDOM', material_footprint=22.57, co2_emissions=10.08), | |
] | |
mf_boundary = 6.8 | |
co2_boundary = 1.74 | |
for value in values: | |
country = value['country'] | |
gni_ppp = value['gni_ppp'] | |
life_expectancy = value['life_expectancy'] | |
education_index = value['education_index'] | |
material_footprint = value['material_footprint'] | |
co2_emissions = value['co2_emissions'] | |
dev_index = ((math.log(gni_ppp) - math.log(100))/(math.log(20000) - math.log(100))*((life_expectancy - 25)/(85 - 25))*education_index)**(1./3.) | |
averge_overshoot=math.sqrt((material_footprint/mf_boundary)*(co2_emissions/co2_boundary)) | |
eco_impact_index = 1 + (math.e**averge_overshoot - math.e**1)/(math.e**4 - math.e**1) | |
print(f'[{country}] - Development Index: {dev_index}. Eco Impact Index: {eco_impact_index}. SDI: {dev_index/eco_impact_index}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment