Get policy actions data from JSON

get_data_action(json)

get_data_actions(json)

Arguments

json

A JSON string, URL or file created using get_json_actions() or a vector of JSON strings or URLs.

Value

A tibble of policy actions with their respective policy values for specified country/countries and specified date/dates.

Examples

## Get relevant JSON for Afghanistan on 16 July 2020 x <- get_json_actions(ccode = "AFG", from = NULL, to = "2020-07-16") ## Get data on policy actions get_data_action(x)
#> # A tibble: 18 x 12 #> date_value country_code country_name policy_type_code policy_type_dis… #> <date> <chr> <chr> <chr> <chr> #> 1 2020-07-16 AFG Afghanistan C1 School closing #> 2 2020-07-16 AFG Afghanistan C2 Workplace closi… #> 3 2020-07-16 AFG Afghanistan C3 Cancel public e… #> 4 2020-07-16 AFG Afghanistan C4 Restrictions on… #> 5 2020-07-16 AFG Afghanistan C5 Close public tr… #> 6 2020-07-16 AFG Afghanistan C6 Stay at home re… #> 7 2020-07-16 AFG Afghanistan C7 Restrictions on… #> 8 2020-07-16 AFG Afghanistan C8 International t… #> 9 2020-07-16 AFG Afghanistan E1 Income support #> 10 2020-07-16 AFG Afghanistan E2 Debt/contract r… #> 11 2020-07-16 AFG Afghanistan E3 Fiscal measures #> 12 2020-07-16 AFG Afghanistan E4 International s… #> 13 2020-07-16 AFG Afghanistan H1 Public informat… #> 14 2020-07-16 AFG Afghanistan H2 Testing policy #> 15 2020-07-16 AFG Afghanistan H3 Contact tracing #> 16 2020-07-16 AFG Afghanistan H4 Emergency inves… #> 17 2020-07-16 AFG Afghanistan H5 Investment in v… #> 18 2020-07-16 AFG Afghanistan H6 Facial Coverings #> # … with 7 more variables: policyvalue <int>, policyvalue_actual <int>, #> # flagged <lgl>, is_general <lgl>, notes <chr>, #> # flag_value_display_field <chr>, policy_value_display_field <chr>
## Get relevant JSON for Afghanistan and Philippines for whole month of ## October x <- get_json_actions(ccode = c("AFG", "PH"), from = "2020-10-29", to = "2020-10-31") ## Get data on policy actions get_data_actions(x)
#> # A tibble: 108 x 12 #> date_value country_code country_name policy_type_code policy_type_dis… #> <date> <chr> <chr> <chr> <chr> #> 1 2020-10-29 AFG Afghanistan C1 School closing #> 2 2020-10-29 AFG Afghanistan C2 Workplace closi… #> 3 2020-10-29 AFG Afghanistan C3 Cancel public e… #> 4 2020-10-29 AFG Afghanistan C4 Restrictions on… #> 5 2020-10-29 AFG Afghanistan C5 Close public tr… #> 6 2020-10-29 AFG Afghanistan C6 Stay at home re… #> 7 2020-10-29 AFG Afghanistan C7 Restrictions on… #> 8 2020-10-29 AFG Afghanistan C8 International t… #> 9 2020-10-29 AFG Afghanistan E1 Income support #> 10 2020-10-29 AFG Afghanistan E2 Debt/contract r… #> # … with 98 more rows, and 7 more variables: policyvalue <int>, #> # policyvalue_actual <int>, flagged <lgl>, is_general <lgl>, notes <chr>, #> # flag_value_display_field <chr>, policy_value_display_field <chr>