get_scb2: Download SCB data

Description Usage Arguments Details Value Examples

View source: R/get_scb2.R

Description

get_scb downloads a JSON query to SCB as a data_frame

Usage

1
2
3
4
5
6
7
8
get_scb2(
  fname,
  download_data = TRUE,
  save_data = FALSE,
  url = NA,
  colnames = NULL,
  returnList = FALSE
)

Arguments

fname

File name of JSON query

download_data

Boolean indicating whether downloaded or saved data should be used

save_data

Boolean indicating whether downloaded data should be saved to a JSON data file

url

Url string if not a url field in the JSON query

colnames

String array of column names.

Details

For more info, see:

http://www.github.com/bjornerstedt/scbapi

Value

A data_frame with time as the first column

Examples

1
2
df <- get_scb("gdpreal.json")
df <- get_scb("sick1", colnames = c("time", "sm", "sw"))

bjornerstedt/scbapi documentation built on Dec. 1, 2019, 3:51 p.m.