This package is an attempt at dealing with historical Norwegian municipalities. First, the package uses a cleaned version of SSB’s overview of historical changes in the municipality structure to produce clusters of municipalities that can be followed consistently between two given years. Second, it provides functions and data to link current and historical municipalities (including different names and spellings) to a municipality number.
It was developed to meet the needs of the author and his coauthors. See documentation here.
The development version from GitHub with:
# install.packages("devtools")
devtools::install_github("eirikberger/NoRwayGeo")
The current version of the package only supports Norwegian municipalities, which are built in.
# Load library
library(NoRwayGeo)
Run commands for years between and including 1980 and 2000.
print_changes(1980, 2000)
#> from to year tidligere_kommunenavn
#> 1: 102 105 1992 Sarpsborg
#> 2: 114 105 1992 Varteig
#> 3: 115 105 1992 Skjeberg
#> 4: 130 105 1992 Tune
#> 5: 103 106 1994 Fredrikstad
#> 6: 113 106 1994 Borge
#> 7: 131 106 1994 Rolvsøy
#> 8: 133 106 1994 Kråkerøy
#> 9: 134 106 1994 Onsøy
#> 10: 1940 1940 1994 Kåfjord
#> 11: 2011 2011 1987 Kautokeino
#> 12: 2021 2021 1988 Karasjok
#> 13: 2025 2025 1992 Tana
print_clusters(1980, 2000)
#> muni_number cluster
#> 1: 102 cluster_0001
#> 2: 114 cluster_0001
#> 3: 115 cluster_0001
#> 4: 130 cluster_0001
#> 5: 103 cluster_0002
#> 6: 113 cluster_0002
#> 7: 131 cluster_0002
#> 8: 133 cluster_0002
#> 9: 134 cluster_0002
#> 10: 1940 cluster_0003
#> 11: 2011 cluster_0004
#> 12: 2021 cluster_0005
#> 13: 2025 cluster_0006
#> 14: 105 cluster_0001
#> 15: 106 cluster_0002
graph_clusters(1980, 2000)
count_clusters(1980, 2000)
#> [1] 6
The data with historical municipality names are built in and include alternative names and ways of spelling. Here is an example of how to use it.
match_municipality("Oppegaard")
You can also add optional argument to help the linking algorithm.
match_municipality("Oppegaard", year = 1950, county_number = 2, threshold = 0.1)
#> $municipality_name
#> [1] 217
#>
#> $string_distance
#> [1] 0
#>
#> $name
#> [1] "Oppegaard"
The logo for this package uses a self portrait by famous Norwegian painter Nikolai Astrup (1880–1928). His name brother, Nikolai Astrup, was a minister in the Norwegian Government responsible for merging municipalities as a part of a large reform in 2020-2021. He is therefore responsible for increasing the problem of changing municipality structures over time.