Get policy actions and stringency data from JSON

get_data_actions(json)

Arguments

json

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

Value

A named list of two tibbles. The first tibble is named policyActions. The second tibble is named stringencyData

Examples

## Get relevant JSON x <- get_json_actions(ccode = "AFG", on = "2020-07-16") ## Get data on policy actions get_data_actions(x)
#> $policyActions #> # A tibble: 18 x 9 #> policy_type_code policy_type_dis… policyvalue policyvalue_act… flagged #> <chr> <chr> <int> <int> <lgl> #> 1 C1 School closing 3 3 TRUE #> 2 C2 Workplace closi… 3 3 FALSE #> 3 C3 Cancel public e… 2 2 TRUE #> 4 C4 Restrictions on… 4 4 TRUE #> 5 C5 Close public tr… 2 2 FALSE #> 6 C6 Stay at home re… 2 2 FALSE #> 7 C7 Restrictions on… 2 2 FALSE #> 8 C8 International t… 1 1 NA #> 9 E1 Income support 0 0 NA #> 10 E2 Debt/contract r… 0 0 NA #> 11 E3 Fiscal measures 0 0 NA #> 12 E4 International s… 0 0 NA #> 13 H1 Public informat… 2 2 TRUE #> 14 H2 Testing policy 1 1 NA #> 15 H3 Contact tracing 1 1 NA #> 16 H4 Emergency inves… 0 0 NA #> 17 H5 Investment in v… 0 0 NA #> 18 H6 Facial Coverings 3 3 TRUE #> # … with 4 more variables: is_general <lgl>, notes <chr>, #> # flag_value_display_field <chr>, policy_value_display_field <chr> #> #> $stringencyData #> # A tibble: 1 x 6 #> date_value country_code confirmed deaths stringency_actual stringency #> <chr> <chr> <int> <int> <dbl> <dbl> #> 1 2020-07-16 AFG 34994 1094 78.7 78.7 #>