Skip to contents

Returns data for the Area Breakdown chart for provided metric, area and time period. Data contains the target value as well as an array SystemLevels which contains data grouped by system level.

Usage

cvd_indicator_metric_area_breakdown(
  metric_id = 1,
  time_period_id = 1,
  area_id = 1
)

Arguments

metric_id

integer - the metric to return data for (compulsory)

time_period_id

integer - the time period to return data for (compulsory)

area_id

integer - the area to return data for (compulsory)

Value

Tibble of metric performance for the specified area compared with National level

Details

CVD Prevent API documentation: Indicator metric area breakdown

Examples

# Return performance for metric 'AF: DOAC & VitK' in men aged 60-79 years
# (metric ID 128) in time period 17 for Salford South East PCN (area ID 705):
cvd_indicator_metric_area_breakdown(metric_id = 128, time_period_id = 17,
  area_id = 705) |>
  dplyr::select(SystemLevelName, AreaID, AreaName, Value)
#> # A tibble: 2 × 4
#>   SystemLevelName AreaID AreaName               Value
#>   <chr>            <int> <chr>                  <dbl>
#> 1 England              1 England                 92.5
#> 2 PCN                705 Salford South East PCN  90