get_json: Get JSON for OxCGRT data

get_json_timeR Documentation

Get JSON for OxCGRT data

Description

Get JSON for OxCGRT data

Usage

get_json_time(from = "2020-01-02", to = Sys.Date())

get_json_actions(ccode, from = "2020-01-02", to = Sys.Date())

Arguments

from

Start date for stringency index data to be collected. This can go as far back as 2020-01-02 (Default). Format YYYY-MM-DD. Accepts either character string or date class.

to

End date for stringency index data to be collected. This defaults to current date. Format YYYY-MM-DD. Accepts either character string or date class.

ccode

ISO 3166-1 alpha-2 country code, alpha-3 country code, or full country name string or vector of strings (mix of alpha-2 code or alpha-3 code or country names is valid).

Value

A character object for specified JSON time series endpoint, or a character string or a character vector for specified JSON policy actions endpoint or endpoints.

Author(s)

Ernest Guevarra

Examples

## Get JSON for Afghanistan at 7 days previous to current date
get_json_actions(ccode = "AFG",
                 from = NULL,
                 to = as.character(Sys.Date() - 7))

## Get JSON for Afghanistan and Philippines from 1 October to 31 October 2020
get_json_actions(ccode = c("Afghanistan", "PH"),
                 from = "2020-10-01", to = "2020-10-31")

## Get JSON time series endpoint for all data available from OxCGRT
get_json_time()


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