get_data: Get policy actions and stringency data from JSON

View source: R/get_data.R

get_dataR Documentation

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

## 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)


como-ph/oxcgrt documentation built on April 7, 2022, 9:27 a.m.