Skip to content

API Reference

Complete reference documentation for PyFIA's public API.

Core Classes

Class Description
FIA Main database class for working with FIA data
FIADataReader Low-level data reading utilities
PyFIASettings Configuration management

Estimation Functions

All estimation functions follow a consistent pattern:

result = estimator(db, **options)  # Returns pl.DataFrame
Function Description
area() Estimate forest area
area_change() Annual forest area change
volume() Estimate 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
panel() Remeasurement panels for harvest/change analysis

Data Download

Function Description
download() Download FIA data from DataMart
DataMartClient Low-level HTTP client for downloads
DownloadCache Cache management for downloads

Utility Functions

Function Description
join_species_names() Add species names to results
join_forest_type_names() Add forest type names
join_state_names() Add state names

Validation

Class/Function Description
EVALIDatorClient Client for USFS EVALIDator API
validate_pyfia_estimate() Compare estimates

Return Value Schema

All estimation functions return a polars.DataFrame with these columns:

Column Type Description
estimate Float Point estimate
variance Float Estimated variance
se Float Standard error
cv Float Coefficient of variation (%)
ci_lower Float Lower 95% confidence bound
ci_upper Float Upper 95% confidence bound
n_plots Int Number of plots in domain

Plus any grouping columns specified via grp_by.