A high-performance Python library for analyzing USDA Forest Inventory and Analysis (FIA) data. Built on DuckDB and Polars for speed, with statistical methods that match EVALIDator exactly.
| Feature | pyFIA | EVALIDator |
|---|---|---|
| Speed | 10-100x faster | Baseline |
| Interface | Python API | Web UI |
| Reproducibility | Code-based | Manual |
| Custom analysis | Unlimited | Limited options |
| Statistical validity | ✓ Exact match | ✓ Reference |
pip install pyfiafrom pyfia import FIA, tpa, volume, area, total_ecosystem
with FIA("path/to/FIA_database.duckdb") as db:
db.clip_by_state(37) # North Carolina
db.clip_most_recent(eval_type="VOL")
# Core estimates
trees = tpa(db, tree_domain="STATUSCD == 1")
timber = volume(db, land_type="timber")
forest = area(db, land_type="forest")
# Total ecosystem carbon (all 6 IPCC/NGHGI pools)
carbon = total_ecosystem(db)| Function | Description | Example |
|---|---|---|
tpa() |
Trees per acre | tpa(db, tree_domain="DIA >= 5.0") |
biomass() |
Above/belowground biomass | biomass(db, by_species=True) |
volume() |
Merchantable volume (ft³) | volume(db, land_type="timber") |
area() |
Forest land area | area(db, grp_by="FORTYPCD") |
live_tree() |
NSVB live tree carbon | live_tree(db, pool="ag") |
standing_dead() |
NSVB standing dead carbon | standing_dead(db, pool="ag") |
understory() |
Understory vegetation carbon | understory(db, pool="total") |
downed_dead() |
Downed dead wood carbon | downed_dead(db) |
litter() |
Litter carbon | litter(db) |
soil_organic() |
Soil organic carbon | soil_organic(db) |
total_ecosystem() |
Total ecosystem carbon (all 6 pools) | total_ecosystem(db) |
stock_change() |
Carbon stock change between periods | stock_change(db, pool="all") |
site_index() |
Site productivity index | site_index(db, grp_by="COUNTYCD") |
mortality() |
Annual mortality rates | mortality(db) |
growth() |
Net growth estimation | growth(db) |
pyFIA implements design-based estimation following Bechtold & Patterson (2005):
- Post-stratified estimation with proper variance calculation
- Ratio-of-means estimators for per-acre values
- EVALID-based filtering for statistically valid estimates
- Temporal methods: TI, annual, SMA, LMA, EMA
# Recommended: use uv for fast, reliable installs
uv pip install pyfia
# Or with pip
pip install pyfia
# With spatial support (polygon clipping, spatial joins)
uv pip install pyfia[spatial]Tip: Always use a virtual environment (
uv venvorpython -m venv .venv).
For development setup, see the Getting Started guide.
Full documentation: mihiarc.github.io/pyfia
@software{pyfia2025,
title = {pyFIA: A Python Library for Forest Inventory Applications},
author = {Mihiar, Christopher},
year = {2025},
url = {https://github.com/mihiarc/pyfia}
}Developed in collaboration with USDA Forest Service Research & Development. pyFIA provides programmatic access to Forest Inventory and Analysis (FIA) data but is not part of the official FIA Program.