ls_fetch_usa: Fetch USA Forest Inventory and Analysis (FIA) datasets

Description Usage Arguments Value Examples

View source: R/ls_fetch_usa.R

Description

Fetch USA Forest Inventory and Analysis (FIA) datasets

Usage

1
ls_fetch_usa(state, what = "tree", ...)

Arguments

state

(character) one or more states (2 letter code), or the special "all", for all states

what

(character) what data to get, one or more values, default: tree

...

curl options passed on to crul::verb-GET

Value

a tibble (a data.frame)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## Not run: 
# Northern Mariana Islands - trees
ls_fetch_usa(state = "MP")
# Guam - trees
ls_fetch_usa(state = "GU")
# Guam - seedling
ls_fetch_usa(state = "GU", what = "seedling")
# Alaska - plot
ak_plot <- ls_fetch_usa(state = "AK", what = "plot")
# Arizona - vegetiation subplot - no data, empty data.frame
ls_fetch_usa(state = "AZ", what = "veg_subplot")

# multiple states
x <- ls_fetch_usa(state = c('mp', 'gu'))
x$mp_tree
x$gu_tree

# multiple datasets
y <- ls_fetch_usa('as', what = c('seedling', 'plot'))
y$as_seedling
y$as_plot

# multiple states and multiple datasets
z <- ls_fetch_usa(state = c('mp', 'gu'), what = c('seedling', 'plot'))
z$mp_seedling
z$mp_plot
z$gu_seedling
z$gu_plot

# all states, be careful, lots of data
## ls_fetch_usa("all", "subplot_regen")

## End(Not run)

ropenscilabs/laselva documentation built on April 11, 2021, 10:45 a.m.