pik-primap/unfccc_di_api: Version 3.0.0
Authors/Creators
- 1. @pik-piam
- 2. International Institute for Applied Systems Analysis (IIASA)
Description
unfccc_di_api is a Python wrapper around the Flexible Query API of the UNFCCC, which can be used to fetch country-submitted green-house gas emissions data.
For release 3.0.0, we have fixed a bug related to duplicate variable IDs in the Flexible Query API which led to incomplete results. To fix this bug, the public API had to be changed slightly, in particular the UNFCCCSingleCategoryApiReader.variables DataFrame now has a generic index instead of using the variableId as index. If you are using the variables DataFrame, you will have to accomodate the changes in your code. If you are only using the query API, no changes are necessary, you will simply get more accurate results.
The detailed changelog:
- Support python 3.10.
- Fix handling of duplicate variable IDs. Note: This entails changes to the public
API! In particular,
UNFCCCSingleCategoryApiReader.variablesnow has a generic index instead of using thevariableIdas index. Also, thequeryfunction now correctly restricts queries ifcategory_idsare provided and correctly fills all categories with data for a multi-category variable. - Fix pre-commit config for newer mypy type checking versions.
- Raise a more informative NoDataError (subclass of KeyError) instead of a generic KeyError when a query result is empty.
Files
pik-primap/unfccc_di_api-v3.0.0.zip
Files
(28.0 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:65fbf91646da0055b3c1c186d8166742
|
28.0 kB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/pik-primap/unfccc_di_api/tree/v3.0.0 (URL)