Imagine you are a 6 year old child. And you plan to live in a cozy neighborhood in the wonderful city of Basel. Your first day of school will be on Monday – how exciting! But first you have to find a place to live… Imagine further, that you have a decent flair for open statistical data (under open use license) and quite a talent for programming. So you are probably the first ever kid on this world that is able to code before even being able to write in his mother tongue – how weird… But hey, it’s all about imagination! So you start to listen to some music…
1. It’s (not) all about the money – but spatial data
So, imagine: your parents plan to move from Zurich to Basel soon – the best decision ever, you think. You are keen to meet all the cool people in this charming city at the Rhine. Usually, the rent is an important criterion when moving to a new apartment. But hey, you are 6 years old and don’t care about money! So you are primarily concerned about the best place to easily get in contact with your future friends. Which area has the highest share in children and young people? Which the greatest social diversity? Where are the green areas? And – you really hate them – where is the probability lowest to meet dogs in your neighborhood? After all, your mum says she would like to live in a place where one doesn’t need a car. And your dad always wanted to test his self-made burglar alarm –don’t ask why. So let’s look for a place that meets all your family’s needs: Many burglaries, not many registered private cars, almost no registered dogs – and some cool friends for yourself.
On www.basleratlas.ch you happen to find all the relevant data and easily visualize it in different maps. Not bad, this gives a good first impression, your longing for Basel already noticeably increases.
But comparing the different data and running spatial analyses with more than one dataset is not really possible. A pity… Then your mom shouts that you should brush your teeth and go to bed. This is the point when you realize that all the data you were looking at is also accessible as CSV from:
And hey, there is also a page which provides you a JSON-File including the data structure and all relevant meta-data:
Based on this you can get all CSV-data on all available spatial layers in the Basler Atlas by simply complement the link with the parameters from the JSON-File, iID=iID and ngeo=Ebene. For example, for the number of private cars on the spatial layer Block:
You forget about your toothbrush and mentally dive into the possibilities that would emerge when combining these (and maybe even other) data into an application that would allow enhanced spatial analyses and explorations. And so you start coding…
2. We’re safe and sound - on our way to school
So, imagine: you look forward to meeting your new classmates soon. But you want to meet them safe and sound. Remember, you are a six years old, living in the life-threatening environment of a nowadays city – traffic can be deadly, it’s said (at least according to your caring mom). So let’s quickly check if there is some open data available on how safe your way to school is. And hey, what a surprise, it is! The cantonal Geoportal BS provides you with a dataset called “Schulwegsicherheit”:
Street crossings are marked according to their safeness, footpaths are available. This looks useful. But also a bit like a labyrinth. Not easy to find the optimal way through it: safe, but still fast. Looks like a route planner is needed. Maybe graphhopper, as described in this tutorial ? Fortunately, all data on the Geoportal BS is made available by the WFS-Server wfs.geo.bs.ch (and there’s also a documentation) which offers you his capabilities through:
And by adding the parameter “&outputFormat=geojson” to the GetFeature requests you get your desired data as GEOJSON – how useful!
You can even check which school would be closest to you by loading all primary schools in Basel:
Hm, the vector-data seems to have some topological imperfections, might need some snapping here and there to make it routable. But otherwise it would have been way too easy to implement, wouldn’t it! ;-) So you start coding…
3. In the year 2525 – or maybe 2035
So, imagine: your first day at school was somewhat promising. Really cool kids from many different countries. You already made some new friends by showing them your brand new app “Cool2School” – which was already downloaded by all 8480 kids at the age of 5-9 in Basel. But having met so many beautiful people this day, back home you start wondering: Will we still be friends in 17 years? Where will we all live then? Still in the same area of Basel? Or in Zurich, again? What is supposable? Would be cool to have some Open Data on the future population of Basel and Zurich to see what kind of people will be living in which part of which city. And how probable is it that you and your new friends will still be here?
Good to know that Basel and Zurich (city and canton) just recently published their population scenarios:
(Comparing them with the cantonal scenarios published by the Federal Statistical Office could be interesting. Modelling population is not “exact science”…)
Remember the charts you saw some weeks ago, visualizing future population in an interactive and appealing way (this and that one)? Why not trying to visualize the population scenarios with such a d3-application? Or alternatively with the d3-visualization-library of Statistik Stadt Zurich?
Your classmates will be impressed again tomorrow! So you start coding…