Skip to contents

Query PEPFAR/DATIM targets/results data

Usage

datim_query(
  ou,
  username,
  password,
  level = "prioritization",
  pe = "THIS_FINANCIAL_YEAR",
  ta = "PLHIV",
  value = NULL,
  disaggs = NULL,
  dimensions = NULL,
  property = "SHORTNAME",
  metadata = TRUE,
  hierarchy = TRUE,
  baseurl = "https://final.datim.org/",
  verbose = FALSE
)

Arguments

ou

Operatingunit

username

Datim username

password

Datim username

level

Organization hierarchy level

pe

Reporting period. This can be expressed as relative or fixed periods Eg.: "THIS_FINANCIAL_YEAR", "2020Oct", "QUARTERS_THIS_YEAR", "2021Q2" default is "THIS_FINANCIAL_YEAR"

ta

Technical Area, valid option can be obtain from glamr::datim_dim_items("Technical Area")`

value

Type of value to return, MER Targets or Results or both

disaggs

Disaggregation Types. This depends on the value of ta

dimensions

Additional dimensions and/or columns. This depends on values of ta and disaggs

property

Type of name

metadata

Should metadata be included

hierarchy

Should additional hirarchy level be included

baseurl

DATIM API End point url

verbose

Display all notifications

Value

data as tibble

Examples

if (FALSE) { # \dontrun{
 library(grabr)

 datim_query(ou = "Nigeria", ta = "PLHIV")

 datim_query(ou = "Nigeria", ta = "POP_EST")

 datim_query(ou = "Nigeria",
             level = "country",
             ta = "TX_CURR",
             disaggs = "Age/Sex/HIVStatus",
             dimensions = c("Age: <15/15+  (Coarse)", "Sex"))
} # }