library(csmaps)
library(ggplot2)
library(data.table)
library(magrittr)
We have 3 layout options for Norway map: default, split and insert Oslo.
For Oslo county map, we only have the default layout.
<- copy(csmaps::nor_municip_map_b2024_default_dt)
pd <- ggplot()
q <- q + geom_polygon(data = pd, aes( x = long, y = lat, group = group),
q color="black", fill="white", linewidth = 0.2)
<- q + theme_void()
q <- q + coord_quickmap()
q <- q + labs(title = "Default layout")
q q
<- copy(csmaps::nor_municip_map_b2024_split_dt)
pd <- ggplot()
q <- q + geom_polygon(data = pd, aes( x = long, y = lat, group = group),
q color="black", fill="white", linewidth = 0.2)
<- q + theme_void()
q <- q + coord_quickmap()
q <- q + labs(title = "Split layout")
q q
<- copy(csmaps::nor_municip_map_b2024_insert_oslo_dt)
pd <- ggplot()
q <- q + geom_polygon(data = pd, aes( x = long, y = lat, group = group),
q color="black", fill="white", linewidth = 0.2)
# add title "Oslo"
<- q + annotate(
q "text",
x = csmaps::nor_xxx_position_title_insert_oslo_b2024_insert_oslo_dt$long,
y = csmaps::nor_xxx_position_title_insert_oslo_b2024_insert_oslo_dt$lat,
label = "Oslo"
)<- q + theme_void()
q <- q + coord_quickmap()
q <- q + labs(title = "Insert Oslo layout")
q q
<- copy(csmaps::oslo_ward_map_b2024_default_dt)
pd <- ggplot()
q <- q + geom_polygon(data = pd, aes(x = long, y = lat, group = group),
q color="black", fill="white", linewidth = 0.2)
<- q + theme_void()
q <- q + coord_quickmap()
q <- q + labs(title = "Oslo wards")
q q