Usage
To download the data from Zenodo, import the package and instantiate the reader, which will download the most recent dataset:
[1]:
import unfccc_di_api
reader = unfccc_di_api.ZenodoReader()
Downloading data from 'https://zenodo.org/records/12664477/files/all.parquet?download=1' to file '/home/docs/.cache/pooch/a4f3ee6e9f52bd4cbf7f2b4c86d0bbea-all.parquet'.
Check for which parties data is available:
[2]:
reader.parties
[2]:
['AUS',
'AUT',
'BEL',
'BGR',
'BLR',
'CAN',
'CHE',
'CYP',
'CZE',
'DEU',
'DNK',
'ESP',
'EST',
'EUA',
'FIN',
'FRA',
'GBR',
'GRC',
'HRV',
'HUN',
'IRL',
'ISL',
'ITA',
'JPN',
'KAZ',
'LIE',
'LTU',
'LUX',
'LVA',
'MCO',
'MLT',
'NLD',
'NOR',
'NZL',
'POL',
'PRT',
'ROU',
'RUS',
'SVK',
'SVN',
'SWE',
'TUR',
'UKR',
'USA',
'AFG',
'ALB',
'DZA',
'AND',
'AGO',
'ATG',
'ARG',
'ARM',
'AZE',
'BHS',
'BHR',
'BGD',
'BRB',
'BLZ',
'BEN',
'BTN',
'BOL',
'BIH',
'BWA',
'BRA',
'BRN',
'BFA',
'BDI',
'CPV',
'KHM',
'CMR',
'CAF',
'TCD',
'CHL',
'CHN',
'COL',
'COM',
'COG',
'COK',
'CRI',
'CIV',
'CUB',
'PRK',
'COD',
'DJI',
'DMA',
'DOM',
'ECU',
'EGY',
'SLV',
'GNQ',
'ERI',
'ETH',
'FJI',
'GAB',
'GMB',
'GEO',
'GHA',
'GRD',
'GTM',
'GIN',
'GNB',
'GUY',
'HTI',
'HND',
'IND',
'IDN',
'IRN',
'IRQ',
'ISR',
'JAM',
'JOR',
'KEN',
'KIR',
'KWT',
'KGZ',
'LAO',
'LBN',
'LSO',
'LBR',
'LBY',
'MDG',
'MWI',
'MYS',
'MDV',
'MLI',
'MHL',
'MRT',
'MUS',
'MEX',
'FSM',
'MNG',
'MNE',
'MAR',
'MOZ',
'MMR',
'NAM',
'NRU',
'NPL',
'NIC',
'NER',
'NGA',
'NIU',
'OMN',
'PAK',
'PLW',
'PAN',
'PNG',
'PRY',
'PER',
'PHL',
'QAT',
'KOR',
'MDA',
'RWA',
'KNA',
'LCA',
'VCT',
'WSM',
'SMR',
'STP',
'SAU',
'SEN',
'SRB',
'SYC',
'SLE',
'SGP',
'SLB',
'SOM',
'ZAF',
'SSD',
'LKA',
'SDN',
'SUR',
'SWZ',
'SYR',
'TJK',
'THA',
'MKD',
'TLS',
'TGO',
'TON',
'TTO',
'TUN',
'TKM',
'TUV',
'UGA',
'ARE',
'TZA',
'URY',
'UZB',
'VUT',
'VEN',
'VNM',
'YEM',
'ZMB',
'ZWE',
'PSE']
Access all data for a specific party:
[3]:
reader.query(party_code="AFG")
[3]:
| party | category | classification | measure | gas | unit | year | numberValue | stringValue | |
|---|---|---|---|---|---|---|---|---|---|
| 15929145 | AFG | 1. Energy | Total for category | Net emissions/removals | Aggregate GHGs | Gg CO2 equivalent | 2005 | 3776.15946 | NaN |
| 15929146 | AFG | 1. Energy | Total for category | Net emissions/removals | Aggregate GHGs | Gg CO2 equivalent | 2013 | 10343.00000 | NaN |
| 15929147 | AFG | 1. Energy | Total for category | Net emissions/removals | CH4 | Gg | 2005 | 35.06076 | NaN |
| 15929148 | AFG | 1. Energy | Total for category | Net emissions/removals | CH4 | Gg | 2013 | 4.00000 | NaN |
| 15929149 | AFG | 1. Energy | Total for category | Net emissions/removals | CO | Gg | 2005 | 865.20000 | NaN |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 15929528 | AFG | unknown category nr. 10504 | Total for category | Total population | No gas | thousands | 2017 | 28224.32300 | NaN |
| 15929529 | AFG | unknown category nr. 10504 | Total for category | Total population | No gas | thousands | 2018 | 30075.01800 | NaN |
| 15929530 | AFG | unknown category nr. 10504 | Total for category | Total population | No gas | thousands | 2019 | 30725.56000 | NaN |
| 15929531 | AFG | unknown category nr. 10504 | Total for category | Total population | No gas | thousands | 2020 | 31390.17100 | NaN |
| 15929532 | AFG | unknown category nr. 10504 | Total for category | Total population | No gas | thousands | 2021 | 32069.16000 | NaN |
388 rows × 9 columns
You can also request data directly form the UNFCCC DI API if you have a way to get access. Check the API docs section (next section), or the docstrings of UNFCCCApiReader for details.
[ ]: