Description Usage Arguments Examples
View source: R/get_brazil_regional_cases.R
Extracts regional case and death counts for Brazil. Data available on Github, curated by Wesley Cota: DOI 10.1590/SciELOPreprints.362 Source
1 | get_brazil_regional_cases(geography = "states")
|
geography |
Character string specifying geography: "regions": n=5, or "states": n=27, or "municipalities": n=3180. Default: "states". |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | get_brazil_regional_cases()
## Not run:
# Mapping
brazil_latest <- get_brazil_regional_cases(geography = "states") %>%
dplyr::filter(date == max(date))
brazil_map <- rnaturalearth::ne_states(country = "Brazil", returnclass = "sf") %>%
dplyr::mutate(state_code = stringr::str_remove_all(iso_3166_2, "BR-"))
brazil_map_data <- dplyr::left_join(brazil_map, brazil_latest,
by = c("state_code" = "state_code")) %>%
ggplot2::ggplot() +
ggplot2::geom_sf(ggplot2::aes(fill = cases))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.