We forecast forest canopy change using a binary classification target:
High Canopy Growth – The classification compares forest canopy change between 2015 and 2019 (a 4-year period), and counties with a ≥5% increase are labeled as high growth (1), others as 0. Stable/Declining – All other counties.
Our Forest Canopy Colab prepares forest canopy data for use in our Run Models Colab. The dataset is retrieved using the DataCommons API and paired with county-level geographic information based on FIPS codes.
The Colab notebook generates a .csv
file that classifies each U.S. county into two groups based on their relative forest cover growth over the past 4 years.
View .csv output: tree-canopy/targets
This dataset is based on Copernicus-derived forest land cover as a percentage, accessed through DataCommons for each U.S. county from the most recent available years (2015-2019).
1. County Metadata Collection:
get_places_in(["country/USA"], "County")
.2. Forest Land Cover Data Retrieval:
LandCoverFraction_Forest
.3. Determine Growth Window:
4. Merge and Clean Data:
5. Calculate Relative Growth:
relative_growth = ((recent - start) / start) * 100
1
(high growth), otherwise 0
.6. Export Final Target File:
input/targets/forest_canopy_data_target.csv
Fips
: U.S. county codeTarget
: Binary targetThe .csv
file is used as a target input for ML models predicting forest canopy trends based on other features (e.g., economic activity).
You can plug this into any modeling workflow by referencing the parameter YAML described below.
relative_growth = ((recent - start) / start) * 100
sklearn
) for trend fitting.statsmodels
) for 5-year canopy forecasts.forest_canopy_config.yaml
– YAML configuration for using this dataset as a model target.
```yaml folder: naics6-forestcanopy-counties-simple features: data: industries common: Fips path: https://raw.githubusercontent.com/ModelEarth/community-timelines/main/training/naics2/US/counties/2020/US-ME-training-naics2-counties-2020.csv targets: data: forest_canopy path: https://raw.githubusercontent.com/ModelEarth/tree-canopy/main/input/targets/forest_canopy_data_target.csv models: rbf