Learn R Programming

oxcgrt (version 0.1.0)

get_data: Get policy actions and stringency data from JSON

Description

Get policy actions and stringency data from JSON

Usage

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

Run this code
# NOT RUN {
## 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)

# }

Run the code above in your browser using DataLab