cvd_indicator_nationalarea_metric_data {cvdprevent} | R Documentation |
Indicator national vs area metric data
Description
Returns national and area data for the provided metric, area, and time period.
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) |
Details
The returned object is a list containing named tibbles. The two possible tibbles are:
-
area
: contains metric data for the specified area in comparison with national metric data. -
target
: contains details on how to reach target values, including:target value as a percentage (stored as a whole number up to 100)
target patients (the number of additional patients needed to reach the target percentage)
Note that the target
tibble is only provided if data is available for both
national and the chosen area.
CVD Prevent API documentation: Indicator national vs area metric data
Value
List of named tibbles (area
, target
) where target
is only provided if data is available.
See Also
cvd_indicator_list()
, cvd_indicator_metric_list()
, cvd_indicator()
,
cvd_indicator_tags()
, cvd_indicator_details()
, cvd_indicator_sibling()
,
cvd_indicator_child_data()
, cvd_indicator_data()
, cvd_indicator_metric_data()
,
cvd_indicator_raw_data()
,
cvd_indicator_priority_groups()
, cvd_indicator_pathway_group()
,
cvd_indicator_group()
, cvd_indicator_metric_timeseries()
,
cvd_indicator_person_timeseries()
, cvd_indicator_metric_systemlevel_comparison()
,
cvd_indicator_metric_area_breakdown()
Examples
# Compare performance against metric 150 (AF: treatment with anticoagulants
# - all people) in 'Chester South PCN' (area ID 553) with national
# performance:
return_list <- cvd_indicator_nationalarea_metric_data(
metric_id = 150,
time_period_id = 17,
area_id = 553
)
# See what the list contains
return_list |> summary()
# Extract the `area` details
area_data <- return_list$area
area_data |> gt::gt()
# Extract `target` details
target_data <- return_list$target
target_data |> gt::gt()