Returns data for the time series chart for specified metric ID and area ID.
Contains an array of two areas in Areas
, one of which is the National data
with the other corresponding to the provided area ID. TargetValue
is also
returned in the Data
dictionary.
Details
CVD Prevent API documentation: Indicator time series metrics
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_nationalarea_metric_data()
,
cvd_indicator_priority_groups()
, cvd_indicator_pathway_group()
, #
cvd_indicator_group()
,
cvd_indicator_person_timeseries()
, cvd_indicator_metric_systemlevel_comparison()
,
cvd_indicator_metric_area_breakdown()
Examples
# List data for Salford South East PCN (area ID 705) for 'AF: treatment with
# anticoagulants' for women people aged 60-79 years (metric ID 130):
cvd_indicator_metric_timeseries(metric_id = 130, area_id = 705) |>
dplyr::select(AreaName, TimePeriodName, TimePeriodID, Value) |>
tidyr::pivot_wider(
names_from = AreaName,
values_from = Value
)
#> # A tibble: 11 × 4
#> TimePeriodName TimePeriodID England `Salford South East PCN`
#> <chr> <int> <dbl> <dbl>
#> 1 To March 2020 1 88.2 85.9
#> 2 To March 2021 2 88.6 86
#> 3 To September 2021 3 88.9 88.8
#> 4 To March 2022 4 89.3 90
#> 5 To June 2022 5 89.4 90.2
#> 6 To September 2022 6 89.6 90.6
#> 7 To December 2022 7 90.0 91.7
#> 8 To March 2023 8 91.0 90.1
#> 9 To June 2023 9 91.0 91.0
#> 10 To December 2023 15 91.2 92.2
#> 11 To March 2024 17 92.2 93.9