Import/Catalogue/Sweden school import
Introduction
The Swedish public directorate Skolverket maintains a database of Swedish schools in a system called Skolenhetsregistret. Skolverket makes this data available under the CC0 license at the web page API för skolenhetsregistret. All Swedish schools are included in this database and no import into OSM has been organised until now.
Goals
The goals of this import are to:
- Import missing schools in Sweden.
- Improve the quality of existing schools in OSM in Sweden.
Schedule
- 09 April 2023 - Import plan discussed on the Swedish OSM forum: https://community.openstreetmap.org/t/manual-import-of-schools-in-sweden/97410/1
Import data
Background
License/permission information:
- Data source site: API för skolenhetsregistret
- Data license: CC0.
- Type of license (if applicable): CC0.
- Link to permission (if required): Not required.
- OSM attribution (if required): Not required.
- ODbL Compliance verified: Yes.
OSM data files
The data file can be either generated locally by each importer themselves using this script or downloaded here. These ready-made OSM files will be not be updated on a regular schedule as schools don't change that often.
Data quality
Data quality is in general high, however there are as usual a number of things to be aware of: While the Skolenhetsregistret API does return geo-coordinates, these have shown to be quite unreliable (off by a large margin or a lot of schools with the same coordinates. The written addresses on the other hand are very reliable, so the script used for the conversion into OSM files uses a geocoding API to convert the addresses into geo-positions. It's therefore required by the person performing the manual import/conflation to adjust the positions with the help of additional information (satellite imagery etc).
Skolverket has been informed about the problem but they will not fix it. The response (in Swedish) was this:
Vi känner till felet. Det handlar om skolenheter som inte har uppdaterats sedan skolenhetsregistret flyttades från SCB, dvs de fick fel koordinater när SCB förvaltade registret. Det är inget som rättas till i databasen, utan görs med fördel av huvudmännen.
Import type
The local OSM community in Sweden has discussed the import plan and local contributors will carry out the import. The import is carried out by a normal manual JOSM merging/conflation workflow and is combined with general maintenance such as fixing positional errors or tagging errors.
Data preparation
Data reduction and simplification
The raw data from Skolverket contains so-called skolenheter (school units). What's colloquially known as a school will in their data be composed of several logical units. The data also contains a number of school units which are special school types in Sweden ("SFI" and others) which are not of interest for this import and therefore are filtered out. The script merges all school units belonging to a single school into one entity which can then be imported into OSM.
Data transformation and tagging
Generating OSM tags from the API data is very straight forward and they mainly map directly into the OSM tagging scheme. Some minor adjustments for addresses, handling all-caps information and mapping grades & isced levels are made. The code for this can be found here.
Changeset Tags
When uploading to OSM, the changesets will be tagged with:
- description=Manual import of Skolverket data for <municipality>. More information can be found: https://wiki.openstreetmap.org/wiki/Import/Catalogue/Sweden_school_import #SweSchoolImport
- source=Skolverket
Team approach
Import will be carried out municipality by municipality by members of the local community in Sweden. The approach is non-intrusive and there is no specific push for making an import in all municipalities or get to completion in some specific timeframe. Instead we just make the import files available for anyone who is interested to help improving the data quality in Sweden.
Workflow
- Check the import progress page for available municipalities and update that page to indicate you are starting an import.
- Download the OSM import file or generate it yourself using the script.
- Load the file into JSON and use the filter function in JOSM to remove all the schools that you don't want to work on right now. For example you can filter by
addr:municipality
- Download all existing schools for the region you want to work on into JOSM, for example by a
amenity=school in Sweden
query using Overpass. - Use the Conflation plugin in JOSM to identify and merge new and existing stations:
- In the Configure menu select all new schools as Subject and all existing schools as Reference (this way existing positions will be kept)
- Then walk though the list of matching schools:
- Click Remove for false matches
- Click Conflate to merge the new tags with the existing school. If there are conflicting tags, you will be prompted to make a selection.
- Important: Fix tagging of the school you're importing!
- Familiarise yourself with the tagging scheme for schools: Tag:amenity=school
- Common mistakes that you should fix:
- Buildings are tagged with amenity=school instead of building=school which results in multiple "schools" on site.
- Often schools also have preschools/kindergartens on site. If this is the case and the school grounds are tagged with amenity=school, consider adjusting the site.
- Upload to OSM using changeset tagging as shown earlier.
- Please report back to the local community if you think a certain area needs more inspection and refinement
Tip: Use the To-do plugin in JOSM to keep tabs on which schools you have visited and which you have not.