- Notifications
You must be signed in to change notification settings - Fork16
A Python interface between Earth Engine and xarray for processing time series data
License
aazuspan/wxee
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation

wxee was built to make processing gridded, mesoscale time series data quickand easy by integrating the data catalog and processing power ofGoogle Earth Engine with theflexibility ofxarray, with no complicated setup required. To accomplish this, wxee implementsconvenient methods for data processing, aggregation, downloading, and ingestion.
wxee can be found in theEarth Engine Developer Resources!
- Time series image collections toxarray orGeoTIFF in one line of code
- Climatological anomalies and temporalaggregation,interpolation,smoothing, andgap-filling in Earth Engine
- Color composite plots fromxarray datasets
- Parallel processing for fast downloads
To see some of the capabilities of wxee and try it yourself, check out the interactive notebookshere!
pip install wxee
conda install -c conda-forge wxee
Once you have access to Google Earth Engine, just import and initializeee
andwxee
.
importeeimportwxeewxee.Initialize()
Download and conversion methods are extended toee.Image
andee.ImageCollection
using thewx
accessor. Justimport wxee
and use thewx
accessor.
ee.ImageCollection("IDAHO_EPSCOR/GRIDMET").wx.to_xarray()
ee.ImageCollection("IDAHO_EPSCOR/GRIDMET").wx.to_tif()
Additional methods for processing image collections in the time dimension are available through theTimeSeries
subclass.ATimeSeries
can be created from an existingee.ImageCollection
...
col=ee.ImageCollection("IDAHO_EPSCOR/GRIDMET")ts=col.wx.to_time_series()
Or instantiated directly just like you would anee.ImageCollection
!
ts=wxee.TimeSeries("IDAHO_EPSCOR/GRIDMET")
Many weather datasets are in daily or hourly resolution. These can be aggregated to coarser resolutions using theaggregate_time
method of theTimeSeries
class.
ts=wxee.TimeSeries("IDAHO_EPSCOR/GRIDMET")monthly_max=ts.aggregate_time(frequency="month",reducer=ee.Reducer.max())
Long-term climatological means can be calculated using theclimatology_mean
method of theTimeSeries
class.
ts=wxee.TimeSeries("IDAHO_EPSCOR/GRIDMET")mean_clim=ts.climatology_mean(frequency="month")
Bugs or feature requests are always appreciated! They can be submittedhere.
Code contributions are also welcome! Please open anissue to discuss implementation,then follow the steps below. Developer setup instructions can be foundin the docs.
About
A Python interface between Earth Engine and xarray for processing time series data