Python wrapper around the Flexible Query API of the UNFCCC.
Project description
UNFCCC DI API
Python wrapper around the Flexible Query API of the UNFCCC.
Free software: Apache Software License 2.0
Documentation: https://unfccc-di-api.readthedocs.io.
Features
High-level API to query all information for a given party.
Low-level API to selectively query information with the same resolution as in the UNFCCC web query tool.
Citation
If you use this library and want to cite it, please cite it as:
Mika Pflüger, Daniel Huppmann & Johannes Gütschow. (2022-03-15). pik-primap/unfccc_di_api: Version 3.0.1. Zenodo. https://doi.org/10.5281/zenodo.6355639
Data package
If you just want all the data in CSV and parquet format (suitable for reading with pandas), look at our data package.
CI status and other links
Changelog
3.0.1 (2022-03-15)
Fix handling of unspecified measure IDs. The DI API started returning measure IDs without a name or description. We now call them unknown measure nr. {measureId} instead of erroring out.
3.0.0 (2021-12-03)
Support python 3.10.
Fix handling of duplicate variable IDs. Note: This entails changes to the public API! In particular, UNFCCCSingleCategoryApiReader.variables now has a generic index instead of using the variableId as index. Also, the query function now correctly restricts queries if category_ids are 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.
2.0.1 (2021-04-23)
Change build system.
2.0.0 (2021-02-09)
Accept ASCII format for gases when querying data and return gases & units normalized to ASCII (optional), thanks to Daniel Huppmann. Note that gases and units are normalized to ASCII by default, if you need the old behaviour for compatibility reasons, pass normalize_gas_names=False to your query() calls.
1.1.1 (2021-02-08)
Include ipython notebooks and CHANGELOG in release tarballs.
1.1.0 (2021-01-25)
Add a useful error message when querying for unknown parties, thanks to Daniel Huppmann.
1.0.0 (2021-01-22)
Add continuous integration using GitHub actions.
Add tests.
Add usage documentation in notebook format.
Documentation fixes.
0.1.0 (2021-01-22)
First release on PyPI.
Convert API wrapper into standalone Python package.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for unfccc_di_api-3.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00cb4fa4286fafd6855647cddfa7f8f1e64f7b8f76c48c53d629e945107e98eb |
|
MD5 | 52a03c247eadfc864de6f8427824fd4e |
|
BLAKE2b-256 | 3e25bcae347d7e8037ba939ae3ade54764114a04d3b5817854c60287c65dba73 |