API Reference
This page contains auto-generated documentation for wxee
modules and classes.
Initialization
All automated requests to Earth Engine, such as those made by wxee
should be made using the
high-volume Earth Engine endpoint. This can be done
by specifying the high-volume endpoint using ee.Initialize
or by using the wxee.Initialize
shortcut.
|
Initialize Earth Engine using the high-volume endpoint designed for automated requests. |
Earth Engine Classes
Base Earth Engine classes have additional functionality available through the wx
accessor. These methods are also
accessible to TimeSeries
and Climatology
objects, and are the primary interface for
exporting and downloading Earth Engine data in wxee
.
The wx Accessor
To use methods extended by wxee
, just import the package and use the wx
accessor.
import ee
import wxee
ee.Image("MODIS/006/MOD13Q1/2000_02_18").wx.to_xarray()
ee.Image
|
Convert an image to an xarray.Dataset. |
|
Download an image to geoTIFF. |
ee.ImageCollection
|
Convert an image collection to an xarray.Dataset. |
|
Download all images in the collection to geoTIFF. |
Convert to a |
|
|
Return the image at the specified index in the collection. |
Return the last image in the collection. |
xarray Classes
The wxee
package adds a few helpful methods to xarray
classes through the same wx
accessor
used by Earth Engine Classes. To use them, just import the package and use the wx
accessor.
xarray.Dataset
|
Generate an RGB color composite plot of the Dataset. |
xarray.DataArray
|
Normalize a Dataset's values between 0 and 1. |
Time Series
Time series are image collections with added functionality for processing in the time dimension.
Note
A TimeSeries
can be converted to xarray
and tif
using the wx
accessor, just like an
ee.ImageCollection
.
Creating a Time Series
Time series can be instantiated in two ways:
From an ID
import ee
import wxee
ts = wxee.TimeSeries("IDAHO_EPSCOR/GRIDMET")
From a Collection
See ImageCollection.to_time_series()
.
import ee
import wxee
col = ee.ImageCollection("IDAHO_EPSCOR/GRIDMET")
ts = col.wx.to_time_series()
Describing a Time Series
There are a number of properties and methods that describe the characteristics of a time series.
The |
|
The |
|
|
Compute the mean time interval between images in the time series. |
|
Generate and print descriptive statistics about the Time Series such as the ID, start and end dates, and time between images. |
Generate an interactive plot showing the acquisition time of each image in the time series. |
|
|
Generate a Pandas dataframe describing properties of each image in the time series. |
Modifying a Time Series
Processing can be applied in the time dimension to modify a time series or create new time series.
|
Aggregate the collection over the time dimension to a specified frequency. |
|
Use interpolation to synthesize data at a given time within the time series. |
|
Apply a rolling reducer over the time dimension. |
|
Apply gap-filling using a moving window reducer through time. |
Insert an image into the time series and sort it by |
Calculating Climatologies
Time series of weather data can be transformed into climatologies.
|
Calculate a mean climatology image collection with a given frequency. |
|
Calculate a standard deviation climatology image collection with a given frequency. |
|
Calculate climatological anomalies for the time series. |
Climatology
Climatologies are image collections where images represent long-term climatological normals at specific time steps.
Creating a Climatology
Climatologies are created using TimeSeries.climatology_mean()
or TimeSeries.climatology_std()
.
Warning
The Climatology
class should never be instantiated directly.
import ee
import wxee
ts = wxee.TimeSeries("IDAHO_EPSCOR/GRIDMET").select("pr")
monthly_mean_rainfall = ts.climatology_mean("month", reducer=ee.Reducer.sum())
Note
The reducer
argument defines how the raw data will be aggregated before calculating the climatological mean.
In this case, we use ee.Reducer.sum()
to aggregate the daily rainfall measurements into monthly totals. If the
data were already monthly, the reducer would have no effect.
Describing a Climatology
In addition to having all the methods extended with the wx
accessor, there are methods for describing the characteristics of a climatology.
Generate and print descriptive statistics about the Climatology such as the ID, number of images, and frequency. |