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.
Why pyFIA?
| 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 |
Quick Start
pip install pyfia
from pyfia import FIA, tpa, volume, area
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")
Core Functions
| 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") |
site_index() |
Site productivity index | site_index(db, grp_by="COUNTYCD") |
mortality() |
Annual mortality rates | mortality(db) |
growth() |
Net growth estimation | growth(db) |
Statistical Methods
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
Installation
# 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.
Documentation
Full documentation: pyfia.mintlify.app
Citation
@software{pyfia2025,
title = {pyFIA: A Python Library for Forest Inventory Applications},
author = {Mihiar, Christopher},
year = {2025},
url = {https://github.com/mihiarc/pyfia}
}
Affiliation
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.
Metadata
Release files for pyfia 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyfia-1.5.0.tar.gz | 328.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyfia-1.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 707.7 kB
Release files / pyfia-1.5.0.tar.gz
| Download URL | pyfia-1.5.0.tar.gz |
|---|---|
| Size | 328.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9af2f15d9d4b42f4fc099b824fbf687e72491c0a180b79e4bbb4ee95cea578b3
|
|
BLAKE2b-256 checksum How to use checksums |
dba47530387704d2b45dcac8336c589cd30c18a81b44723c4ae8472d2e895514
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logRelease files / pyfia-1.5.0-py3-none-any.whl
| Download URL | pyfia-1.5.0-py3-none-any.whl |
|---|---|
| Size | 378.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ffafb23474c86f2e71c3187437594975fef87571a8c688181f2f760ea7b4565
|
|
BLAKE2b-256 checksum How to use checksums |
47f7ce03948ac31e149384939d1f3b89344d216985d5167cf8bf125a13c2d16a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency log