fiadb
The fiadb collection wraps the USFS FIADB-API / EVALIDator service, which serves design-based Forest Inventory and Analysis (FIA) population estimates and their sampling errors directly from the official estimation engine.
This is the estimate-and-variance counterpart to data.fia: where data.fia downloads raw plot/tree/condition microdata tables, fiadb returns server-computed estimates (ESTIMATE, VARIANCE, SE, SE_PERCENT, PLOT_COUNT) ready to feed downstream stats / sae blocks.
There are two layers of blocks:
- Friendly blocks (
area,volume,biomass,carbon) — one per common attribute, with no FIA codes required. - Low-level blocks (
fullreport,parameters) — the power-user escape hatch and discovery surface, for any attribute or grouping the friendly blocks don't cover.
All blocks in this collection declare network: true because they query the FIADB-API over HTTPS.
Friendly blocks🔗
Each friendly block returns a design-based population estimate with its sampling error for a state, without needing to know attribute numbers (snum), evaluation codes (wc), or grouping LABEL_VAR strings. They share one input surface (state, year, group_by, land_basis, units) and the same tidy estimates CSV output.
| Block | Attribute | Imperial unit | SI unit |
|---|---|---|---|
fiadb.area | Area of forest/timberland land | acres | hectares |
fiadb.volume | Net merchantable bole wood volume of live trees | cubic feet | cubic meters |
fiadb.biomass | Aboveground biomass of live trees | dry short tons | tonnes |
fiadb.carbon | Aboveground carbon in live trees | short tons | tonnes |
Auto-resolution. A blank year resolves to the state's most recent evaluation; the resolved evaluation code and year are written to the block logs so a run is self-documenting. Set year explicitly to pin a result to a specific inventory.
Units. units: si converts ESTIMATE and SE by the attribute's linear conversion factor and VARIANCE by the factor squared. SE_PERCENT and PLOT_COUNT are unit-invariant.
Low-level blocks🔗
| Block | Kind | Description |
|---|---|---|
fiadb.fullreport | standard | Query /fullreport directly for any attribute (snum) and grouping, given an evaluation code (wc) |
fiadb.parameters | standard | Fetch a parameter dictionary (valid snum, wc, rselected, … values) to discover codes for fullreport |
Use fiadb.parameters to look up valid attribute numbers and grouping strings, then pass them to fiadb.fullreport for estimates outside what the friendly blocks cover — ratios (sdenom), custom groupings, change/growth/mortality estimates (rtime/ctime/ptime), or advanced filters (strFilter).
Output shape🔗
Every block in this collection writes the same tidy estimates CSV: an optional column per active grouping dimension, followed by ESTIMATE, VARIANCE, SE, SE_PERCENT, PLOT_COUNT. With no grouping, the file is a single grand-total row. This means friendly and low-level blocks feed downstream stats / sae blocks interchangeably.
Response warnings and provenance (attribute description, evaluations used, plot counts, GRM ratio warnings) are written to the block logs, not the output, so the CSV stays machine-tidy.
API notes🔗
- No authentication is required.
- Errors are returned by the API as an HTTP 200 HTML error page rather than a JSON error; the block detects this and fails with a non-zero exit, halting the pipeline.
Installation🔗
spade install file:///path/to/blocks/fiadbfiadb.area
Design-based FIA estimate of forest or timberland land area for a state, with sampling error.
Read →fiadb.volume
Design-based FIA estimate of net merchantable bole wood volume of live trees for a state, with sampling error.
Read →fiadb.biomass
Design-based FIA estimate of aboveground biomass of live trees for a state, with sampling error.
Read →fiadb.carbon
Design-based FIA estimate of aboveground carbon in live trees for a state, with sampling error.
Read →fiadb.fullreport
Query the FIADB-API /fullreport endpoint directly for any attribute and grouping.
Read →fiadb.parameters
Fetch a FIADB-API parameter dictionary to discover valid attribute and grouping codes.
Read →