![](../logo.png)
Retrieves Data Set Reporting Rate Metrics
Source:R/get_datasets_by_level.R
get_data_sets_by_level.Rd
get_data_sets_by_level()
fetches the data set reporting metrics. The metric
can be REPORTING_RATE, REPORTING_RATE_ON_TIME, ACTUAL_REPORTS, ACTUAL_REPORTS_ON_TIME, EXPECTED_REPORTS.
Usage
get_data_sets_by_level(
dataset_ids,
start_date,
end_date = NULL,
level = 1,
org_ids = NULL,
...,
call = caller_env()
)
Arguments
- dataset_ids
Required vector of data sets IDs for which to retrieve data. Required.
- start_date
Optional start date to retrieve data. It is required and in the format
YYYY-MM-dd
.- end_date
Optional ending date for data retrieval (default is the current date).
- level
Required desired organisation level of data (default: level 1) .
- org_ids
Optional list of organization units IDs to be filtered.
- ...
Other options that can be passed onto DHIS2 API.
- call
The caller environment.
Value
A tibble with detailed information, including:
Geographical identifiers (country, subnational, district, facility, depending on level)
Reporting period (month, year, fiscal year)
The reporting metric can be REPORTING_RATE, REPORTING_RATE_ON_TIME, ACTUAL_REPORTS, ACTUAL_REPORTS_ON_TIME, EXPECTED_REPORTS.
See also
get_organisations_by_level()
for getting the organisations unitsget_data_sets()
for retrieving the data sets
Examples
# The MoH 745 Cancer Screening Program Monthly Summary Form
dataset_id = c('WWh5hbCmvND')
# Download data from February 2023 to current date
data <- get_data_sets_by_level(dataset_ids = dataset_id,
start_date = '2023-02-01')
data
#> # A tibble: 17 × 10
#> kenya dataset period month year reporting_rate reporting_rate_on_time
#> <chr> <chr> <date> <ord> <dbl> <dbl> <dbl>
#> 1 Kenya MoH 745 C… 2023-06-01 June 2023 62.3 58.2
#> 2 Kenya MoH 745 C… 2023-05-01 May 2023 60.3 56.8
#> 3 Kenya MoH 745 C… 2023-03-01 March 2023 61.7 55.1
#> 4 Kenya MoH 745 C… 2024-05-01 May 2024 58.9 57.6
#> 5 Kenya MoH 745 C… 2024-06-01 June 2024 0 0
#> 6 Kenya MoH 745 C… 2023-02-01 Febr… 2023 62.3 52.5
#> 7 Kenya MoH 745 C… 2023-04-01 April 2023 58.2 52
#> 8 Kenya MoH 745 C… 2024-03-01 March 2024 60.4 58.1
#> 9 Kenya MoH 745 C… 2024-04-01 April 2024 59 56.9
#> 10 Kenya MoH 745 C… 2023-07-01 July 2023 63.1 56.5
#> 11 Kenya MoH 745 C… 2023-10-01 Octo… 2023 61.5 58.3
#> 12 Kenya MoH 745 C… 2024-01-01 Janu… 2024 59.3 56.3
#> 13 Kenya MoH 745 C… 2024-02-01 Febr… 2024 61 56.7
#> 14 Kenya MoH 745 C… 2023-08-01 Augu… 2023 62.5 59
#> 15 Kenya MoH 745 C… 2023-09-01 Sept… 2023 62.6 58.4
#> 16 Kenya MoH 745 C… 2023-11-01 Nove… 2023 59.4 55.2
#> 17 Kenya MoH 745 C… 2023-12-01 Dece… 2023 58.3 55.6
#> # ℹ 3 more variables: actual_reports <dbl>, actual_reports_on_time <dbl>,
#> # expected_reports <dbl>