Skip to main content

Xarray extension for DGGS

Project description

CI docs PyPI version codestyle conda-forge



xdggs: discrete global grid systems with xarray

xdggs is an open-source Python package that provides tools for handling geospatial data using Discrete Global Grid Systems (DGGS).

It enables efficient manipulation and analysis of multi-dimensional gridded data within a DGGS framework, supporting spatial data processing, resampling, and aggregation on both global and regional scales.

Inspired by the growing need for scalable geospatial data analysis with DGGS, xdggs is built upon the robust Xarray ecosystem, which simplifies working with labeled multi-dimensional arrays.

As an extension of Xarray, xdggs leverages Xarray's capabilities, including seamless access to formats like NetCDF, Zarr, and parallelization through Dask, to provide a powerful and flexible toolkit for geospatial analysis.

Key Features

  • Seamless Integration with Xarray: Use xdggs alongside Xarray's powerful tools for managing labeled, multi-dimensional data.
  • Support for DGGS: Convert geospatial data into DGGS representations, allowing for uniform spatial partitioning of the Earth's surface.
  • Spatial Resampling: Resample data on DGGS grids, enabling downscaling or upscaling across multiple resolutions.
  • DGGS Aggregation: Perform spatial aggregation of data on DGGS cells.
  • Efficient Data Management: Manage large datasets with Xarray's lazy loading, Dask integration, and chunking to optimize performance.

Documentation

You can find the documentation in https://xdggs.readthedocs.io/en/latest/.

Demo

xdggs demo

Getting Started

As an example, this is how you would use xdggs to reconstruct geographical coordinates from the cell ids then create an interactive plot indicating cell ids, data values and the associated geographical coordinates:

import xarray as xr
import xdggs

ds = xdggs.tutorial.open_dataset("air_temperature", "h3")

# Decode DGGS coordinates
ds_idx = ds.pipe(xdggs.decode)

# Assign geographical coordinates
ds_idx = ds_idx.dggs.assign_latlon_coords()

# Interactive visualization
ds_idx['air'].isel(time=0).compute().dggs.explore(center=0, cmap="viridis", alpha=0.5)

Roadmap

We have exciting plans to expand xdggs with new features and improvements. You can check out our roadmap in the design_doc.md file for details on the design of xdggs, upcoming features, and future enhancements.

Contributing

We welcome contributions to xdggs! Please follow these steps to get involved:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes and write tests.
  4. Ensure all tests pass (pytest).
  5. Submit a pull request!

License

xdggs is licensed under the Apache License License. See LICENSE for more details.

Acknowledgments

This project was initiated using funding from CNES (PANGEO IAOCEA, contract R&T R-S23/DU-0002-025-01) and the European Union (ERC, WaterSmartLand, 101125476, Interreg-BSR, HyTruck, #C031).

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

xdggs-0.2.0.tar.gz (4.2 MB view details)

Uploaded Source

Built Distribution

xdggs-0.2.0-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

Details for the file xdggs-0.2.0.tar.gz.

File metadata

  • Download URL: xdggs-0.2.0.tar.gz
  • Upload date:
  • Size: 4.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for xdggs-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ade15fa7f2bb4349cd6822b78c245902d7eaa37574e064c272ea29b60ea4f1ec
MD5 6cd8b19c2d236150359fd9da808ad538
BLAKE2b-256 62a1d616928da22f10725f4428205dd6c76947b8498c6b8a878bf64a69386515

See more details on using hashes here.

Provenance

The following attestation bundles were made for xdggs-0.2.0.tar.gz:

Publisher: pypipublish.yml on xarray-contrib/xdggs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xdggs-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: xdggs-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 34.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for xdggs-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc29d250791d3fbdc5fc1e1713df87c784350e031cff714014e588bea36a5151
MD5 6cce1dd74744a39bc7f6c9afdc9994d9
BLAKE2b-256 9fce5e675ade1f0055254eaf7f579ee7a59acbd50c611b1b41314198d04b7f52

See more details on using hashes here.

Provenance

The following attestation bundles were made for xdggs-0.2.0-py3-none-any.whl:

Publisher: pypipublish.yml on xarray-contrib/xdggs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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