Download a state
pyFIA downloads data directly from the USDA Forest Service FIA DataMart, converts it to a fast DuckDB database, and caches it locally.The first call fetches the data; later calls return the cached path instantly. See Downloading data for multi-state downloads, caching, and options.
Connect and select an evaluation
Open the database with the
FIA class, then narrow it to a single evaluation. This step is not optional — see the warning below.Run your first estimate
Every estimator takes the database as its first argument and returns a Polars DataFrame.You just produced a design-based estimate of Rhode Island’s forest area — with a standard error — following the official FIA methodology.
Read the result
Results are Polars DataFrames whose columns are named for what they measure. For
Other estimators follow the same pattern with their own prefixes —
area() you get the percentage of area, the total in acres, a standard error, and plot counts:| Column | Meaning |
|---|---|
AREA | Total area in acres |
AREA_SE | Standard error of AREA (the total, in acres) |
AREA_PERC | Percentage of the sampled area |
AREA_SE_PERCENT | Standard error of AREA_PERC (the percentage) |
N_PLOTS | Plots contributing to the estimate |
YEAR | Inventory year |
VOLCFNET_ACRE
and VOLCFNET_TOTAL for volume(),
MORT_ACRE for mortality(), and so
on. Every estimate comes with standard-error columns (suffix _SE); area() and
volume() also include variance columns — see Understanding variance.
Pass totals=False to drop the population totals.Group your results
Addgrp_by to break an estimate down by any FIA column. pyFIA automatically attaches readable names for common codes like forest type and ownership:
A complete script
Configuration
pyFIA reads a few environment variables for defaults:Next steps
How-to guides
Downloading, domain filtering, grouping, and spatial analysis.
How FIA estimation works
The sampling design, the EVALID system, and expansion factors.
Worked examples
Real analyses you can copy and adapt.
API reference
Full documentation for every estimator.