get_analytics {khisr} | R Documentation |
Retrieves Analytics Table Data from KHIS
Description
get_analytics()
fetches data from the KHIS analytics data tables for a
given period and data element(s), without performing any aggregation.
Usage
get_analytics(
...,
return_type = c("uid", "name"),
retry = 2,
verbosity = 0,
timeout = 60
)
Arguments
... |
One or more |
return_type |
The type to be return names of uid. |
retry |
Number of times to retry the API call in case of failure (defaults to 2). |
verbosity |
Level of HTTP information to print during the call:
|
timeout |
Maximum number of seconds to wait for the API response. |
Details
Retrieves data directly from KHIS analytics tables.
Allows specifying KHIS session objects, retry attempts, and logging verbosity.
Value
A tibble with detailed information
Examples
# Clinical Breast Examination data elements
# XEX93uLsAm2 = CBE Abnormal
# cXe64Yk0QMY = CBE Normal
element_id = c('cXe64Yk0QMY', 'XEX93uLsAm2')
# Download data from February 2023 to current date
data <- get_analytics(dx %.d% element_id, pe %.d% 'LAST_MONTH')
data
[Package khisr version 1.0.2 Index]