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

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

get_brazil_regional_cases()
#> # A tibble: 2,022 x 5 #> # Groups: date, state_code [2,022] #> date state_code state_name cases deaths #> <date> <chr> <chr> <dbl> <dbl> #> 1 2020-02-25 SP São Paulo 1 0 #> 2 2020-02-26 SP São Paulo 0 0 #> 3 2020-02-27 SP São Paulo 0 0 #> 4 2020-02-28 SP São Paulo 1 0 #> 5 2020-02-29 SP São Paulo 0 0 #> 6 2020-03-01 SP São Paulo 0 0 #> 7 2020-03-02 SP São Paulo 0 0 #> 8 2020-03-03 SP São Paulo 0 0 #> 9 2020-03-04 SP São Paulo 1 0 #> 10 2020-03-05 RJ Rio de Janeiro 1 0 #> # … with 2,012 more rows
if (FALSE) { # 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)) }