Skip to contents

get_breast_cbe() retrieves data for CBE conducted within a specified period from the KHIS API server.

Usage

get_breast_cbe(
  start_date,
  end_date = NULL,
  level = c("country", "county", "subcounty", "ward", "facility"),
  organisations = NULL,
  ...
)

Arguments

start_date

The start date to retrieve data. It is required and in the format YYYY-MM-dd.

end_date

The ending date for data retrieval (default is the current date).

level

The desired data granularity: "country" (the default), "county", "subcounty", "ward", or "facility".

organisations

A list of organization units ids to be filtered.

...

Other options that can be passed onto KHIS API.

Value

A tibble containing data for CBE conducted with the following columns:

  • country - Name of the country country

  • county - Name of the county. Optional if the level is county, subcounty, ward or facility.

  • subcounty - Name of the subcounty. Optional if the level is subcounty, ward or facility.

  • ward - Name of the ward. Optional if the level is ward or facility.

  • facility - Name of the health facility. Optional if the level facility.

  • period - The month and year of the data.

  • fiscal_year- The financial year of the report(July-June Cycle).

  • year - The calendar year of the report.

  • month - The month name of the report.

  • age_group - The age group category of the report (25-34, 35-39, 40-55, 56-74, or 75+).

  • category - Additional category if available.

  • element - The data element.

  • value - The number reported.

Examples

# Download data from February 2023 to current date
cbe_data <- get_breast_cbe(start_date = '2023-02-01')
cbe_data
#> # A tibble: 159 × 10
#>    value country element  age_group period     month    year quarter fiscal_year
#>    <dbl> <chr>   <fct>    <fct>     <date>     <ord>   <dbl> <fct>   <fct>      
#>  1   137 Kenya   Abnormal 35-39     2023-06-01 June     2023 Q4      2022/2023  
#>  2    18 Kenya   Abnormal 56-74     2024-04-01 April    2024 Q4      2023/2024  
#>  3   156 Kenya   Abnormal 35-39     2023-05-01 May      2023 Q4      2022/2023  
#>  4    28 Kenya   Abnormal 56-74     2024-05-01 May      2024 Q4      2023/2024  
#>  5    24 Kenya   Abnormal 56-74     2024-03-01 March    2024 Q3      2023/2024  
#>  6   150 Kenya   Abnormal 35-39     2023-07-01 July     2023 Q1      2023/2024  
#>  7   100 Kenya   Abnormal 35-39     2023-08-01 August   2023 Q1      2023/2024  
#>  8   119 Kenya   Abnormal 35-39     2023-04-01 April    2023 Q4      2022/2023  
#>  9   116 Kenya   Abnormal 35-39     2023-02-01 Februa…  2023 Q3      2022/2023  
#> 10 11401 Kenya   Normal   35-39     2023-12-01 Decemb…  2023 Q2      2023/2024  
#> # ℹ 149 more rows
#> # ℹ 1 more variable: source <chr>