Package: unfccc-di-api
UNFCCC DI APIPython wrapper around theFlexible Query APIof
the UNFCCC.Free software: Apache Software License 2.0Documentation:https://unfccc-di-api.readthedocs.io.WarningDue to a recent change in the UNFCCC’s API, the UNFCCCApiReader class isnot functionalany more in standard environments. To continue to access the data,
you have two options:Use the new ZenodoReader. It provides access using thequeryfunction like the
UNFCCCApiReader, but only supports querying for a full dataset with all data. It
relies on ourdata package, which we
update regularly; however, the data is naturally not as recent as querying from
the API directly.Run your functions in an environment which is not blocked by the UNFCCC DI API.
According to our tests, Azure virtual machines work, as well as github hosted
runners, with the exception of Mac OS runners.FeaturesHigh-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.CitationIf you use this library and want to cite it, please cite it as:Mika Pflüger, Daniel Huppmann & Johannes Gütschow. (2024-01-08).
pik-primap/unfccc_di_api: Version 4.0.1.
Zenodo.https://doi.org/10.5281/zenodo.10471122Data packageIf you just want all the data in CSV and parquet format (suitable for reading with
pandas), look at ourdata package.CI status and other linksChangelog4.0.1 (2024-01-08)Use data released until 2024-01-08 when using the ZenodoReader.Support python 3.12.4.0.0 (2023-07-18)Breaking: the UNFCCC restricted API access, likely you have to change your code to
use the new ZenodoReader instead.Add ZenodoReader which doesn’t rely on API access.Use data released until 2023-07-18 when using the ZenodoReader.Build the documentation on ReadTheDocs using newer Python and Sphinx versions.3.0.2 (2022-12-13)Support python 3.11.Drop support for python 3.6.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 themunknown 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 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.2.0.1 (2021-04-23)Change build system.2.0.0 (2021-02-09)Accept ASCII format forgaseswhen 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, passnormalize_gas_names=Falseto yourquery()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.