Skip to contents

Downloads dengue case counts from the OpenDengue Project, a harmonized, open-access repository of dengue surveillance data from national ministries of health. The function supports national, spatial, and temporal extracts filtered by WHO region and country for a specified date range.

Usage

l4h_dengue(
  from,
  to,
  data_type = c("temporal", "spatial", "national"),
  region = NULL,
  country = "Peru",
  cache = TRUE,
  quiet = FALSE
)

Source

Data from the OpenDengue Project.

Arguments

from

Character or Date. Start date ("YYYY-MM-DD").

to

Character or Date. End date ("YYYY-MM-DD").

data_type

Character. One of "national", "spatial", or "temporal". Default "temporal".

region

Character. WHO region code or full name (case-insensitive). Codes: "paho", "searo", "wpro", "afro", "emro", "euro". Full names: "Pan-American Region", "South-East Asia Region", "Western Pacific Region", "African Region", "Eastern Mediterranean Region", "European Region". Default "paho".

country

Character. Country name (case-insensitive), matched against adm_0_name. Default "Peru".

cache

Logical. If TRUE, caches the downloaded ZIP locally. Default TRUE.

quiet

Logical. If TRUE, suppresses progress messages. Default FALSE.

Value

A tibble with columns: date_start, date_end, cases, state, area, plus other fields from the source data.

Credits

Pioneering geospatial health analytics and open-science tools. Developed by the Innovalab Team. For more information, send an email to imt.innovlab@oficinas-upch.pe.

Follow us on:

References

Morales, I. et al. (2024). OpenDengue: Harmonized dengue surveillance data for Latin America.

See also

Examples

# \donttest{
if (interactive()) {
  # National extract for Peru in 2019
  df_nat <- l4h_dengue(
    from = "2019-01-01",
    to = "2019-12-31",
    data_type = "national",
    region = "paho",
    country = "peru",
    cache = TRUE,
    quiet = TRUE
  )
  head(df_nat)

  # Spatial extract for Brazil
  df_spat <- l4h_dengue(
    from = "2021-01-01",
    to = "2021-12-31",
    data_type = "spatial",
    region = "Pan-American Region",
    country = "brazil",
    cache = TRUE,
    quiet = TRUE
  )
  head(df_spat)

  # Temporal extract for Argentina
  df_temp <- l4h_dengue(
    from = "2020-01-01",
    to = "2020-12-31",
    data_type = "temporal",
    region = "PAHO",
    country = "Argentina",
    cache = TRUE,
    quiet = TRUE
  )
  head(df_temp)
}
# }