Friday, February 21, 2014

How close are you to a school building?


In Leiden, The Netherlands there was quite a stir when a convicted pedophile was placed in a new house after being released. This left people in the city and especially the neighborhood angry and concerned. One of the points the mayor of Leiden made was that everybody needs to live somewhere. People who objected said out that there are schools nearby the house that was appointed and that of course made it a bad choice.

These arguments made me think. Is it possible to find a house that is not near a school?
My initial guess was that it was nearly impossible.

The data

So, to lighter subjects. Let's make a map! I first looked for a list of all the school in Leiden. That includes higher education. I must say that afterwards I realized I probably missed some school buildings. I didn't check if a certain primary or secondary school had more then one location. I also forgot some of the higher education facilities. And lastly I totally ignored kindergartens and such, which in my guess adds 30+ more locations.

The list I found for schools had addresses and postal codes included, as well as the type of the school. It took some time to get everything in a nice spreadsheet, but it was ok. I used Google's mapsengine to put all these locations on a map. There are some simple tutorials on the basics of Mapsengine, so within a few minutes I had a nice looking and useful map. I made a screenshot as you can see below or you can follow this link to play with interactively.

Locations of schools in Leiden

If you follow the link you'l be able to click on every location and see which school it is and it's properties.
You can also put your mouse over of one of the schoolmtypes in the list on the left and the school that belong to that type are highlighted. Pretty neat right. You can style this in a couple of ways and share it across the web.

Mapsengine is a really easy tool to use but in my opinion it's possibilities are restricted. For instance the border of the municipality had to be drawn in by hand. Since I only had to do this once this was no big deal. But Google Maps draws this shape if you search for Leiden, why isn't that feature included here?

Circles

When working on this is was thinking of a site that used Google Maps to show the impact of different atomic bombs on your favorite location. It draws circles around a position to show which areas are destroyed by the fire, which by the air blast, etc etc. Seems simple right, draw a circle around a point on the map. Sadly Mapsengine doesn't have this feature. What I wanted to do was draw a circle around every school with a radius of let's say 500 meters. I mean, that's close by right? Some browsing led me to a site called Freemapstools. You can upload a list of GPS coordinates plus the radii of the circles you want to draw and it makes a map with said circles. I did have to get all the GPS coordinates first. For that I used the website GPSCoordinaat, which only works for dutch addresses I'm afraid. I was just to lazy to find a different way to transform that data so I just filled in every address by hand. Sometimes doing a monotonous job is faster than trying to automate it.
Plugging all the coordinates in Freemapstools gave me the following map.

Circles of 500 m around school locations

Freemapstools allows you to export this map to a .kml file which you can import in Google Earth. (please comment if this doesn't work) That should look something like the image below.

Google Earth version

This allows to some zoom in nicely to check out those few areas that are not covered by a circles. Some of the empty spots are industrial areas or sport facilities and a large part is the city's center. Remember that I forgot a couple of locations and I didn't include kindergartens so a proper map would be probably be filled more than the above maps.

Conclusions

So what can we conclude from all this? 

1) Making a map is still a lot of work and not fully satisfactory
I really wanted to have both maps in one. The locations with the information on every school and the circles around them. And it would have been even better if those radii were adjustable so it would be more insightful. The radius of 500 meters was just a number I picked that sounded nice. A different radius like 200 meters or one kilometer would create a different story.

2) You're always close to a school building in Leiden
Leiden has a lot of people in a small area and a lot of schools, you can't really change that.





No comments:

Post a Comment