Skip to main content
pyFIA turns the USDA Forest Service’s national forest inventory into a few lines of Python. Download a state, pick an estimator, and get design-based estimates — with proper variance — that match the official EVALIDator tool.
from pyfia import download, FIA, area

db_path = download("RI")          # pull Rhode Island straight from the FIA DataMart

with FIA(db_path) as db:
    db.clip_most_recent()         # use one complete, valid evaluation
    print(area(db, land_type="forest"))   # forest area, with SE and a 95% CI

Start here

Getting started

Install pyFIA and run your first estimate end-to-end in about five minutes.

How-to guides

Task-focused recipes: downloading data, filtering, grouping, and spatial analysis.

Concepts

How FIA sampling, the EVALID system, and design-based variance actually work.

API reference

Every public function and class, generated from the source docstrings.

Why pyFIA

Statistically valid

Design-based estimation following Bechtold & Patterson (2005), with standard errors and confidence intervals on every estimate.

Fast

Built on Polars and DuckDB for 10-100x faster analysis than legacy tooling.

EVALIDator-validated

Results checked against the official USFS estimates — typically within 1-3% on standard errors.

Simple API

Direct functions — volume(db), mortality(db), area(db) — not factories and builders.

Estimation functions

FunctionEstimates
area()Forest area by land type and category
area_change()Annual change in forest area
volume()Standing tree volume
tpa()Trees per acre and basal area
biomass()Tree biomass and carbon
site_index()Area-weighted mean site index
mortality()Annual tree mortality
growth()Annual tree growth
removals()Timber removals
tree_metrics()TPA-weighted statistics (QMD, mean height)
panel()Remeasurement panels for change/harvest analysis

Coming from rFIA?

pyFIA brings the ergonomics of R’s rFIA to Python:
TaskrFIA (R)pyFIA (Python)
Download a stategetFIA(states = 'RI')download("RI")
Multiple statesgetFIA(states = c('RI','CT'))download(["RI", "CT"])
Estimate areaarea(fia)area(db)
Estimate volumevolume(fia)volume(db)
pyFIA is released under the MIT License and built by Chris Mihiar. Found a bug or have a question? Open an issue.