BEA_RgnData: Get BEA regional data

Description Usage Arguments Details Value Examples

Description

BEA_RgnData returns a data frame with requested regional data. Right now only works with annual.

Usage

1
BEA_RgnData(keycode, key)

Arguments

keycode

a variable name (see BEA_ParamVals); default: no default

key

Your BEA API key (can be obtained for free - check www.bea.gov); default: my key

Details

Queries the BEA API to get the data. It determines from the keycode whether it is annual or quarterly data

Value

data frame with the regional data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
BEA_DSparams("RegionalData")
geofips <- BEA_ParamVals("RegionalData", "GeoFips")
head(geofips)
BEA_ParamVals("RegionalData", "KeyCode")
keycode <- "GDP_SP"
df <- BEA_RgnData(keycode)
head(df)
# Now get quarterly data
df <- BEA_RgnData("PROP_QI")
head(df)

donboyd5/apitools documentation built on May 15, 2019, 10:38 a.m.