Returns all areas for a given time period and parent area or system level. Only areas which have data for the specified time period will be returned.
Details
Either parent area or system level must be specified: If parent area is specified, all children areas of that parent will be returned. If system level is specified, all areas within that system level will be returned.
Parent area takes precedence over system level - if parent area is specified, system level is ignored.
CVD Prevent API documentation: Area lists
Examples
# list four PCNs with data available at time period 17
cvd_area_list(time_period_id = 17, system_level_id = 4) |>
dplyr::select(SystemLevelName, AreaID, AreaCode, AreaName) |>
dplyr::slice_head(n = 4)
#> # A tibble: 4 × 4
#> SystemLevelName AreaID AreaCode AreaName
#> <chr> <int> <chr> <chr>
#> 1 PCN 1103 U60176 3 Centres PCN
#> 2 PCN 1103 U60176 3 Centres PCN
#> 3 PCN 920 U72999 4 Doncaster PCN
#> 4 PCN 920 U72999 4 Doncaster PCN