You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EO4Change Group 4 — Post-Fire Forest Recovery Monitor
Sentinel-2 + Landsat 8/9 pipeline that maps per-pixel forest recovery after wildfires using a Relative Recovery Indicator (RRI) and Land Surface Temperature. Built for the DTU Space EO4Change course, June 2026.
What it does
Builds cloud-free seasonal composites from Sentinel-2 for three periods: pre-fire, post-fire (fire scar), and recent.
Computes a per-pixel RRI — how much of the pre-fire NDVI has been restored:
Classifies pixels into a recovery class: recovering well / recovering weakly / not recovering / outside assessment.
Generates time-series plots (RRI, NDVI, NDRE, NBR) and a pixel-count histogram by class.
Exports an interactive HTML map with all layers, a dynamic legend, and a Chart.js time-series panel.
Optionally adds a Land Surface Temperature layer (Landsat 8/9 Collection 2 L2SP).
Study sites
Region
Config
Reference event
Rugballegård Skov, Denmark
data/config_DK.yaml
Tree planting April 2022
Pedrógão Grande, Portugal
data/config_pt.yaml
Wildfire June 2017
Setup
# Clone and enter the repo
git clone https://github.com/leahiebel/EO4Change-Tree-Replanting.git
cd EO4Change-Tree-Replanting
# Create and activate a virtual environment
python -m venv ../venv
source ../venv/bin/activate # macOS/Linux# ../venv/Scripts/activate # Windows# Install dependencies
pip install earthengine-api folium pyyaml pandas matplotlib python-dateutil
# Authenticate with Google Earth Engine (one-time)
python -c "import ee; ee.Authenticate()"
Running
# Denmark — default config
python src/gee.py
# Portugal
python src/gee.py --config config_pt.yaml
# Second run is fast: time-series loaded from cached CSV automatically
python src/gee.py --config config_pt.yaml
# Force re-extraction from GEE (discard the cache)
python src/gee.py --config config_pt.yaml --force-ts
# Skip time-series entirely (map only, no plots)
python src/gee.py --config config_pt.yaml --map-only
Speed tip: The first full run extracts all time windows from GEE (slow, ~1 min/window).
Every subsequent run loads the cached timeseries_{region}.csv instantly and skips GEE.
Use --force-ts to refresh the cache after changing the temporal config.
Outputs
File
Description
src/timeseries_{region}.csv
Per-window AOI-mean values for all bands + RRI (cached)
src/timeseries_rri_{region}.png
RRI time series
src/timeseries_ndvi_{region}.png
NDVI time series
src/timeseries_ndre_{region}.png
NDRE time series
src/timeseries_nbr_{region}.png
NBR time series
src/histogram_recovery_class_{region}.png
Pixel counts by recovery class
src/map_{region}.html
Interactive Folium map — open in any browser
HTML map
Toggle any layer → the legend in the bottom-right updates automatically.
Toggle any layer → the time-series panel (top-left) shows the matching index over time with a reference-event line (RRI layer → RRI chart; NDVI layer → NDVI chart; etc.).
Click a red cluster marker (failed-pixel diagnostics) → popup with reasoning and an interactive time-series chart for that location.
Config
All pipeline parameters live in a YAML file under data/. Key sections: