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.

BlockAttributeImperial unitSI unit
fiadb.areaArea of forest/timberland landacreshectares
fiadb.volumeNet merchantable bole wood volume of live treescubic feetcubic meters
fiadb.biomassAboveground biomass of live treesdry short tonstonnes
fiadb.carbonAboveground carbon in live treesshort tonstonnes

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🔗

BlockKindDescription
fiadb.fullreportstandardQuery /fullreport directly for any attribute (snum) and grouping, given an evaluation code (wc)
fiadb.parametersstandardFetch 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/fiadb