
Create adhoc maps for emergences
generate_adhoc_map.RdCreates a map of recent emergences. The default will display outbreaks from the past 13 months.
Usage
generate_adhoc_map(
raw.data,
country,
virus_type = "cVDPV 2",
vdpv = T,
new_detect = T,
surv = c("AFP", "ES", "OTHER"),
labels = "YES",
owner = "CDC-GID-PEB",
new_detect_expand = F,
start_date = NULL,
end_date = NULL,
emg_cols = NULL,
output = NULL,
image_size = NULL,
height = 6.2,
width = 4.5,
scale = 1.25,
dpi = 300
)Arguments
- raw.data
listGlobal polio data. The output ofget_all_polio_data(). Make sure the spatial data is attached, otherwise, it will not work.- country
strorlistCountry name or a list of country names.- virus_type
strorlist. Virus type to include. Valid values are:"cVDPV 1", "cVDPV 2", "cVDPV 3", "WILD 1".Can pass as a list.
- vdpv
logicalWhether to include VPDV in maps. DefaultTRUE.- new_detect
logicalWhether to highlight new detections based on WHO HQ report date. DefaultTRUE.- surv
strorlistSurveillance options. Valid values are:"AFP", "ES", "OTHER""OTHER"includes Case Contact, Community, Healthy Children Sampling. Can pass as a list.- labels
strInclude labels for regions with virus detections. Options:"ALL": All regions"YES": Recent Detections - <13 months
- owner
strWho produced the map. Defaults to"CDC-GID-PEB".- new_detect_expand
logicalWhether to expand the reporting window. Defaults toFALSE.- start_date
strStart date. If not specified, defaults to 13 months prior to the download date of raw.data.- end_date
strEnd date. If not specified, defaults to the download date of raw.data.- emg_cols
listA named list with all of the emergence colors. Defaults toNULL, which will download usingset_emergence_colors().- output
strEither a path to a local folder to save the map to,"sharepoint", orNULL. Defaults toNULL.- image_size
strStandard sizes of the map outputs. Options are:"full_slide""soco_slide""half_slide"
Defaults to
NULL.- height
numericHeight of the map. Defaults to6.2.- width
numericWidth of the map. Defaults to4.5.- scale
numericScale of the map. Defaults to1.25.- dpi
numericDPI of the map. Defaults to300.
Examples
if (FALSE) { # \dontrun{
raw.data <- get_all_polio_data()
p1 <- generate_adhoc_map(raw.data, "algeria")
# Put colors in emergences that don't have a mapped color
emg_cols <- set_emergence_colors(raw.data, c("nigeria", "chad"))
emg_cols["NIE-BOS-1"] <- "yellow"
emg_cols["NIE-YBS-1"] <- "green"
p2 <- generate_adhoc_map(raw.data, c("nigeria", "chad"), emg_cols = emg_cols)
} # }