30 day map challenge

Day 3: Polygons

Nachbarländer

Workflow:

For the geospatial parts I used QGIS and final touches were done in inkscape. I got the postcode areas from govdata, who in turn referenced OpenStreetMap. The country outlines were taken from naturalearthdata.

The entire planet was somewhat difficult to work with and I discarded my plan to calculate shortest distance directly from polygon to polygon. In the interest of computational feasibility I decided to work with points. So I calculated the centroids to my postcodes. I then manually selected the vertices of the border zones of neighboring countries and turned them into individual points.

I followed up on this by making two mistakes. Calculating the hub distance in QGIS produced a systematic classification error and the shortest distance didn't always win out. Here's what the original map looked like:

Nachbarländer Version 1

Cute, but wrong. Northern and southern borders have a disproportionate effect. Thanks @ChristianMichaelis and @leobm for pointing this out to me! The closest neighbor appears to be calculated based on map units; and their distance in meters (which I selected) is only calculated afterwards. Reprojecting this in WGS 84 confirmed my suspicion. The classification is still wrong, but looks right, when reprojected. I should've converted my files to UTM 32N right away.

WGS 84

Another mistake I made was that when rejoining centroids and postcode areas ("join attributes by field") I used the actual postcode name as matching key, rather than the id. This resulted in some rogue areas. For example, in the original map the area with postcode 16845 (Neustadt Dosse) is closer to Poland than Denmark and classified as such. However, there's a tiny 16845 exclave to the Southwest within 39539 (Havelberg). When classifying the area, the small exclave ended up determining the neighbour.

postcode_16845

I fixed both mistakes in the second iteration and was saddened to see Sweden disappear in the north, but satisfied with a map that looks right now.

PS: I still have to learn css and building websites and I want to start from scratch, so please forgive the current eyesore :)

Impressum