Skip to main content

Python xweights contains functionsto create grid weighted area means

Project description

xweights

https://github.com/ludwiglierhammer/xweights/actions/workflows/ci.yml/badge.svg https://codecov.io/gh/ludwiglierhammer/xweights/branch/main/graph/badge.svg https://img.shields.io/pypi/v/xweights.svg Documentation Status 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 https://xesmf.readthedocs.io

Features

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

  • As input you can choose between files on disk and intake-esm catalogues. Xarray dataset input is under development.

  • Use all these features as an command-line tool too

Installation

You can install the package directly with pip:

pip install xweights

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

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

In additon you have to install xESMF using _Conda:

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 PYTHONPATH

Requirements

  • python3.6 or higher

  • numpy

  • pandas

  • geopandas

  • intake-esm

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xweights-0.2.1.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

xweights-0.2.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file xweights-0.2.1.tar.gz.

File metadata

  • Download URL: xweights-0.2.1.tar.gz
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for xweights-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a1af80347fb83d7018c6a95673f8926e9caf2544597ab499103f338ed3d4e49b
MD5 5b1a5898e7e3d25f76fc29ec762755a6
BLAKE2b-256 eb726f765be91f640562d3f1097c5d86e417a20ddc832e9fc79ffb2fb3a4695a

See more details on using hashes here.

Provenance

File details

Details for the file xweights-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: xweights-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for xweights-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 babc6aaa416f990aa9eb329a776d8d54a1c59af94e73a119e32c8be7471c89f6
MD5 9daecc6045a760a26d22158361260d38
BLAKE2b-256 af9ce59e2d40d76f7d0c0d1a43f1e0e0ff598730a06d73027f51bb4ddec5795e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page