https://github.com/aazuspan/wxee

A Python interface between Earth Engine and xarray for processing time series data

https://github.com/aazuspan/wxee

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary

Keywords

climate climatology earth-engine earth-observation gis gridded netcdf raster time-series weather wx xarray
Last synced: 5 months ago · JSON representation

Repository

A Python interface between Earth Engine and xarray for processing time series data

Basic Info
Statistics
  • Stars: 210
  • Watchers: 8
  • Forks: 17
  • Open Issues: 5
  • Releases: 13
Topics
climate climatology earth-engine earth-observation gis gridded netcdf raster time-series weather wx xarray
Created over 4 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License

README.rst

.. image:: https://raw.githubusercontent.com/aazuspan/wxee/main/docs/_static/wxee.png
   :alt: wxee .-- -..-
   :width: 200
   :target: https://github.com/aazuspan/wxee

|

.. image:: https://img.shields.io/badge/Earth%20Engine%20API-Python-green
   :alt: Earth Engine Python
   :target: https://developers.google.com/earth-engine/tutorials/community/intro-to-python-api
.. image:: https://img.shields.io/pypi/v/wxee
   :alt: PyPI
   :target: https://pypi.org/project/wxee/
.. image:: https://img.shields.io/conda/vn/conda-forge/wxee.svg
   :alt: conda-forge
   :target: https://anaconda.org/conda-forge/wxee
.. image:: https://colab.research.google.com/assets/colab-badge.svg
   :alt: Open in Colab
   :target: https://colab.research.google.com/github/aazuspan/wxee/blob/main/docs/examples/image_collection_to_xarray.ipynb
.. image:: https://readthedocs.org/projects/wxee/badge/?version=latest&style=flat
   :alt: Read the Docs
   :target: https://wxee.readthedocs.io/en/latest/?badge=latest
.. image:: https://github.com/aazuspan/wxee/actions/workflows/ci.yml/badge.svg
   :alt: Build status
   :target: https://github.com/aazuspan/wxee

------------

.. image:: https://raw.githubusercontent.com/aazuspan/wxee/main/docs/_static/demo_001.gif
  :alt: Demo downloading weather data to xarray using wxee.


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
~~~

.. code-block:: bash

   pip install wxee

Conda
~~~~~

.. code-block:: bash

    conda install -c conda-forge wxee


Quickstart
----------

Setup
~~~~~
Once you have access to Google Earth Engine, just import and initialize :code:`ee` and :code:`wxee`.

.. code-block:: python
   
   import ee
   import wxee

   wxee.Initialize()


Download Images
~~~~~~~~~~~~~~~

Download and conversion methods are extended to :code:`ee.Image` and :code:`ee.ImageCollection` using the 
:code:`wx` accessor. Just :code:`import wxee` and use the :code:`wx` accessor.

xarray
^^^^^^

.. code-block:: python

   ee.ImageCollection("IDAHO_EPSCOR/GRIDMET").wx.to_xarray()

GeoTIFF
^^^^^^^

.. code-block:: python

   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 :code:`TimeSeries` subclass.
A :code:`TimeSeries` can be created from an existing :code:`ee.ImageCollection`...

.. code-block:: python

   col = ee.ImageCollection("IDAHO_EPSCOR/GRIDMET")
   ts = col.wx.to_time_series()

Or instantiated directly just like you would an :code:`ee.ImageCollection`!

.. code-block:: python

   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 :code:`aggregate_time`
method of the :code:`TimeSeries` class.

.. code-block:: python

   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 :code:`climatology_mean` method of the :code:`TimeSeries` class.

.. code-block:: python

   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 `__.


Owner

  • Name: Aaron Zuspan
  • Login: aazuspan
  • Kind: user
  • Location: California, United States

Code | Pixels | Coordinates

GitHub Events

Total
  • Issues event: 5
  • Watch event: 4
  • Delete event: 4
  • Issue comment event: 3
  • Push event: 13
  • Pull request review event: 3
  • Pull request event: 13
  • Fork event: 1
  • Create event: 6
Last Year
  • Issues event: 5
  • Watch event: 4
  • Delete event: 4
  • Issue comment event: 3
  • Push event: 13
  • Pull request review event: 3
  • Pull request event: 13
  • Fork event: 1
  • Create event: 6

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 243
  • Total Committers: 1
  • Avg Commits per committer: 243.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Aaron Zuspan a****n@g****m 243

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 53
  • Total pull requests: 23
  • Average time to close issues: 3 months
  • Average time to close pull requests: 36 minutes
  • Total issue authors: 16
  • Total pull request authors: 2
  • Average comments per issue: 1.43
  • Average comments per pull request: 0.57
  • Merged pull requests: 22
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 2
  • Average time to close issues: 8 minutes
  • Average time to close pull requests: 2 minutes
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • aazuspan (34)
  • surajitdb (3)
  • fanqi203 (2)
  • davemlz (2)
  • Daniel-Trung-Nguyen (2)
  • faisalalnasser13 (1)
  • ameliafdezrodriguez (1)
  • spgriffin (1)
  • wep69 (1)
  • saeedojaghi (1)
  • evmpython (1)
  • guidocioni (1)
  • camile-sothe (1)
  • 12rambau (1)
  • benehiebl (1)
Pull Request Authors
  • aazuspan (27)
  • zxdawn (2)
  • 12rambau (1)
Top Labels
Issue Labels
enhancement (22) bug (10) stale (5) documentation (4) question (3) help wanted (2) good first issue (2)
Pull Request Labels
enhancement (7) bug (3) documentation (1)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 2,179 last-month
  • Total dependent packages: 3
    (may contain duplicates)
  • Total dependent repositories: 7
    (may contain duplicates)
  • Total versions: 34
  • Total maintainers: 1
proxy.golang.org: github.com/aazuspan/wxee
  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
pypi.org: wxee

Earth Engine to xarray interface

  • Versions: 13
  • Dependent Packages: 2
  • Dependent Repositories: 3
  • Downloads: 2,179 Last month
Rankings
Dependent packages count: 2.1%
Stargazers count: 5.1%
Average: 7.0%
Dependent repos count: 9.1%
Downloads: 9.2%
Forks count: 9.4%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: wxee
  • Versions: 8
  • Dependent Packages: 1
  • Dependent Repositories: 4
Rankings
Dependent repos count: 16.0%
Stargazers count: 27.5%
Average: 28.1%
Dependent packages count: 29.0%
Forks count: 40.0%
Last synced: 6 months ago

Dependencies

.github/workflows/tests-coverage.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v2 composite
.github/workflows/tests.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
docs/requirements.txt pypi
  • ipython *
  • nbsphinx *
  • sphinx ==7.0.1
  • sphinx-rtd-theme *
  • xarray *
pyproject.toml pypi
  • earthengine-api *
  • joblib *
  • rasterio *
  • requests *
  • rioxarray *
  • tqdm *
  • xarray *