NIPA_Data: Get Data from a NIPA Table or a NIPA Underlying Detail Table...

Description Usage Arguments Details Value Examples

Description

NIPA_Data returns a data frame with a list of parameters for the particular dataset Pay particular attention to whether a data set will accept multiple table flags, or whether tables must be retrieved one by one

Usage

1
NIPA_Data(tableid, freq, dsname, key, verbose)

Arguments

tableid

the BEA table identifier (see BEA_ParamVals)

freq

"q" or "a"

dsname

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

key

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

verbose

default is FALSE

Details

Queries the BEA API to get a NIPA table

Value

data frame with data

Examples

1
2
3
4
5
6
7
# quarterly gdp percent change NIPA TableID 1 ####
head(NIPA_Data(1, "q"))
require(dplyr)
gdppch <- NIPA_Data(1, "q") %>% # NIPA is default dsname so don't have to specify it
  filter(SeriesCode=="A191RL") %>%
  select(date, gdppch=value)
head(gdppch)

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