- Use a virtualenv ($ virtualenv ../env_app ; source ../env_app/bin/activate)
- $ python setup.py install
- edit development.ini and point the sqlite db link to the ‘production_lrg.db’
- $ paster serve development.ini
- go to http://localhost:5000 and you should see a map…
- Computing the overlay tiles takes a little power so be patient 😉
How does it work?
The ‘properties_lrg.db’ contains a series of points from the Zoopla property search API that Dave Challis queried. Data.gov.uk was queried to get a list of latitude and longitudes for the UK HE institutions and this was passed to the Zoopla search API, searching for properties within a 15 miles radius of each, with the keyword ‘student’ and specifying ‘rental only’ as part of the search. The price per person was worked out by taking the overall rental cost and dividing it by the number of bedrooms in the property.
The data was turned into KML by Dave using a series of python scripts and shown as points on a google maps, where the colour of a point shows the relative cost – red, being the highest and blue being the lowest:
I took a copy of the data csv and tried to alter the ‘gheat’ application, which rendered heatmaps and provided the right sort of API to work with the Google Maps overlay layer. Unfortunately, it doesn’t use the magnitude of a given point (the cost) out of the box, so I spent some time trying to alter the rendering code to take into account the cost of a given property, making the size of the ‘blob’ larger correspondingly.