environmentaltools.spatiotemporal.indicators.environmental_risk

environmentaltools.spatiotemporal.indicators.environmental_risk(data_cube, threshold, size=3)[source]

Calculate environmental risk as frequency of extreme values combined with polarization.

Combines threshold exceedance frequency with neighborhood polarization to assess environmental risk. Areas with both high exceedance frequency and high polarization are considered highest risk.

Parameters:
  • data_cube (np.ndarray) – 3D array with shape (time, lat, lon) containing spatiotemporal data.

  • threshold (float) – Threshold defining extreme/hazardous conditions.

  • size (int, optional) – Neighborhood size for polarization calculation. Default is 3.

Returns:

risk_map – 2D map of environmental risk.

Return type:

np.ndarray

Notes

The risk is computed as the product of exceedance frequency and neighborhood polarization. This combines information about both the likelihood of extreme events and the spatial variability of conditions.

Examples

>>> import numpy as np
>>> data_cube = np.random.gamma(2, 1, (100, 30, 30))
>>> risk_map = environmental_risk(data_cube, threshold=3.0, size=3)