Skip to main content

earthchange

Multipurpose satellite environmental monitoring and change detection, in pure Python. 29 scenarios from free public archives: fire danger (Canadian FWI on BMKG thresholds), smoke exposure in person-days, air-parcel trajectories (HYSPLIT), drought, paddy-field drought per plot (planting delay from Sentinel-1, water adequacy, a 7-day outlook), land-surface heat, floods, deforestation, mining, urbanisation and surface-water change — via Google Earth Engine or Microsoft Planetary Computer (no account needed). Export georeferenced GeoTIFFs, quick-look PNGs, statistics, print-ready A4 maps, citable Markdown records, and a one-file brief that assembles a whole assessment. Every output carries its own limits.

Install

Heavy dependencies are optional extras, so the install stays lean:

pip install 'earthchange[gee]'       # Google Earth Engine backend (free account)
pip install 'earthchange[mpc,maps]'  # Planetary Computer + maps (no account)
pip install 'earthchange[all]'       # Earth Engine + Planetary Computer + maps

Python 3.11+. Install into its own environment (conda create -n earthchange python=3.12 && conda activate earthchange) and activate it in every new terminal. For the Earth Engine backend, sign in once: earthengine authenticate, then earthengine set_project YOUR-PROJECT-ID.

If the first run fails:

Message Fix
command not found: earthchange another environment is active: conda activate earthchange
The GEE backend needs earthengine-api pip install 'earthchange[gee]', or add --backend mpc
Earth Engine could not start: … earthengine authenticate and earthengine set_project …
zsh: no matches found quote the extras: 'earthchange[all]'

Full list: Troubleshooting.

Quick start

# Deforestation around a coordinate, with a finished map
earthchange -s deforestation --lat -3.333 --lon 122.25 --radius 6 --map

# Flood extent from Sentinel-1 SAR — no Earth Engine account needed
earthchange -s flood --lat 27.2 --lon 68.3 \
    --pre 2022-07-01:2022-07-25 --post 2022-08-20:2022-09-10 --backend mpc

# Urban growth timing across 2010/2015/2020 (Landsat 5/8/9)
earthchange -s urban-trend --lat -6.30 --lon 107.15 --map

# List everything
earthchange --list

Each run writes a self-contained output/<run-id>/ folder containing the PNG, GeoTIFF, statistics JSON, metadata, and any maps.

Short commands (Indonesian, for routine tasks)

Name a place and a date; earthchange picks the sensor, windows and thresholds, uses Planetary Computer (no account), counts hectares inside the place's OpenStreetMap boundary, and writes an Indonesian RINGKASAN.md with the limits.

earthchange banjir    "Pining, Gayo Lues"       2026-11-08     # flood after an event
earthchange kebakaran "Muara Pawan, Ketapang"   2026-09-15     # burned area
earthchange hutan     "Sungai Kakap, Kubu Raya" 2019 2025      # vegetation loss
earthchange kota      "Kota Bekasi"             2020 2025      # new built-up land
earthchange air       "Kabupaten Demak"         2020 2025      # new surface water

From Python

Every scenario is one call. Keyword arguments are the command-line options with - written as _; the result holds the run folder and its statistics.

import earthchange as ec

run = ec.run("deforestation", out_dir="deforestasi", lat=-3.333, lon=122.25,
             radius=5, map=True)
run.stats["results"]["pct_affected"]   # 4.1
run.tif()                              # path of the GeoTIFF
run.command                            # the equivalent terminal command

ec.short("banjir", "Pining, Gayo Lues", "2026-11-08")   # a short command

Scenarios

Scenario Method Sensor
deforestation NDVI loss Sentinel-2
urbanization Built-up gain — NDBI (default), UI, BU, IBI, or thermal NDISI/EBBI via --method Sentinel-2 / Landsat
water NDWI change Sentinel-2
burn dNBR severity Sentinel-2
mining SIRAD radar temporal + NDVI loss Sentinel-1 + S2
flood SAR water extent (event vs baseline) Sentinel-1
urban-trend NDBI at 3 epochs → RGB growth-timing map Landsat 5/8/9
coastline Sea boundary + shoreline change (erosion/accretion) + retreat rate m/yr S1 / S2 / Landsat
transit-access % population with access to public transport (SDG 11.2.1) WorldPop + OSM
island-heat SST + LST + wet-bulb (humid heat) trends for small islands OISST / Landsat / ERA5
urban-heat Urban heat island (SUHII) + hot-spot map + decadal trend GHSL + Landsat + MODIS
forest-history Multi-epoch deforestation: year-of-loss map + forest-area trajectory S2 / Landsat NDVI
forest-account Tree-cover loss by year, primary forest and driver, per regency; optional open ground Hansen GFC + WRI/Google + Dynamic World
timelapse One cloud-free frame per year → PNGs + MP4 Landsat (1984+) / Sentinel-2
embeddings Foundation-model embeddings: change, similarity, few-shot classes, expansion timeline, clusters AlphaEarth (GEE) / TESSERA
population-change Two-epoch population change: Miloš-style spike poster + map + optional true GPU 3D via forge3d GHSL GHS_POP
haze Smoke & air quality during fires: PM2.5 (ISPU), aerosol index, hotspots CAMS + Sentinel-5P + FIRMS
fire-history Multi-year fire record: burned area per year (peat vs mineral), recurrence map, fire season MODIS MCD64A1 + FIRMS

Two backends

--backend Data source Account?
gee (default) Google Earth Engine free account + earthengine authenticate
mpc Microsoft Planetary Computer (STAC) none — streams COGs, processes locally

Optical scenarios build cloud-masked median composites; radar scenarios auto-select the Sentinel-1 orbit with coverage. The AOI is a square centred on your coordinate. Landsat 7 is skipped (SLC-off gaps).

Make maps from a finished run

earthmap output/<run-id>            # render A4 map sheets offline (no GEE)

Map sheets include an OpenStreetMap basemap, the change layer, legend, a statistics panel, a location inset, coordinate grid, scale bar and north arrow.

License

MIT © Firman Hadi. Data: Copernicus Sentinel (ESA) and Landsat (USGS/NASA), via Google Earth Engine or Microsoft Planetary Computer.

Metadata

Release files for earthchange 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for earthchange 0.3.2
File Size Uploaded Provenance Actions
earthchange-0.3.2.tar.gz 492.6 kB With provenance Details for earthchange-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for earthchange 0.3.2
File Interpreter ABI Platform Actions
earthchange-0.3.2-py3-none-any.whl Python 3 none any Details for earthchange-0.3.2-py3-none-any.whl

Total release size: 989.9 kB

Release files / earthchange-0.3.2.tar.gz

Download URL earthchange-0.3.2.tar.gz
Size 492.6 kB
Tags Source
SHA-256 checksum
How to use checksums
730b69d9ff76a7473839890aa36fd5f3d72271be1299bb3f187c46365c8924a9
BLAKE2b-256 checksum
How to use checksums
49bfd9c620dda2e601af25b1af1bfa88bd342c340a5ffab989c6c13e4548393e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / earthchange-0.3.2-py3-none-any.whl

Download URL earthchange-0.3.2-py3-none-any.whl
Size 497.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3083ea1105db8ff870ff65966ad2787944d984ad3bfe25895c9556f6c1913c97
BLAKE2b-256 checksum
How to use checksums
0aad014bfebdbe78acbbe9bba838f39bef9f9773adc1daf56e0dcaa774df8742
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for earthchange 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for earthchange-0.3.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page