library(tidyverse)
library(rnaturalearth)
Overview
This is a map of the Canada
country’s regions. Data is from rnaturalearth}
.
<- read.delim("data/CDD.txt")
canada_disasters
%>%#count(PLACE)
canada_disastersfilter(!str_detect(PLACE,"[0-9]+"))%>%
count(PLACE)
<- ne_states("canada",returnclass = "sf")
canadaggplot(canada)+
geom_sf(aes(fill=name))+
scale_fill_viridis_d(option = "mako", name="Regions",
direction = -1, end = .9)+
labs(#subtitle="Mapping Regions",
caption = "#30DayMapChallenge 2023 - Day 10: North America\nDataSource {rnaturalearth} | Map: @fgazzelloni)")+
ggtitle("Canada: Mapping Regions") +
::theme_map()+
ggthemestheme(text=element_text(family="Roboto Condensed",face="bold"),
plot.title = ggtext::element_markdown(size=18),
plot.caption = element_text(hjust = 0.5),
legend.key.size = unit(5,units = "pt"),
legend.text = element_text(size=5),
legend.position = "right")+
::annotation_scale() ggspatial
ggsave("day10_north-america.png",bg="white")
%>%count(name) canada