This repository contains the geodata files you need to create visualisations of Stockholm like this choropleth map:
Source: https://krasch.io/hyreskartan
The data is based on the "Stadskarta" dataset released on the Stockholm open data portal under CC0 license (last updated: 2021-04-13) [details]
I am also releasing this data under CC0 license.
| Swedish | English | Explanation / examples |
|---|---|---|
| Stadsdelsområde | Borough | Larger administrative unit, e.g. Rinkeby-Kista |
| Stadsdel | District | Smaller administrative unit, part of a Stadsdelsområde, e.g. Rinkeby, Akalla, Husby, Kista, Hansta |
| Vatten | Water | Baltic sea, lakes, rivers |
Stockholm currently has 13 stadsdelsområden containing in total 117 stadsdelar.
| Folder | Explanation |
|---|---|
| shapefiles | ESRI-Shapefile format, coordinate system=SWEREF99 (same as original files) |
| geojson | geojson format, coordinate system=CRS84 |
| Subfolder | Explanation |
|---|---|
| fullsize | Same detail level as the original data |
| simplified | Smaller file size, achieved by running ST_SIMPLIFY with tolerance=3 |
In most cases, you should just go ahead and use the pre-generated files that I am supplying in the "shapefiles" and "geojson" folders. Use the following instructions if you want to generate the files on your own.
These instructions are valid for the 2021-04-13 release of the data in the open data portal. Previous releases used rather different directory layouts (and future versions might, too...)
Navigate to the root folder of this repository. Then run the following commands:
wget https://dataportalen.stockholm.se/dataportalen/Data/Stadsbyggnadskontoret/SHP_utanfastigheter_nya_granser.zip
unzip SHP_utanfastigheter_nya_granser.zip
mv SHP_utanfastigheter_nya_grДnser SHP_utanfastigheter_nya_gränser
Check that everything is setup up correctly:
ogrinfo data.vrt.xml
Should output:
INFO: Open of `data.vrt.xml'
using driver `OGR_VRT' successful.
1: vatten
2: stadsdelar (Polygon)
There is a bug in the official file. The stadsdel that should be labeled "VASASTADEN" is actually labeled with "HÄSSELBY GÅRD".
There is no automatic fix for this (I hope the bug is temporary). So you need to open ArcGIS / QGIS to manually put the correct label.
(you might have to make some adapations if you are on Windows)
./generate.sh
Unfortunately it is not possible to directly link to the dataset page in the open data portal. Here is how you can find it:
- Go to https://dataportalen.stockholm.se/
- Type "stadskartan" into the search, there will be multiple results
- Scroll down to the item shown in the screenshot below




