Parse location sqids
parse_sqids_locations.Rd
The API uses unique IDs (sqids) to identify each location in a data set. This function parses those into the corresponding location codes and names based on the meta data stored on the API for the data set.
Arguments
- locations
A set of location columns as taken from a data set downloaded from the API
- meta
Meta data for the data set as provided by
get_meta()
- verbose
Run in verbose mode with debugging messages
Examples
example_data_raw() |>
magrittr::use_series("locations") |>
parse_sqids_locations(get_meta(example_id(group = "attendance")))
#> la_name la_code la_oldCode nat_name nat_code
#> 1 Bath and North East Somerset E06000022 800 England E92000001
#> 2 Bath and North East Somerset E06000022 800 England E92000001
#> 3 Bath and North East Somerset E06000022 800 England E92000001
#> 4 Bath and North East Somerset E06000022 800 England E92000001
#> 5 Bath and North East Somerset E06000022 800 England E92000001
#> 6 Bath and North East Somerset E06000022 800 England E92000001
#> 7 Bath and North East Somerset E06000022 800 England E92000001
#> 8 Bath and North East Somerset E06000022 800 England E92000001
#> 9 Bath and North East Somerset E06000022 800 England E92000001
#> 10 Bath and North East Somerset E06000022 800 England E92000001
#> 11 Bath and North East Somerset E06000022 800 England E92000001
#> 12 Bath and North East Somerset E06000022 800 England E92000001
#> 13 Bath and North East Somerset E06000022 800 England E92000001
#> 14 Bath and North East Somerset E06000022 800 England E92000001
#> 15 Bath and North East Somerset E06000022 800 England E92000001
#> 16 Bath and North East Somerset E06000022 800 England E92000001
#> 17 Bath and North East Somerset E06000022 800 England E92000001
#> 18 Bath and North East Somerset E06000022 800 England E92000001
#> 19 Bath and North East Somerset E06000022 800 England E92000001
#> 20 Bath and North East Somerset E06000022 800 England E92000001
#> 21 Bath and North East Somerset E06000022 800 England E92000001
#> 22 Bath and North East Somerset E06000022 800 England E92000001
#> 23 Bath and North East Somerset E06000022 800 England E92000001
#> 24 Bath and North East Somerset E06000022 800 England E92000001
#> 25 Bath and North East Somerset E06000022 800 England E92000001
#> 26 Bath and North East Somerset E06000022 800 England E92000001
#> 27 Bath and North East Somerset E06000022 800 England E92000001
#> 28 Bath and North East Somerset E06000022 800 England E92000001
#> 29 Bath and North East Somerset E06000022 800 England E92000001
#> 30 Bath and North East Somerset E06000022 800 England E92000001
#> 31 Bath and North East Somerset E06000022 800 England E92000001
#> 32 Bath and North East Somerset E06000022 800 England E92000001
#> reg_name reg_code
#> 1 South West E12000009
#> 2 South West E12000009
#> 3 South West E12000009
#> 4 South West E12000009
#> 5 South West E12000009
#> 6 South West E12000009
#> 7 South West E12000009
#> 8 South West E12000009
#> 9 South West E12000009
#> 10 South West E12000009
#> 11 South West E12000009
#> 12 South West E12000009
#> 13 South West E12000009
#> 14 South West E12000009
#> 15 South West E12000009
#> 16 South West E12000009
#> 17 South West E12000009
#> 18 South West E12000009
#> 19 South West E12000009
#> 20 South West E12000009
#> 21 South West E12000009
#> 22 South West E12000009
#> 23 South West E12000009
#> 24 South West E12000009
#> 25 South West E12000009
#> 26 South West E12000009
#> 27 South West E12000009
#> 28 South West E12000009
#> 29 South West E12000009
#> 30 South West E12000009
#> 31 South West E12000009
#> 32 South West E12000009