Skip to contents

Returns all metric data for a specified indicator, system level and time period.

Usage

cvd_indicator_raw_data(
  indicator_id = 1,
  time_period_id = 1,
  system_level_id = 1
)

Arguments

indicator_id

integer - indicator for which to return data for (compulsory)

time_period_id

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

system_level_id

integer - system level for which to return data for (compulsory)

Value

Tibble of metric performance details for a specified indicator across the system level

Details

CVD Prevent API documentation: Indicator raw data JSON

Examples

# return all metric data for indicator 'AF: treatment with anticoagulants'
# (indicator ID 7) in time period 17 at GP practice level (system level ID 5):
cvd_indicator_raw_data(indicator_id = 7, time_period_id = 17, system_level_id = 5) |>
  dplyr::slice_head(n = 5) |>
  dplyr::select(AreaCode, AreaName, Value)
#> # A tibble: 5 × 3
#>   AreaCode AreaName                                 Value
#>   <chr>    <chr>                                    <dbl>
#> 1 P87657   (IRLAM) SALFORD CARE CTRS MEDICAL PRACTI  97.0
#> 2 P87620   1/Monton Medical Practice                 92.1
#> 3 P87004   1/SALFORD MEDICAL PRACTICE                97.4
#> 4 N84035   15 Sefton Road                            87.8
#> 5 L81051   168 Medical Group                         91.8