Earth Engine to xarray interface
Project description
What is wxee?
wxee was built to make processing gridded, mesoscale time series data quick and easy by integrating the data catalog and processing power of Google Earth Engine with the flexibility of xarray, with no complicated setup required. To accomplish this, wxee implements convenient methods for data processing, aggregation, downloading, and ingestion.
wxee can be found in the Earth Engine Developer Resources!
Features
Time series image collections to xarray or GeoTIFF in one line of code
Climatological anomalies and temporal aggregation, interpolation, smoothing, and gap-filling in Earth Engine
Color composite plots from xarray datasets
Parallel processing for fast downloads
To see some of the capabilities of wxee and try it yourself, check out the interactive notebooks here!
Install
Pip
pip install wxee
Conda
conda install -c conda-forge wxee
Quickstart
Setup
Once you have access to Google Earth Engine, just import and initialize ee and wxee.
import ee
import wxee
wxee.Initialize()
Download Images
Download and conversion methods are extended to ee.Image and ee.ImageCollection using the
wx accessor. Just import wxee and use the wx accessor.
xarray
ee.ImageCollection("IDAHO_EPSCOR/GRIDMET").wx.to_xarray()
GeoTIFF
ee.ImageCollection("IDAHO_EPSCOR/GRIDMET").wx.to_tif()
Create a Time Series
Additional methods for processing image collections in the time dimension are available through the TimeSeries subclass.
A TimeSeries can be created from an existing ee.ImageCollection…
col = ee.ImageCollection("IDAHO_EPSCOR/GRIDMET")
ts = col.wx.to_time_series()
Or instantiated directly just like you would an ee.ImageCollection!
ts = wxee.TimeSeries("IDAHO_EPSCOR/GRIDMET")
Aggregate Daily Data
Many weather datasets are in daily or hourly resolution. These can be aggregated to coarser resolutions using the aggregate_time
method of the TimeSeries class.
ts = wxee.TimeSeries("IDAHO_EPSCOR/GRIDMET")
monthly_max = ts.aggregate_time(frequency="month", reducer=ee.Reducer.max())
Calculate Climatological Means
Long-term climatological means can be calculated using the climatology_mean method of the TimeSeries class.
ts = wxee.TimeSeries("IDAHO_EPSCOR/GRIDMET")
mean_clim = ts.climatology_mean(frequency="month")
Contribute
Bugs or feature requests are always appreciated! They can be submitted here.
Code contributions are also welcome! Please open an issue to discuss implementation, then follow the steps below. Developer setup instructions can be found in the docs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wxee-0.5.0.tar.gz.
File metadata
- Download URL: wxee-0.5.0.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ad1f2e1c625e2b13ba81c50b84236bde35f7ab578791917a6c23ec0fe4e9f30
|
|
| MD5 |
7f649180a59e8ca30a2e8080e2ab19d7
|
|
| BLAKE2b-256 |
ceb250f6c923dddd1617a6e5329a74d61cf4408f6e435537f50b7e4b1e1a83f7
|
Provenance
The following attestation bundles were made for wxee-0.5.0.tar.gz:
Publisher:
publish.yaml on aazuspan/wxee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wxee-0.5.0.tar.gz -
Subject digest:
5ad1f2e1c625e2b13ba81c50b84236bde35f7ab578791917a6c23ec0fe4e9f30 - Sigstore transparency entry: 424182157
- Sigstore integration time:
-
Permalink:
aazuspan/wxee@33b79185953e9fc64ad5508f66137992620afec4 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/aazuspan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@33b79185953e9fc64ad5508f66137992620afec4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file wxee-0.5.0-py3-none-any.whl.
File metadata
- Download URL: wxee-0.5.0-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c56cf2178c23fac7d8775a6f2eb4181c001e1b345b52a636038e3d313c0d8e8
|
|
| MD5 |
7be21fd7dd525f7d1da6664fa52fb9eb
|
|
| BLAKE2b-256 |
8c6f0f6b6e860c11beecc409befceda09cc15dfadd893d43f1179cb260e063c1
|
Provenance
The following attestation bundles were made for wxee-0.5.0-py3-none-any.whl:
Publisher:
publish.yaml on aazuspan/wxee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wxee-0.5.0-py3-none-any.whl -
Subject digest:
9c56cf2178c23fac7d8775a6f2eb4181c001e1b345b52a636038e3d313c0d8e8 - Sigstore transparency entry: 424182175
- Sigstore integration time:
-
Permalink:
aazuspan/wxee@33b79185953e9fc64ad5508f66137992620afec4 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/aazuspan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@33b79185953e9fc64ad5508f66137992620afec4 -
Trigger Event:
push
-
Statement type: