get_data: Get policy actions and stringency data from JSON

Description Usage Arguments Value Examples

View source: R/get_data.R

Description

Get policy actions and stringency data from JSON

Usage

1
get_data(json)

Arguments

json

A JSON string, URL or file created using get_json_time() or get_json_actions().

Value

A tibble of time series stringency index data if json is a time series endpoint or a named list of two tibbles (the first tibble is named policyActions and the second tibble is named stringencyData) if json is a policy actions endpoint.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Get time series JSON endpoint
x <- get_json_time(from = "2020-10-29", to = "2020-10-31")

## Get time series stringency index data
get_data(x)

## Get policy actions JSON endpoint
x <- get_json_actions(ccode = "AFG", from = NULL, to = "2020-07-16")

## Get data on policy actions and stringency index
get_data(x)

oxcgrt documentation built on Nov. 27, 2020, 5:07 p.m.