Leaflet map with proportional circles of arbovirus cases by locality, state and municipal boundaries, and a panel with the localities with the most cases. Clicking a row of the panel zooms the map to that locality.
mp_cases_loc(
data,
var = "probable",
top_n = 10,
title = "Casos Probables",
palette = "D",
r_min = 4,
r_max = 20,
cve_edo = NULL,
mun_boundaries = TRUE,
edo_boundaries = TRUE,
table_position = "topright"
)sf object returned by [cases_by_loc()]. To map specific epidemiological weeks, filter them there with its `week` argument (e.g. `cases_by_loc(..., week = 1:10)`).
name of the column to map (default `"probable"`; also `"confirmado"`, `"DNG"`, `"DCSA"`, `"DG"`, `"DENV1"`, ...).
number of localities shown in the panel (default 10). With more than 20, the panel shows 20 rows and a scroll bar.
title of the legend and the panel (default `"Casos Probables"`).
viridis option for the circles (default `"D"`).
minimum and maximum radius of the circles in pixels.
INEGI state code ("14" or 14). If NULL (default), the whole country is mapped.
logical. Draw the municipal boundaries (`rgeomex::AGEM_inegi19_mx`). Default TRUE.
logical. Draw the state boundaries (`rgeomex::AGEE_inegi19_mx`). Default TRUE.
position of the panel: `"topright"` (default), `"topleft"`, `"bottomleft"` or `"bottomright"`.
a leaflet htmlwidget.
Boundaries are drawn below the circles and can be turned on and off from the layers control. Hovering over a municipality shows its name. The home button returns to the state (if `cve_edo` is given) or to Mexico.
if (FALSE) { # \dontrun{
den <- cases_by_loc(path = "DENGUE2_.txt", snv_dataset = "DENV")
mp_cases_loc(den)
# Oaxaca, weeks 1 to 10, confirmed cases
den_w <- cases_by_loc(path = "DENGUE2_.txt", snv_dataset = "DENV",
week = 1:10)
mp_cases_loc(den_w, var = "confirmado", title = "Casos Confirmados",
cve_edo = "20", top_n = 15)
} # }