csmaps

Overview

csmaps provides preformatted maps of Norway that generally do not need geolibraries. It supports public health reporting at different geographic levels in Norway.

The following geographic granularities are included:

You can add information to a map with text labels or with color palettes.

Installation

install.packages("csmaps")

Quick start

Each map is a plain data.table of polygon vertices, so geom_polygon() takes it directly:

library(ggplot2)
d <- csmaps::nor_county_map_b2024_default_dt
p <- ggplot(d, aes(long, lat, group = group))
p <- p + geom_polygon(colour = "black", fill = "grey95")
p <- p + coord_quickmap() + theme_void()
p

Which map do I want?

Dataset names follow the pattern scope_geogranularity_type_border_layout_Rclass.

I need Dataset Border years
Counties nor_county_map_bYYYY_default_dt 2024, 2020, 2019, 2017
Counties, Oslo magnified beside the map nor_county_map_bYYYY_insert_oslo_dt 2024, 2020, 2019, 2017
Counties, north folded beside the south nor_county_map_bYYYY_split_dt 2024, 2020
Municipalities nor_municip_map_bYYYY_default_dt 2024, 2020, 2019
Municipalities, Oslo magnified beside the map nor_municip_map_bYYYY_insert_oslo_dt 2024, 2020, 2019
Municipalities, north folded beside the south nor_municip_map_bYYYY_split_dt 2024, 2020
Oslo city wards oslo_ward_map_bYYYY_default_dt 2024, 2020
Anchors for text labels swap map for position_geolabels as the map, except the municipality split
Simple features for leaflet or geom_sf() swap _dt for _sf default layout only

Counts: 15 counties on the 2024 borders, 11 on 2020, 18 on 2019, 19 on 2017. 356 municipalities on the 2024 borders (Haram is not separated out, so the official 357th is missing), 356 on 2020, 422 on 2019. 15 Oslo wards.

Read the introduction vignette here or run help(package="csmaps"). Reference pages, articles and changelog are at https://niphr.github.io/csmaps/.