
ES detection map
generate_es_det_map.RdGenerates a map showing the detection rate of each ES sites on a rolling period as defined by the start and end dates of the analysis.
Usage
generate_es_det_map(
es.data,
ctry.shape,
prov.shape,
es_start_date = (lubridate::as_date(es_end_date) - lubridate::years(1)),
es_end_date = end_date,
output_path = Sys.getenv("DR_FIGURE_PATH"),
es.data.long = lifecycle::badge("deprecated")
)Arguments
- es.data
tibbleES data for a country. This isctry.data$es, which is part of the outputs ofextract_country_data()andinit_dr().- ctry.shape
sfCountry shapefile in long format.- prov.shape
sfProvince shapefile in long format.- es_start_date
strStart date of analysis. Default is one year from the end date.- es_end_date
strEnd date of analysis.- output_path
strLocal path where to save the figure to.- es.data.long
tibblePlease pass the output ofclean_es_data()into es.data instead. This paramater is not being used in the function.
Examples
if (FALSE) { # \dontrun{
ctry.data <- init_dr("algeria")
es.data.long <- generate_es_data_long(ctry.data$es)
ctry.shape <- load_clean_ctry_sp(ctry_name = "ALGERIA", type = "long")
prov.shape <- load_clean_prov_sp(ctry_name = "ALGERIA", type = "long")
generate_es_det_map(ctry.data$es, ctry.shape, prov.shape,
es_end_date = "2023-01-01"
)
} # }