Usage Guide
This guide helps you choose the right workflow for EII.
Client vs Compute
Use the client workflow when you want fast access to pre-computed global layers. Use the compute workflow when you need alternative aggregation methods or custom inputs.
| Workflow | When to use | Key functions | Dependencies |
|---|---|---|---|
| Client (precomputed) | Most users; quick stats and raster downloads | get_stats, get_raster, get_layers |
ecosystem-integrity-index[client] |
| Compute (on-the-fly) | Custom aggregation or recalculation for an AOI | calculate_eii, calculate_functional_integrity |
ecosystem-integrity-index[compute] |
| Training | Model development and validation | train_npp_model, validate_model |
ecosystem-integrity-index[training] |
Typical flows
1) Get summary statistics (client)
import ee
from eii.client import get_stats
ee.Initialize(project="your-project")
polygon = ee.Geometry.Rectangle([-60, -10, -55, -5])
stats = get_stats(polygon, stats=["mean", "min", "max"])
print(stats)
2) Download rasters (client)
from eii.client import get_raster
dataset = get_raster(polygon, include_components=True, output_format="memory")
print(dataset)
3) Compute components on the fly
from eii.compute import calculate_eii
result = calculate_eii(polygon, include_seasonality=True)
print(result)
Common tips
- Use
compute_mode="on_the_fly"only when you need non-default aggregation. - For large AOIs, prefer chunked downloads (
chunking="auto"inget_raster). - All workflows require an authenticated Earth Engine session.