wxee


Namewxee JSON
Version 0.4.2 PyPI version JSON
download
home_pageNone
SummaryEarth Engine to xarray interface
upload_time2023-12-21 22:46:01
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords earth-engine time-series xarray
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. 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/tests.yml/badge.svg
   :alt: Build status
   :target: https://github.com/aazuspan/wxee
.. image:: https://codecov.io/gh/aazuspan/wxee/branch/main/graph/badge.svg?token=OeSeq4b7NF
   :alt: Code coverage
   :target: https://codecov.io/gh/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 <https://github.com/aazuspan/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 <https://earthengine.google.com/>`_ with the 
flexibility of `xarray <https://github.com/pydata/xarray>`_, with no complicated setup required. To accomplish this, wxee implements 
convenient methods for data processing, aggregation, downloading, and ingestion.

`wxee <https://github.com/aazuspan/wxee>`__ can be found in the `Earth Engine Developer Resources <https://developers.google.com/earth-engine/tutorials/community/developer-resources#python>`_!


Features
--------
* Time series image collections to `xarray <https://wxee.readthedocs.io/en/latest/examples/image_collection_to_xarray.html>`__ or `GeoTIFF <https://wxee.readthedocs.io/en/latest/examples/downloading_images_and_collections.html>`_ in one line of code
* `Climatological anomalies <https://wxee.readthedocs.io/en/latest/examples/climatology_anomaly.html>`_ and temporal `aggregation <https://wxee.readthedocs.io/en/latest/examples/temporal_aggregation.html>`_, `interpolation <https://wxee.readthedocs.io/en/latest/examples/temporal_interpolation.html>`_, `smoothing <https://wxee.readthedocs.io/en/latest/generated/wxee.time_series.TimeSeries.rolling_time.html>`_, and `gap-filling <https://wxee.readthedocs.io/en/latest/generated/wxee.time_series.TimeSeries.fill_gaps.html>`_ in Earth Engine
* `Color composite plots <https://wxee.readthedocs.io/en/latest/examples/color_composites.html>`_ 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 <https://wxee.readthedocs.io/en/latest/examples.html>`__!

Install
------------

Pip
~~~

.. code-block:: bash

   pip install wxee

Conda
~~~~~

.. code-block:: bash

    conda install -c conda-forge wxee

From Source
~~~~~~~~~~~

.. code-block:: bash

   git clone https://github.com/aazuspan/wxee
   cd wxee
   make install


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 <https://github.com/aazuspan/wxee/issues>`__. 

Code contributions are also welcome! Please open an `issue <https://github.com/aazuspan/wxee/issues>`__ to discuss implementation, 
then follow the steps below. Developer setup instructions can be found `in the docs <https://wxee.readthedocs.io/en/latest/contributing.html>`__.



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "wxee",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "earth-engine,time-series,xarray",
    "author": null,
    "author_email": "Aaron Zuspan <aazuspan@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c0/a5/5bf26cd73af5e4f278efb45d497fa7e7eddbcf8ce084af439fa28b1c922e/wxee-0.4.2.tar.gz",
    "platform": null,
    "description": ".. image:: https://raw.githubusercontent.com/aazuspan/wxee/main/docs/_static/wxee.png\n   :alt: wxee .-- -..-\n   :width: 200\n   :target: https://github.com/aazuspan/wxee\n\n|\n\n.. image:: https://img.shields.io/badge/Earth%20Engine%20API-Python-green\n   :alt: Earth Engine Python\n   :target: https://developers.google.com/earth-engine/tutorials/community/intro-to-python-api\n.. image:: https://img.shields.io/pypi/v/wxee\n   :alt: PyPI\n   :target: https://pypi.org/project/wxee/\n.. image:: https://img.shields.io/conda/vn/conda-forge/wxee.svg\n   :alt: conda-forge\n   :target: https://anaconda.org/conda-forge/wxee\n.. image:: https://colab.research.google.com/assets/colab-badge.svg\n   :alt: Open in Colab\n   :target: https://colab.research.google.com/github/aazuspan/wxee/blob/main/docs/examples/image_collection_to_xarray.ipynb\n.. image:: https://readthedocs.org/projects/wxee/badge/?version=latest&style=flat\n   :alt: Read the Docs\n   :target: https://wxee.readthedocs.io/en/latest/?badge=latest\n.. image:: https://github.com/aazuspan/wxee/actions/workflows/tests.yml/badge.svg\n   :alt: Build status\n   :target: https://github.com/aazuspan/wxee\n.. image:: https://codecov.io/gh/aazuspan/wxee/branch/main/graph/badge.svg?token=OeSeq4b7NF\n   :alt: Code coverage\n   :target: https://codecov.io/gh/aazuspan/wxee\n\n------------\n\n.. image:: https://raw.githubusercontent.com/aazuspan/wxee/main/docs/_static/demo_001.gif\n  :alt: Demo downloading weather data to xarray using wxee.\n\n\nWhat is wxee?\n-------------\n`wxee <https://github.com/aazuspan/wxee>`_ was built to make processing gridded, mesoscale time series data quick \nand easy by integrating the data catalog and processing power of `Google Earth Engine <https://earthengine.google.com/>`_ with the \nflexibility of `xarray <https://github.com/pydata/xarray>`_, with no complicated setup required. To accomplish this, wxee implements \nconvenient methods for data processing, aggregation, downloading, and ingestion.\n\n`wxee <https://github.com/aazuspan/wxee>`__ can be found in the `Earth Engine Developer Resources <https://developers.google.com/earth-engine/tutorials/community/developer-resources#python>`_!\n\n\nFeatures\n--------\n* Time series image collections to `xarray <https://wxee.readthedocs.io/en/latest/examples/image_collection_to_xarray.html>`__ or `GeoTIFF <https://wxee.readthedocs.io/en/latest/examples/downloading_images_and_collections.html>`_ in one line of code\n* `Climatological anomalies <https://wxee.readthedocs.io/en/latest/examples/climatology_anomaly.html>`_ and temporal `aggregation <https://wxee.readthedocs.io/en/latest/examples/temporal_aggregation.html>`_, `interpolation <https://wxee.readthedocs.io/en/latest/examples/temporal_interpolation.html>`_, `smoothing <https://wxee.readthedocs.io/en/latest/generated/wxee.time_series.TimeSeries.rolling_time.html>`_, and `gap-filling <https://wxee.readthedocs.io/en/latest/generated/wxee.time_series.TimeSeries.fill_gaps.html>`_ in Earth Engine\n* `Color composite plots <https://wxee.readthedocs.io/en/latest/examples/color_composites.html>`_ from **xarray** datasets\n* Parallel processing for fast downloads\n\n\nTo see some of the capabilities of wxee and try it yourself, check out the interactive notebooks `here <https://wxee.readthedocs.io/en/latest/examples.html>`__!\n\nInstall\n------------\n\nPip\n~~~\n\n.. code-block:: bash\n\n   pip install wxee\n\nConda\n~~~~~\n\n.. code-block:: bash\n\n    conda install -c conda-forge wxee\n\nFrom Source\n~~~~~~~~~~~\n\n.. code-block:: bash\n\n   git clone https://github.com/aazuspan/wxee\n   cd wxee\n   make install\n\n\nQuickstart\n----------\n\nSetup\n~~~~~\nOnce you have access to Google Earth Engine, just import and initialize :code:`ee` and :code:`wxee`.\n\n.. code-block:: python\n   \n   import ee\n   import wxee\n\n   wxee.Initialize()\n\n\nDownload Images\n~~~~~~~~~~~~~~~\n\nDownload and conversion methods are extended to :code:`ee.Image` and :code:`ee.ImageCollection` using the \n:code:`wx` accessor. Just :code:`import wxee` and use the :code:`wx` accessor.\n\nxarray\n^^^^^^\n\n.. code-block:: python\n\n   ee.ImageCollection(\"IDAHO_EPSCOR/GRIDMET\").wx.to_xarray()\n\nGeoTIFF\n^^^^^^^\n\n.. code-block:: python\n\n   ee.ImageCollection(\"IDAHO_EPSCOR/GRIDMET\").wx.to_tif()\n\n\nCreate a Time Series\n~~~~~~~~~~~~~~~~~~~~\n\nAdditional methods for processing image collections in the time dimension are available through the :code:`TimeSeries` subclass.\nA :code:`TimeSeries` can be created from an existing :code:`ee.ImageCollection`...\n\n.. code-block:: python\n\n   col = ee.ImageCollection(\"IDAHO_EPSCOR/GRIDMET\")\n   ts = col.wx.to_time_series()\n\nOr instantiated directly just like you would an :code:`ee.ImageCollection`!\n\n.. code-block:: python\n\n   ts = wxee.TimeSeries(\"IDAHO_EPSCOR/GRIDMET\")\n\n\nAggregate Daily Data\n~~~~~~~~~~~~~~~~~~~~\n\nMany weather datasets are in daily or hourly resolution. These can be aggregated to coarser resolutions using the :code:`aggregate_time`\nmethod of the :code:`TimeSeries` class.\n\n.. code-block:: python\n\n   ts = wxee.TimeSeries(\"IDAHO_EPSCOR/GRIDMET\")\n   monthly_max = ts.aggregate_time(frequency=\"month\", reducer=ee.Reducer.max())\n\nCalculate Climatological Means\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nLong-term climatological means can be calculated using the :code:`climatology_mean` method of the :code:`TimeSeries` class.\n\n.. code-block:: python\n\n   ts = wxee.TimeSeries(\"IDAHO_EPSCOR/GRIDMET\")\n   mean_clim = ts.climatology_mean(frequency=\"month\")\n\nContribute\n----------\n\nBugs or feature requests are always appreciated! They can be submitted `here <https://github.com/aazuspan/wxee/issues>`__. \n\nCode contributions are also welcome! Please open an `issue <https://github.com/aazuspan/wxee/issues>`__ to discuss implementation, \nthen follow the steps below. Developer setup instructions can be found `in the docs <https://wxee.readthedocs.io/en/latest/contributing.html>`__.\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Earth Engine to xarray interface",
    "version": "0.4.2",
    "project_urls": {
        "Homepage": "https://github.com/aazuspan/wxee"
    },
    "split_keywords": [
        "earth-engine",
        "time-series",
        "xarray"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bb3489b0276caa64cf5ffb387b5941d05110e66a124f0c4951cf25a16650dcf4",
                "md5": "178d2d5822304bc10d0ceb38c1332941",
                "sha256": "e74f87b6627a86aab5318e8fcb1d8a8d7c6dc55369e05a3ac1edde47b2abba17"
            },
            "downloads": -1,
            "filename": "wxee-0.4.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "178d2d5822304bc10d0ceb38c1332941",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 26938,
            "upload_time": "2023-12-21T22:45:59",
            "upload_time_iso_8601": "2023-12-21T22:45:59.205093Z",
            "url": "https://files.pythonhosted.org/packages/bb/34/89b0276caa64cf5ffb387b5941d05110e66a124f0c4951cf25a16650dcf4/wxee-0.4.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c0a55bf26cd73af5e4f278efb45d497fa7e7eddbcf8ce084af439fa28b1c922e",
                "md5": "d0a5978ad444472c85d99c711b394b7f",
                "sha256": "e197df48c8b975fdc50793d2c554c9ec9617fa11ed262b2fec3b983e46f71042"
            },
            "downloads": -1,
            "filename": "wxee-0.4.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d0a5978ad444472c85d99c711b394b7f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 22149,
            "upload_time": "2023-12-21T22:46:01",
            "upload_time_iso_8601": "2023-12-21T22:46:01.929646Z",
            "url": "https://files.pythonhosted.org/packages/c0/a5/5bf26cd73af5e4f278efb45d497fa7e7eddbcf8ce084af439fa28b1c922e/wxee-0.4.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-21 22:46:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aazuspan",
    "github_project": "wxee",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "wxee"
}
        
Elapsed time: 0.15557s