During January a couple of students of mine started working on a small project with the goal of visualizing locations of McDonald's fast food restaurants in Germany. This was a beginner's course, so I had no concern that it would basically result in a population density map.
When browsing through my twitter stream, I came across a blog hosted by John Nelson: Adventures In Mapping. Coincidentally, he had just done the same thing, except for the US and for a larger number of franchises. And he went on with a nice turn on things: normalization.
Instead of simply plotting franchise locations, he calculated the ratio between the number of locations and population per-capita of 14 different fast food chains and visualized them as bubbles.
After I hinted my students at normalization, I started to pursue my own little project of visualizing fast food and supermarket distributions in Germany. Here's the result:
Density of fast food locations in Germany
Density of supermarket locations in Germany
So how is it done?
- Fetch all the franchise and supermarket locations from OpenStreetMap via overpass turbo
- Get some census and geometry data for Germany and it's municipalities here
- Write an R script that
- reads the data
- counts locations inside of geometries
- calculates the ratio between number of locations and population inside of municipalities
- categorizes the results (for reasons of readability)
- plots a circle at the geometries centroid with size based categorized ratio
- Optional: Put everything in a neat, responsive webpage with interactive maps
Thanks to John Nelson for being a huge inspiration!