Skip to contents

Returns national and area data for provided metric, area and time period. Target data contains the target value as a percentage stored as whole number up to 100; target patients is the number of patients more needed to reach the target percentage. If there is not data for both national and chosen area an error will be returned.

Usage

cvd_indicator_nationalarea_metric_data(
  metric_id = 1,
  time_period_id = 17,
  area_id = 739
)

Arguments

metric_id

integer - metric for which to return data (compulsory)

time_period_id

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

area_id

integer - area for which to return data (compulsory)

Value

Tibble of performance against the specified metric in the area as compared with national level

Details

CVD Prevent API documentation: Indicator national vs area metric data

Examples

# Compare performance against metric 150  (AF: treatment with anticoagulants
# - all people) in 'Chester South PCN' (area ID 553) with national
# performance:
cvd_indicator_nationalarea_metric_data(metric_id = 150, time_period_id = 17, area_id = 553) |>
dplyr::slice_head(n=5)
#> # A tibble: 2 × 6
#>   AreaCode  AreaID AreaName          NationalLevel Value TargetData  
#>   <chr>      <int> <chr>             <chr>         <dbl> <named list>
#> 1 E92000001      1 England           Y              91.5 <int [1]>   
#> 2 U68943       553 Chester South PCN N              88.6 <dbl [1]>