Package: primap2
PRIMAP2PRIMAP2 is the next generation of the PRIMAP climate policy analysis suite.
PRIMAP2 is free software, you are welcome to use it in your own research.
The documentation can be found athttps://primap2.readthedocs.io.StructurePRIMAP2 is:A flexible and powerful data format built onxarray.A collection of functions for common tasks when wrangling climate policy
data, like aggregation and interpolation.A format for data packages built ondatalad, providing
metadata extraction and search on a collection of data packages.StatusPRIMAP2 is in active development, and not everything promised above is built
yet.LicenseCopyright 2020-2022, Potsdam-Institut für Klimafolgenforschung e.V.Copyright 2023, Climate Resource Pty LtdLicensed under the Apache License, Version 2.0 (the “License”); you may not use this
file except in compliance with the License. You may obtain a copy of the License athttps://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the specific language governing
permissions and limitations under the License.PRIMAP2 incorporates parts of xarray and pint_xarray, which are available under the
Apache License, Version 2.0 as well. The full text of the xarray copyright statement is
included in the licenses directory.CitationIf you use this library and want to cite it, please cite it as:Mika Pflüger and Johannes Gütschow. (2023-12-12).
pik-primap/primap2: PRIMAP2 Version 0.10.0.
Zenodo.https://doi.org/10.5281/zenodo.10361847Changelog0.10.0Fixed compatibility with latestpintandpint-xarraylibraries.0.9.8add additional control over nan treatment to downscaling functionalityAllow kwargs in gas basket summationuse min_count=1 as default in pr.sumfix error message for 0-dimensional arrays in pr.mergefix building the documentation on readthedocs.orgModify unit harmonization to return native units if possible0.9.7Fix the test suite to work with Pint release 0.21.0.9.6Add dependency on openscm_units > 0.5.1 for compatibility with latest pandas.stop building pdf output documentation, it doesn’t support SVG and isn’t used much.Drop support for Python version 3.8 to prepare for it being dropped
in Numpy on April 14.0.9.5pr.merge: use xarray’s combine_first instead of own algorithm for better performance.Fix in nan handling of to_interchange_formatmade regexp_unit optional in nir_add_unit_information as intended already beforeAdd support for Python 3.110.9.4Update to work with Pint 0.20.1.0.9.3Refactor pr.merge.Fix primap2 to work with xarray version 2022.06.Pin Pint to version 0.20 to work aroundhttps://github.com/hgrecco/pint/issues/1631for now.0.9.2add merge functions in .pr accessors for Dataset and DataArray0.9.1Re-release of version 0.9.0 due to error in the release procedure.0.9.0Drop python 3.7 support and add python 3.10 support following NEP 29.Change behaviour of gas basket aggregation functions to be the same as
other aggregation functions.
Now,ds.pr.gas_basket_contents_sum()andds.pr.fill_na_gas_basket_from_contents()work likeds.pr.sum().
Both now have askipnaargument, and operate as ifskipna=Trueby default.
Note that this is a breaking change, by default NaNs are now
treated as zero values when aggregating gas baskets!0.8.1The latest (not-yet-released) version of xarray contains a rework of indexing
and some small changes to our I/O functions are necessary to support both old
and new xarray.make dropna in nir_convert_df_to_long explicitmake nir_add_unit_information more flexible0.8.0Make input format more flexible for convert_ipcc_code_primap_to_primap2several bug fixes in data readingin data reading we now work on a copy of the input data frame to leave it unchanged0.7.1Require openscm-units >= 0.3 to ensure that refrigerants and AR5GWPCCF are available.Make primap2 compatible with pint-xarray v0.2.1.0.7.0Add thepublication_dateproperty for datasets to record the date of publication,
which is especially useful to record the publication date for datasets which are
published continuously.change to stable sphinx-autosummary-accessors version.pin sphinx version to repair RTD latex builds until theupstream bugis fixed.Add stringly typed data variables to the PRIMAP specification.Updateensure_validfor the updated specification.Enhance interchange format documentation.0.6.0Improvevenvhandling in the Makefile.Split wide csv reading function into a conversion function and a wrapperAdd function to convert long format dataframe to interchange formatAdd functions to help reading of different national GHG inventoriesAdd functionality to fill columns using information from other
columns to csv reading and dataframe conversion functionsAdd additional coordinates to interchange format and data reading functionsPin ruamel.yaml to version 0.17.4 untilhttps://github.com/crdoconnor/strictyaml/issues/145is solved.usesum()instead ofnp.sum()with generator to avoid deprecation warningWrite changelog entries for unreleased changes into individual files in thechangelog_unreleaseddirectory to avoid merge conflicts.Bump dependency onpint-xarrayto 0.2 and fix test regressions introduced by
release 0.2 of pint-xarray.0.5.0Add read and write functionality for interchange formatAdd csv reading capabilities in pm2io module for wide and long (tidy) CSV files.Addda.pr.coverage()andds.pr.coverage()functions to summarize data
coverage.Add aggregation functionssetandcountwhich use aliasing and can reduce to
a given set of dimensions, including the entity.Update python packaging to use declarative style and modern setuptools.Support and test python 3.9 and windows.Add dataset attr for storing the terminology used for entities (and thus variable
names).0.4.0Add theda.pr.set()andds.pr.set()functions for overwriting / infilling /
extending data.Allow for more than one source in a single Dataset / DataArray.Support xarray 0.17, and therefore drop support for Python 3.6.0.3.1Re-release 0.3.0 to trigger zenodo.0.3.0Add functions for downscaling and aggregation of gas baskets and categorical baskets.Add functions, docs, and tests for basic GWP handling.Add Makefile target to generate patched stub files for xarray containing the primap2
API.Add development documentation detailing the structure of the repository and the tools
used to development of PRIMAP2.Add selection and indexing which understands dimension names likeareain addition
to the full dimension key including the category set likearea (ISO3). Works withds.pr[key]andds.pr.loc[selection]as well asda.pr.loc[selection].Add usage documentation for all currently included functionality.Access metadata easily via properties likeds.pr.references.0.2.0Add documentation.Add tests.Add continuous integration using github actions.Add functions for storing to and loading from netcdf.Add description of the data format.Add function which ensures that a dataset is in this data format.Provide all functions using a pint extension accessor.0.1.0First development release.