Skip to content

Composites

apply_xyt_weights(xyt_weights, standardized_indicators, begin, end, sos=None)

Applies pixel-level time weights over an xr.Dataset.

Parameters:

Name Type Description Default
xyt_weights DataArray

xr.DataArray of monthly weights to be applied

required
standardized_indicators Dataset

xr.DataSet of indicators to be weighted, should already be shandardized into 0-100 range

required
begin date

datetime.date,

required
end date

datetime.date,

required
sos DataArray

xr.DataArray of season start and end if using different season length aggregations by pixel

None

Returns:

Name Type Description
weighted_standardized_indicators Dataset

xyt xr.DataSet

multiply_weights(da, weights)

Mutiplies Xarray by weights

percentile(da)

Computes percentile of each pixel of an Xarray

pixel_composite_index(indicators, begin, end, indicator_weights=None, sos=None)

Constructs a pixel-based composite index from indicators in an xr.DataSet. Is 'pixel-based' as the standardized values are based on the historical timeseries of the pixel Standardizes input indicators over time and applies variable importance weights

Parameters:

Name Type Description Default
indicators Dataset

xr.DataSet of N indicators to be combined

required
begin date

datetime.date,

required
end date

datetime.date,

required
indicator_weights list | None

list of len N of importance weights for each indicator

None
sos DataArray

xr.DataArray of season start and end if using different season length aggregations by pixel

None

Returns:

Name Type Description
standardized_indicators Dataset

xyt xr.DataSet of indicators standardized to 0-100 range

monthly_composite_index Dataset

xyt xr.DataSet of monthly index with variable weights applied