#!/usr/bin/env python # coding: utf-8 # # Paris Agreement: Entry Into Force # In[1]: get_ipython().run_line_magic('matplotlib', 'inline') # In[2]: import matplotlib.pyplot as plt plt.style.use("ggplot") from pandas_datapackage_reader import read_datapackage from countrygroups import EUROPEAN_UNION # Reading in the [Data Package](https://github.com/openclimatedata/paris-agreement-entry-into-force) with ratification status of the Paris Agreement. # In[3]: parties = read_datapackage("https://github.com/openclimatedata/paris-agreement-entry-into-force") # In[4]: parties.head() # In[5]: parties.count() # The European Union is contained both as a block and as single parties so let's look at EU parties only. # In[6]: print(EUROPEAN_UNION) assert(len(EUROPEAN_UNION) == 28) # In[7]: parties.loc["EUU"] # In[8]: parties.loc[EUROPEAN_UNION] # For the emissions shares the last available data submitted to the UNFCCC was used. # In[9]: parties.Year.hist(bins=25 ) plt.title("Distribution of submission years"); # And a look at how emissions are distributed, many countries with small shares. # In[10]: parties.Percentage.hist(bins=20) plt.title("Distribution of emissions shares for Entry Into Force"); # In[11]: not_ratified = parties[parties["Ratification-Acceptance-Approval"].isnull() != False] ratified = parties[parties["Ratification-Acceptance-Approval"].isnull() == False] # Sum of emissions of parties that have ratified, subtracting EU as a group to avoid double-counting. # In[12]: print(ratified.Percentage.sum() - parties.loc["EUU"].Percentage) # A list of the ten highest emitters who have not yet ratified. # In[13]: not_ratified.sort_values("Emissions", ascending=False).head(10) # In[ ]: