Skip to contents

We package the map datasets for Norwegian municipalities, taken from Geonorge, so that you can draw them in ggplot2 with no geolibrary. The split layout moves the far-northern municipalities down beside southern Norway. This cuts the whitespace that a full-length map leaves. This data is licensed under Creative Commons BY 4.0 (CC BY 4.0).

Usage

nor_municip_map_b2024_split_dt

nor_municip_map_b2020_split_dt

Format

Both datasets are data.tables with one row per polygon vertex:

long

Longitude in decimal degrees (WGS84).

lat

Latitude in decimal degrees (WGS84).

order

Integer draw order carried over from the source polygon conversion. ggplot2::geom_polygon() follows row order, so you rarely need this column, and its values are not contiguous in every dataset.

group

Factor, one level per closed polygon ring; use as the group aesthetic in ggplot2. Several rings can share one location_code.

location_code

Municipality code (e.g. "municip_nor0301").

An object of class data.table (inherits from data.frame) with 30601 rows and 5 columns.

Source

Kartverket / Geonorge https://www.geonorge.no/. License: CC BY 4.0.

Details

Borders for 2024 and 2020 are provided, each holding 356 municipalities. Both layouts move 80 of them. In 2024 those are the municipalities of Nordland (codes municip_nor18xx), Troms (municip_nor55xx) and Finnmark (municip_nor56xx). In 2020 they are Nordland (municip_nor18xx) and Troms og Finnmark (municip_nor54xx). Every other municipality keeps its default coordinates. The package holds no Svalbard or Jan Mayen polygons, in this layout or any other.

Unlike the county split maps, these datasets hold no magnified copy of Oslo, so annotate_oslo_nor_map_bxxxx_split_dt() would draw an empty box on them. There is no matching nor_municip_position_geolabels_*_split_dt label dataset.

The 2024 datasets carry the same Haram gap as the default layout; see nor_municip_map_bxxxx_default_dt.

See also

vignette("layout", package = "csmaps") explains the split layout, but draws it with the county map. No vignette uses a municipality split dataset.

Other municipality maps: nor_municip_map_bxxxx_default_dt, nor_municip_map_bxxxx_default_sf, nor_municip_map_bxxxx_insert_oslo_dt

Examples

# 2024 borders
library(ggplot2)
q <- ggplot(mapping = aes(x = long, y = lat))
q <- q + geom_polygon(
  data = csmaps::nor_municip_map_b2024_split_dt,
  mapping = aes(group = group),
  color = "black",
  fill = "white",
  linewidth = 0.2
)
q <- q + theme_void()
q <- q + coord_quickmap()
q


# 2020 borders
library(ggplot2)
q <- ggplot(mapping = aes(x = long, y = lat))
q <- q + geom_polygon(
  data = csmaps::nor_municip_map_b2020_split_dt,
  mapping = aes(group = group),
  color = "black",
  fill = "white",
  linewidth = 0.2
)
q <- q + theme_void()
q <- q + coord_quickmap()
q