get_brazil_regional_cases: Brazil regional cases and deaths, daily time-series

Description Usage Arguments Examples

View source: R/get_brazil_regional_cases.R

Description

Extracts regional case and death counts for Brazil. Data available on Github, curated by Wesley Cota: DOI 10.1590/SciELOPreprints.362 Source

Usage

1
get_brazil_regional_cases(geography = "states")

Arguments

geography

Character string specifying geography: "regions": n=5, or "states": n=27, or "municipalities": n=3180. Default: "states".

Examples

 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)

epiforecasts/NCoVUtils documentation built on June 26, 2020, 1:20 a.m.