primap2


Nameprimap2 JSON
Version 0.10.0 PyPI version JSON
download
home_pagehttps://github.com/pik-primap/primap2
SummaryThe next generation of the PRIMAP climate policy analysis suite.
upload_time2023-12-12 11:30:37
maintainer
docs_urlNone
authorMika Pflüger
requires_python>=3.9
licenseApache Software License 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =======
PRIMAP2
=======

.. image:: https://img.shields.io/pypi/v/primap2.svg
        :target: https://pypi.python.org/pypi/primap2
        :alt: PyPI status

.. image:: https://readthedocs.org/projects/primap2/badge/?version=main
        :target: https://primap2.readthedocs.io/en/main/?badge=main
        :alt: Documentation Status

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4535902.svg
        :target: https://doi.org/10.5281/zenodo.4535902
        :alt: Zenodo release

PRIMAP2 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 at https://primap2.readthedocs.io.

Structure
---------

PRIMAP2 is:
 * A flexible and powerful data format built on `xarray <https://xarray.pydata.org>`_.
 * A collection of functions for common tasks when wrangling climate policy
   data, like aggregation and interpolation.
 * A format for data packages built on `datalad <https://www.datalad.org>`_, providing
   metadata extraction and search on a collection of data packages.

Status
------

PRIMAP2 is in active development, and not everything promised above is built
yet.

License
-------
Copyright 2020-2022, Potsdam-Institut für Klimafolgenforschung e.V.

Copyright 2023, Climate Resource Pty Ltd

Licensed 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 at

https://www.apache.org/licenses/LICENSE-2.0

Unless 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.

Citation
--------
If 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.10361847

=========
Changelog
=========

0.10.0
------
* Fixed compatibility with latest `pint` and `pint-xarray` libraries.

0.9.8
-----
* add additional control over nan treatment to downscaling functionality
* Allow kwargs in gas basket summation
* use min_count=1 as default in pr.sum
* fix error message for 0-dimensional arrays in pr.merge
* fix building the documentation on readthedocs.org
* Modify unit harmonization to return native units if possible

0.9.7
-----
* Fix the test suite to work with Pint release 0.21.

0.9.6
-----
* Add 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.5
-----
* pr.merge: use xarray's combine_first instead of own algorithm for better performance.
* Fix in nan handling of to_interchange_format
* made regexp_unit optional in nir_add_unit_information as intended already before
* Add support for Python 3.11

0.9.4
-----
* Update to work with Pint 0.20.1.

0.9.3
-----
* Refactor pr.merge.
* Fix primap2 to work with xarray version 2022.06.
* Pin Pint to version 0.20 to work around https://github.com/hgrecco/pint/issues/1631 for now.

0.9.2
-----
* add merge functions in .pr accessors for Dataset and DataArray

0.9.1
-----
* Re-release of version 0.9.0 due to error in the release procedure.

0.9.0
-----
* Drop 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()` and
  `ds.pr.fill_na_gas_basket_from_contents()` work like `ds.pr.sum()`.
  Both now have a `skipna` argument, and operate as if `skipna=True`
  by default.
  Note that this is a breaking change, by default NaNs are now
  treated as zero values when aggregating gas baskets!

0.8.1
-----
* The 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 explicit
* make nir_add_unit_information more flexible

0.8.0
-----
* Make input format more flexible for convert_ipcc_code_primap_to_primap2
* several bug fixes in data reading
* in data reading we now work on a copy of the input data frame to leave it unchanged

0.7.1
-----
* Require openscm-units >= 0.3 to ensure that refrigerants and AR5GWPCCF are available.
* Make primap2 compatible with pint-xarray v0.2.1.

0.7.0
-----
* Add the `publication_date` property 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 the `upstream bug <https://github.com/spatialaudio/nbsphinx/issues/584>`_
  is fixed.
* Add stringly typed data variables to the PRIMAP specification.
* Update `ensure_valid` for the updated specification.
* Enhance interchange format documentation.

0.6.0
-----
* Improve ``venv`` handling in the Makefile.
* Split wide csv reading function into a conversion function and a wrapper
* Add function to convert long format dataframe to interchange format
* Add functions to help reading of different national GHG inventories
* Add functionality to fill columns using information from other
  columns to csv reading and dataframe conversion functions
* Add additional coordinates to interchange format and data reading functions
* Pin ruamel.yaml to version 0.17.4 until https://github.com/crdoconnor/strictyaml/issues/145 is solved.
* use `sum()` instead of `np.sum()` with generator to avoid deprecation warning
* Write changelog entries for unreleased changes into individual files in the
  ``changelog_unreleased`` directory to avoid merge conflicts.
* Bump dependency on ``pint-xarray`` to 0.2 and fix test regressions introduced by
  release 0.2 of pint-xarray.

0.5.0
-----
* Add read and write functionality for interchange format
* Add csv reading capabilities in pm2io module for wide and long (tidy) CSV files.
* Add ``da.pr.coverage()`` and ``ds.pr.coverage()`` functions to summarize data
  coverage.
* Add aggregation functions ``set`` and ``count`` which 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.0
-----
* Add the ``da.pr.set()`` and ``ds.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.1
-----
* Re-release 0.3.0 to trigger zenodo.

0.3.0
-----
* Add 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 like ``area`` in addition
  to the full dimension key including the category set like ``area (ISO3)``. Works with
  ``ds.pr[key]`` and ``ds.pr.loc[selection]`` as well as ``da.pr.loc[selection]``.
* Add usage documentation for all currently included functionality.
* Access metadata easily via properties like ``ds.pr.references``.

0.2.0
-----
* Add 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.0
-----

* First development release.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pik-primap/primap2",
    "name": "primap2",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "",
    "author": "Mika Pfl\u00fcger",
    "author_email": "mika.pflueger@climate-resource.com",
    "download_url": "https://files.pythonhosted.org/packages/8e/8b/c7b4c63669f207660420d667b03069c02a350b983bd3a566071fadecfa61/primap2-0.10.0.tar.gz",
    "platform": null,
    "description": "=======\nPRIMAP2\n=======\n\n.. image:: https://img.shields.io/pypi/v/primap2.svg\n        :target: https://pypi.python.org/pypi/primap2\n        :alt: PyPI status\n\n.. image:: https://readthedocs.org/projects/primap2/badge/?version=main\n        :target: https://primap2.readthedocs.io/en/main/?badge=main\n        :alt: Documentation Status\n\n.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4535902.svg\n        :target: https://doi.org/10.5281/zenodo.4535902\n        :alt: Zenodo release\n\nPRIMAP2 is the next generation of the PRIMAP climate policy analysis suite.\nPRIMAP2 is free software, you are welcome to use it in your own research.\nThe documentation can be found at https://primap2.readthedocs.io.\n\nStructure\n---------\n\nPRIMAP2 is:\n * A flexible and powerful data format built on `xarray <https://xarray.pydata.org>`_.\n * A collection of functions for common tasks when wrangling climate policy\n   data, like aggregation and interpolation.\n * A format for data packages built on `datalad <https://www.datalad.org>`_, providing\n   metadata extraction and search on a collection of data packages.\n\nStatus\n------\n\nPRIMAP2 is in active development, and not everything promised above is built\nyet.\n\nLicense\n-------\nCopyright 2020-2022, Potsdam-Institut f\u00fcr Klimafolgenforschung e.V.\n\nCopyright 2023, Climate Resource Pty Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this\nfile except in compliance with the License. You may obtain a copy of the License at\n\nhttps://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied. See the License for the specific language governing\npermissions and limitations under the License.\n\nPRIMAP2 incorporates parts of xarray and pint_xarray, which are available under the\nApache License, Version 2.0 as well. The full text of the xarray copyright statement is\nincluded in the licenses directory.\n\nCitation\n--------\nIf you use this library and want to cite it, please cite it as:\n\nMika Pfl\u00fcger and Johannes G\u00fctschow. (2023-12-12).\npik-primap/primap2: PRIMAP2 Version 0.10.0.\nZenodo. https://doi.org/10.5281/zenodo.10361847\n\n=========\nChangelog\n=========\n\n0.10.0\n------\n* Fixed compatibility with latest `pint` and `pint-xarray` libraries.\n\n0.9.8\n-----\n* add additional control over nan treatment to downscaling functionality\n* Allow kwargs in gas basket summation\n* use min_count=1 as default in pr.sum\n* fix error message for 0-dimensional arrays in pr.merge\n* fix building the documentation on readthedocs.org\n* Modify unit harmonization to return native units if possible\n\n0.9.7\n-----\n* Fix the test suite to work with Pint release 0.21.\n\n0.9.6\n-----\n* Add dependency on openscm_units > 0.5.1 for compatibility with latest pandas.\n* stop building pdf output documentation, it doesn't support SVG and isn't used much.\n* Drop support for Python version 3.8 to prepare for it being dropped\n  in Numpy on April 14.\n\n0.9.5\n-----\n* pr.merge: use xarray's combine_first instead of own algorithm for better performance.\n* Fix in nan handling of to_interchange_format\n* made regexp_unit optional in nir_add_unit_information as intended already before\n* Add support for Python 3.11\n\n0.9.4\n-----\n* Update to work with Pint 0.20.1.\n\n0.9.3\n-----\n* Refactor pr.merge.\n* Fix primap2 to work with xarray version 2022.06.\n* Pin Pint to version 0.20 to work around https://github.com/hgrecco/pint/issues/1631 for now.\n\n0.9.2\n-----\n* add merge functions in .pr accessors for Dataset and DataArray\n\n0.9.1\n-----\n* Re-release of version 0.9.0 due to error in the release procedure.\n\n0.9.0\n-----\n* Drop python 3.7 support and add python 3.10 support following NEP 29.\n* Change behaviour of gas basket aggregation functions to be the same as\n  other aggregation functions.\n  Now, `ds.pr.gas_basket_contents_sum()` and\n  `ds.pr.fill_na_gas_basket_from_contents()` work like `ds.pr.sum()`.\n  Both now have a `skipna` argument, and operate as if `skipna=True`\n  by default.\n  Note that this is a breaking change, by default NaNs are now\n  treated as zero values when aggregating gas baskets!\n\n0.8.1\n-----\n* The latest (not-yet-released) version of xarray contains a rework of indexing\n  and some small changes to our I/O functions are necessary to support both old\n  and new xarray.\n* make dropna in nir_convert_df_to_long explicit\n* make nir_add_unit_information more flexible\n\n0.8.0\n-----\n* Make input format more flexible for convert_ipcc_code_primap_to_primap2\n* several bug fixes in data reading\n* in data reading we now work on a copy of the input data frame to leave it unchanged\n\n0.7.1\n-----\n* Require openscm-units >= 0.3 to ensure that refrigerants and AR5GWPCCF are available.\n* Make primap2 compatible with pint-xarray v0.2.1.\n\n0.7.0\n-----\n* Add the `publication_date` property for datasets to record the date of publication,\n  which is especially useful to record the publication date for datasets which are\n  published continuously.\n* change to stable sphinx-autosummary-accessors version.\n* pin sphinx version to repair RTD latex builds until the `upstream bug <https://github.com/spatialaudio/nbsphinx/issues/584>`_\n  is fixed.\n* Add stringly typed data variables to the PRIMAP specification.\n* Update `ensure_valid` for the updated specification.\n* Enhance interchange format documentation.\n\n0.6.0\n-----\n* Improve ``venv`` handling in the Makefile.\n* Split wide csv reading function into a conversion function and a wrapper\n* Add function to convert long format dataframe to interchange format\n* Add functions to help reading of different national GHG inventories\n* Add functionality to fill columns using information from other\n  columns to csv reading and dataframe conversion functions\n* Add additional coordinates to interchange format and data reading functions\n* Pin ruamel.yaml to version 0.17.4 until https://github.com/crdoconnor/strictyaml/issues/145 is solved.\n* use `sum()` instead of `np.sum()` with generator to avoid deprecation warning\n* Write changelog entries for unreleased changes into individual files in the\n  ``changelog_unreleased`` directory to avoid merge conflicts.\n* Bump dependency on ``pint-xarray`` to 0.2 and fix test regressions introduced by\n  release 0.2 of pint-xarray.\n\n0.5.0\n-----\n* Add read and write functionality for interchange format\n* Add csv reading capabilities in pm2io module for wide and long (tidy) CSV files.\n* Add ``da.pr.coverage()`` and ``ds.pr.coverage()`` functions to summarize data\n  coverage.\n* Add aggregation functions ``set`` and ``count`` which use aliasing and can reduce to\n  a given set of dimensions, including the entity.\n* Update python packaging to use declarative style and modern setuptools.\n* Support and test python 3.9 and windows.\n* Add dataset attr for storing the terminology used for entities (and thus variable\n  names).\n\n0.4.0\n-----\n* Add the ``da.pr.set()`` and ``ds.pr.set()`` functions for overwriting / infilling /\n  extending data.\n* Allow for more than one source in a single Dataset / DataArray.\n* Support xarray 0.17, and therefore drop support for Python 3.6.\n\n0.3.1\n-----\n* Re-release 0.3.0 to trigger zenodo.\n\n0.3.0\n-----\n* Add functions for downscaling and aggregation of gas baskets and categorical baskets.\n* Add functions, docs, and tests for basic GWP handling.\n* Add Makefile target to generate patched stub files for xarray containing the primap2\n  API.\n* Add development documentation detailing the structure of the repository and the tools\n  used to development of PRIMAP2.\n* Add selection and indexing which understands dimension names like ``area`` in addition\n  to the full dimension key including the category set like ``area (ISO3)``. Works with\n  ``ds.pr[key]`` and ``ds.pr.loc[selection]`` as well as ``da.pr.loc[selection]``.\n* Add usage documentation for all currently included functionality.\n* Access metadata easily via properties like ``ds.pr.references``.\n\n0.2.0\n-----\n* Add documentation.\n* Add tests.\n* Add continuous integration using github actions.\n* Add functions for storing to and loading from netcdf.\n* Add description of the data format.\n* Add function which ensures that a dataset is in this data format.\n* Provide all functions using a pint extension accessor.\n\n0.1.0\n-----\n\n* First development release.\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "The next generation of the PRIMAP climate policy analysis suite.",
    "version": "0.10.0",
    "project_urls": {
        "Documentation": "https://primap2.readthedocs.io/",
        "Homepage": "https://github.com/pik-primap/primap2"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4442052a4f4da4285dce67a2b427282b105e875665140c000be7429db4d27b9c",
                "md5": "f61d6f4c19035ac819b8d5e217f9d541",
                "sha256": "9dfe72e4d07484f25ab6275d70a5baea93f3f58b7a1d1b4e662dd709b0a33689"
            },
            "downloads": -1,
            "filename": "primap2-0.10.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f61d6f4c19035ac819b8d5e217f9d541",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 163716,
            "upload_time": "2023-12-12T11:30:34",
            "upload_time_iso_8601": "2023-12-12T11:30:34.716598Z",
            "url": "https://files.pythonhosted.org/packages/44/42/052a4f4da4285dce67a2b427282b105e875665140c000be7429db4d27b9c/primap2-0.10.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8e8bc7b4c63669f207660420d667b03069c02a350b983bd3a566071fadecfa61",
                "md5": "cd4964ae70b0f2fc4a25436782d2e60c",
                "sha256": "46098bdff5da18874eed99bd0e62008021a2eb74b1b09bcb758c9a615b59c785"
            },
            "downloads": -1,
            "filename": "primap2-0.10.0.tar.gz",
            "has_sig": false,
            "md5_digest": "cd4964ae70b0f2fc4a25436782d2e60c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 710126,
            "upload_time": "2023-12-12T11:30:37",
            "upload_time_iso_8601": "2023-12-12T11:30:37.221792Z",
            "url": "https://files.pythonhosted.org/packages/8e/8b/c7b4c63669f207660420d667b03069c02a350b983bd3a566071fadecfa61/primap2-0.10.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-12 11:30:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pik-primap",
    "github_project": "primap2",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "primap2"
}
        
Elapsed time: 0.16064s