cvd_area_list {cvdprevent}R Documentation

List areas

Description

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.

Usage

cvd_area_list(time_period_id = 1, parent_area_id, system_level_id)

Arguments

time_period_id

integer - specifies time period for which to return areas (compulsory)

parent_area_id

integer - specifies the area of which children will be returned (optional)

system_level_id

integer - specifies which system levels to return areas for (optional)

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

Value

Tibble of area details

See Also

cvd_area_details(), cvd_area_unassigned(), cvd_area_search(), cvd_area_nested_subsystems(), cvd_area_flat_subsystems()

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)

[Package cvdprevent version 0.2.2 Index]