get_uk_regional_cases.Rd
Get UK cases by country or region
get_uk_regional_cases(geography = "all countries")
geography | Character string identifying which part of the UK to extract and at what scale Defaults to "all countries". Options are: "all countries", "all regions", "England", "Scotland", "Northern Ireland", "Wales". Note that England always returns 9 English regions, and Nothern Ireland always returns as one country |
---|
A dataframe of case counts. By default returns cases in English regions, and Scotland, Wales, and Northern Ireland
uk_countries <- get_uk_regional_cases(geography = "all countries") uk_regions <- get_uk_regional_cases(geography = "all regions") england <- get_uk_regional_cases(geography = "England") wales <- get_uk_regional_cases(geography = "Wales") scotland <- get_uk_regional_cases(geography = "Scotland") nireland <- get_uk_regional_cases(geography = "Northern Ireland") if (FALSE) { ## Mapping UK countries with English regions uk_countries <- get_uk_regional_cases(geography = "all countries") %>% dplyr::filter(date == max(date)) uk_map <- sf::st_read("data-raw/uk_NUTS_areas/NUTS_Level_1_January_2018_Ultra_Generalised_Clipped_Boundaries_in_the_United_Kingdom.shp") %>% dplyr::mutate(nuts118nm = stringr::str_remove_all(nuts118nm, "\\s\\(England\\)")) %>% dplyr::left_join(uk_countries, by = c("nuts118nm" = "region")) uk_map %>% ggplot2::ggplot(ggplot2::aes(fill = cases)) + ggplot2::geom_sf() }