NIPA: Query the BEA API to get a single variable

Description Usage Arguments Details Value Examples

Description

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

Usage

1
NIPA(var, freq, dsname, key)

Arguments

var

a variable name in c("gdp", "gdppi", "rgdp")

freq

"q" or "a"; default: "q"

dsname

text name of the dataset (e.g., "NIPA") (see BEA_DSlist); default: "NIPA"

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.

Value

data frame with data

Examples

1
2
3
4
5
6
7
NIPA()
df <- NIPA("gdppi", "q")
head(df)
df <- NIPA("gdp", "a")
head(df)
df <- NIPA("rgdp")
head(df)

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