beaViz: Visualize BEA API response payload

Description Usage Arguments Examples

Description

When entered into the R console, the function below starts an interactive dashboard. CAUTION: Currently only works with NATIONAL datasets (NIPA, NIUnderlyingDetail, FixedAs-sets). R Studio users must opt to "show in browser" for this method to be fully functional.

Usage

1
beaViz(beaPayload = NULL, beaKey = NULL)

Arguments

beaPayload

An httr response from call to BEA API

beaKey

Your 36-digit BEA API key

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
userSpecList <- list('UserID' = 'yourKey' ,
								'Method' = 'GetData',
								'datasetname' = 'NIPA',
								'Frequency' = 'A',
								'TableID' = '68',
								'Year' = 'X')		
resp <- beaGet(userSpecList)
BDF <- beaViz(resp)
userSpecList <- list('UserID' = 'yourKey' ,
								'Method' = 'GetData',
								'datasetname' = 'NIPA',
								'Frequency' = 'A',
								'TableID' = '68',
								'Year' = 'X')

Example output

Loading required package: data.table
Creating a generic function for 'toJSON' from package 'jsonlite' in package 'googleVis'
Warning message:
In beaGet(userSpecList) : Invalid API key: yourKey
Warning message:
In beaViz(resp) : Error in API response. Returning error information.

bea.R documentation built on May 2, 2019, 1:30 p.m.

Related to beaViz in bea.R...