North America

Welcome to #30DayMapChallenge 2023 day 10

Published

November 10, 2023

Overview

This is a map of the Canada country’s regions. Data is from rnaturalearth}.

library(tidyverse)
library(rnaturalearth)
canada_disasters<- read.delim("data/CDD.txt")

canada_disasters%>%#count(PLACE)
  filter(!str_detect(PLACE,"[0-9]+"))%>%
  count(PLACE)
canada<- ne_states("canada",returnclass = "sf")
ggplot(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") +
  ggthemes::theme_map()+
  theme(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")+
   ggspatial::annotation_scale()
ggsave("day10_north-america.png",bg="white")
canada%>%count(name)