xweights


Namexweights JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/ludwiglierhammer/xweights
SummaryPython xweights contains functionsto create grid weighted area means
upload_time2023-09-15 11:55:05
maintainer
docs_urlNone
authorLudwig Lierhammer
requires_python>=3.6
licenseMIT license
keywords xweights
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            ========
xweights
========

.. image:: https://github.com/ludwiglierhammer/xweights/actions/workflows/ci.yml/badge.svg
    :target: https://github.com/ludwiglierhammer/xweights/actions/workflows/ci.yml

.. image:: https://codecov.io/gh/ludwiglierhammer/xweights/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/ludwiglierhammer/xweights

.. image:: https://img.shields.io/pypi/v/xweights.svg
    :target: https://pypi.python.org/pypi/xweights

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

.. image:: https://results.pre-commit.ci/badge/github/ludwiglierhammer/xweights/main.svg
    :target: https://results.pre-commit.ci/latest/github/ludwiglierhammer/xweights/main
    :alt: pre-commit.ci status

Python "xweights" contains functions to calculate grid weighted area means from predefined regions or from an user-given shapefile. This tool is a wrapper around the python package xESMF_.

* Free software: MIT license
* Documentation: https://xweights.readthedocs.io


Features
--------

* Calculate grid-weighted-means and save the output as CSV file

* As input you need a dataset dictionary. Values are xarray.Datasets and keys correspondin strings.


Installation
------------

**Note:** Before building `xweights` from source, you nedd **first** install `cartopy` by using conda:

.. code-block:: console

   conda install -c conda-forge cartopy

You can install the package directly with pip:

.. code-block:: console

     pip install xweights

If you want to contribute, I recommend cloning the repository and installing the package in development mode, e.g.

.. code-block:: console

    git clone https://github.com/ludwiglierhammer/xweights.git
    cd xweights
    pip install -e .

In additon you have to install xESMF using _Conda:

.. code-block:: console

    conda install -c conda-forge xesmf

This will install the package but you can still edit it and you don't need the package in your :code:`PYTHONPATH`


Requirements
------------

* python3.6 or higher

* numpy

* pandas

* geopandas

* xarray

* py-cordex

* xesmf


Contact
-------
In cases of any problems, needs or wishes do not hesitate to contact:

ludwig.lierhammer@hereon.de


Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
.. _Conda: https://docs.conda.io/
.. _xESMF: https://xesmf.readthedocs.io


=======
History
=======

0.1.0 (2022-03-04)
------------------

* First release on PyPI.

0.1.1 (2022-07-01)
------------------

* adjusted to pre-commit
* use functions from pyhomogenize

0.1.2 (2022-07-08)
------------------

* change pyhomogenize version requirements

0.2.0 (2022-07-11)
------------------

* rename spatial_averager
* keep geometry attributes

0.2.1 (2022-07-11)
------------------

* read and write column name to attributes

0.2.2 (2022-07-12)
------------------

* add data and tables via pip install

0.2.3 (2023-01-26)
------------------

* remove cartopy from requirements.txt

0.2.4 (2023-03-13)
------------------

* using pycordex >= 0.5.1

0.2.5 (2023-08-23)
------------------

* adding new region: counties_merged (merge counties less than 400m2)

0.2.6 (2023-08-30)
------------------

* optionally: wite variable attributes to dataframe

0.3.0 (2023-09-15)
------------------

* added new regions: IPCC WG1 Reference Regions v4 from Atlas
* xweights/_io.py is no longer available
* xweights/_domains.py is no longer available
* function `spatial_averager` -> `spatial_averaging`
* function `compute_weighted_means`:

  * optionally: set `averager_ds` to calculate a general xesmf.SpatialAverager
  * parameter `shp` -> `gdf`
  * parameter `input` -> `dataset_dict`
  * parameter `dataset_dict` has to be a dictionary
  * parameter `outdir` -> `output`

* function `compute_weighted_means_ds`: parameters are now similar to `compute_weighted_means`
* command-line interface is no longer available

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ludwiglierhammer/xweights",
    "name": "xweights",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "xweights",
    "author": "Ludwig Lierhammer",
    "author_email": "ludwig.lierhammer@hereon.de",
    "download_url": "https://files.pythonhosted.org/packages/14/65/c0c37e70364f58107347fdb8052c60512450118eecdcc459ab4a52a11000/xweights-0.3.0.tar.gz",
    "platform": null,
    "description": "========\nxweights\n========\n\n.. image:: https://github.com/ludwiglierhammer/xweights/actions/workflows/ci.yml/badge.svg\n    :target: https://github.com/ludwiglierhammer/xweights/actions/workflows/ci.yml\n\n.. image:: https://codecov.io/gh/ludwiglierhammer/xweights/branch/main/graph/badge.svg\n    :target: https://codecov.io/gh/ludwiglierhammer/xweights\n\n.. image:: https://img.shields.io/pypi/v/xweights.svg\n    :target: https://pypi.python.org/pypi/xweights\n\n.. image:: https://readthedocs.org/projects/xweights/badge/?version=latest\n    :target: https://xweights.readthedocs.io/en/latest/?version=latest\n    :alt: Documentation Status\n\n.. image:: https://results.pre-commit.ci/badge/github/ludwiglierhammer/xweights/main.svg\n    :target: https://results.pre-commit.ci/latest/github/ludwiglierhammer/xweights/main\n    :alt: pre-commit.ci status\n\nPython \"xweights\" contains functions to calculate grid weighted area means from predefined regions or from an user-given shapefile. This tool is a wrapper around the python package xESMF_.\n\n* Free software: MIT license\n* Documentation: https://xweights.readthedocs.io\n\n\nFeatures\n--------\n\n* Calculate grid-weighted-means and save the output as CSV file\n\n* As input you need a dataset dictionary. Values are xarray.Datasets and keys correspondin strings.\n\n\nInstallation\n------------\n\n**Note:** Before building `xweights` from source, you nedd **first** install `cartopy` by using conda:\n\n.. code-block:: console\n\n   conda install -c conda-forge cartopy\n\nYou can install the package directly with pip:\n\n.. code-block:: console\n\n     pip install xweights\n\nIf you want to contribute, I recommend cloning the repository and installing the package in development mode, e.g.\n\n.. code-block:: console\n\n    git clone https://github.com/ludwiglierhammer/xweights.git\n    cd xweights\n    pip install -e .\n\nIn additon you have to install xESMF using _Conda:\n\n.. code-block:: console\n\n    conda install -c conda-forge xesmf\n\nThis will install the package but you can still edit it and you don't need the package in your :code:`PYTHONPATH`\n\n\nRequirements\n------------\n\n* python3.6 or higher\n\n* numpy\n\n* pandas\n\n* geopandas\n\n* xarray\n\n* py-cordex\n\n* xesmf\n\n\nContact\n-------\nIn cases of any problems, needs or wishes do not hesitate to contact:\n\nludwig.lierhammer@hereon.de\n\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n.. _Conda: https://docs.conda.io/\n.. _xESMF: https://xesmf.readthedocs.io\n\n\n=======\nHistory\n=======\n\n0.1.0 (2022-03-04)\n------------------\n\n* First release on PyPI.\n\n0.1.1 (2022-07-01)\n------------------\n\n* adjusted to pre-commit\n* use functions from pyhomogenize\n\n0.1.2 (2022-07-08)\n------------------\n\n* change pyhomogenize version requirements\n\n0.2.0 (2022-07-11)\n------------------\n\n* rename spatial_averager\n* keep geometry attributes\n\n0.2.1 (2022-07-11)\n------------------\n\n* read and write column name to attributes\n\n0.2.2 (2022-07-12)\n------------------\n\n* add data and tables via pip install\n\n0.2.3 (2023-01-26)\n------------------\n\n* remove cartopy from requirements.txt\n\n0.2.4 (2023-03-13)\n------------------\n\n* using pycordex >= 0.5.1\n\n0.2.5 (2023-08-23)\n------------------\n\n* adding new region: counties_merged (merge counties less than 400m2)\n\n0.2.6 (2023-08-30)\n------------------\n\n* optionally: wite variable attributes to dataframe\n\n0.3.0 (2023-09-15)\n------------------\n\n* added new regions: IPCC WG1 Reference Regions v4 from Atlas\n* xweights/_io.py is no longer available\n* xweights/_domains.py is no longer available\n* function `spatial_averager` -> `spatial_averaging`\n* function `compute_weighted_means`:\n\n  * optionally: set `averager_ds` to calculate a general xesmf.SpatialAverager\n  * parameter `shp` -> `gdf`\n  * parameter `input` -> `dataset_dict`\n  * parameter `dataset_dict` has to be a dictionary\n  * parameter `outdir` -> `output`\n\n* function `compute_weighted_means_ds`: parameters are now similar to `compute_weighted_means`\n* command-line interface is no longer available\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Python xweights contains functionsto create grid weighted area means",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://github.com/ludwiglierhammer/xweights"
    },
    "split_keywords": [
        "xweights"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ddbe92ff9e5abd27e07b80d83e72c74bde21714536e149e26f33536ca36ed0b1",
                "md5": "f67f66c48b41be15be4bd6917135cdd2",
                "sha256": "18c38606e2e77e71c6249caa08cb599e8feb624aa342268371a74a858b3b39ae"
            },
            "downloads": -1,
            "filename": "xweights-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f67f66c48b41be15be4bd6917135cdd2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 9964412,
            "upload_time": "2023-09-15T11:55:02",
            "upload_time_iso_8601": "2023-09-15T11:55:02.536393Z",
            "url": "https://files.pythonhosted.org/packages/dd/be/92ff9e5abd27e07b80d83e72c74bde21714536e149e26f33536ca36ed0b1/xweights-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1465c0c37e70364f58107347fdb8052c60512450118eecdcc459ab4a52a11000",
                "md5": "d6633c8d2e1169bd69a7befd72388a7d",
                "sha256": "c2a4ce0a022c58a3a7bfaba38eacf49cb999b665d028faa5c91e3c07b3d9c09d"
            },
            "downloads": -1,
            "filename": "xweights-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d6633c8d2e1169bd69a7befd72388a7d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 9962238,
            "upload_time": "2023-09-15T11:55:05",
            "upload_time_iso_8601": "2023-09-15T11:55:05.982197Z",
            "url": "https://files.pythonhosted.org/packages/14/65/c0c37e70364f58107347fdb8052c60512450118eecdcc459ab4a52a11000/xweights-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-15 11:55:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ludwiglierhammer",
    "github_project": "xweights",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "xweights"
}
        
Elapsed time: 0.11364s