Description Usage Value Author(s) Examples
View source: R/get_afghan_regional_cases.R
Data from HDX https://data.humdata.org/dataset/afghanistan-covid-19-statistics-per-province The cumulative data is stored in a google sheet, which is read as a csv and de-cumulated.
1 |
A dataframe of daily Afghan regional cases, deaths, and recovered
Flavio Finger @ffinger
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
## Code
get_afghan_regional_cases()
## Mapping
regions <- rnaturalearth::ne_states(geounit = "Afghanistan", returnclass = "sf")
data <- get_afghan_regional_cases() %>%
dplyr::filter(date == max(date))
regions_with_data <- dplyr::left_join(regions, data, by = "iso_3166_2")
regions_with_data %>%
ggplot2::ggplot(ggplot2::aes(fill = cases)) +
ggplot2::geom_sf()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.