tidy_fia: Create tidy FIA tables

View source: R/tidy_FIA.R

tidy_fiaR Documentation

Create tidy FIA tables

Description

This function queries the FIA database, by state abbreviation(s) or area of interest,and returns a list of tidy data objects including the TREE, PLOT, COND, and SURVEY tables.

Usage

tidy_fia(
  states = NULL,
  aoi = NULL,
  postgis = TRUE,
  table_names = c("plot", "subplot", "cond", "tree", "survey"),
  file_dir = tempdir()
)

Arguments

states

a character vector of state abbreviations, ignored if aoi is supplied.

aoi

sf object containing area of interest

postgis

logical if true, query PostGIS database instead of downloading csvs from FIA Datamart.

table_names

list of FIA tables to download. Tables must be identified by their 'Oracle Table Name' as described in the 'Index of Tables' in FIADB User Guide.

file_dir

path to directory in which to download CSV files from the Datamart. If the files are already present in this folder, the existing files will be used.

Value

a list object containing tidy data

Author(s)

Henry Rodman, Brian Clough


SilviaTerra/tidyFIA documentation built on March 25, 2024, 8:15 p.m.