• About
RSS  Subscribe:  RSS feed
Random Hacks
Hacks, code and other things

Student Property Heatmap

Posted on July 26, 2011

6


Github link:
https://github.com/benosteen/gheatmap
(adapted from the pylons application of http://code.google.com/p/gheat/)

Installation hints:

  • 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:

http://maps.google.com/maps?q=http:%2F%2Fusers.ecs.soton.ac.uk%2Fdsc%2Fstudent_housing.kml&ll=52.549636,-2.39502&spn=7.191517,12.875977&z=6

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.

Advertisement

Share this:

  • Twitter
  • Facebook

Like this:

Like Loading...

Related

Posted in: idea, metadata
← ORCID update – ResearcherID system and a call for API
Tinkering, Play, Eric Schmidt and the UK ICT syllabus. →
6 Responses “Student Property Heatmap” →

  1. vikinggoat

    April 11, 2012

    What sort of alterations to the gHeat code dide you make to have it function this way?
    Do you still have the code laying about?

    Reply

    • benosteen

      July 22, 2012

      It wasn’t that heavy – I think the main difference was that I altered the data (which were discrete occurrences of rental prices) to fake levels, based on the prices. It gave a serviceable visualisation at the time, but could’ve done better.

      Reply

  2. vikinggoat

    April 12, 2012

    I am new comer to implementing tilelayers like gHeat, do you know of any good code examples of implementing it? I will be using your modified version for the added functionality of value associatted with a location as opposed to just sheer location density.

    Reply
3 Trackbacks For This Post
  1. Open Data Hackday | DevCSI →
    August 22nd, 2011 → 1:45 pm

    […] this data to KML and fed it to Google Maps.  Ben describes the project in more detail in his blog post about the project, including links to the […]

  2. Language maps like heat maps « The Journeyler →
    September 18th, 2011 → 4:49 pm

    […] is called gHeat. This tool was brough to my attention by Been O’Steen as he modified gHeat to display some prices for student properties[4] in the UK. My initial thought was: “Wow how can we do language maps like this?” […]

  3. Language maps like heat maps « The Journeyler →
    January 29th, 2012 → 5:16 am

    […] is called gHeat. This tool was brough to my attention by Been O’Steen as he modified gHeat to display some prices for student properties[ ref 4] in the UK. My initial thought was: “Wow how can we do language maps like this?” […]

Leave a Reply Cancel reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. ( Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. ( Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. ( Log Out /  Change )

Cancel

Connecting to %s

Categories

  • alanturingmemorial
  • archive
  • bagit
  • blog
  • bloginfo
  • citation
  • contenttype
  • creativity
  • crigshow
  • dataflow
  • dev8d python twitter tagging spreadsheet data google
  • development
  • diagram
  • encoding
  • event
  • fedora
  • fonts
  • formats
  • fun
  • howto
  • idea
  • identifier
  • Intro
  • linux
  • metadata
  • motivation
  • oaiore
  • oaipmh
  • opinion
  • ORCID
  • osdiii
  • packaging
  • pairtree
  • play
  • python
  • rdf
  • redis
  • repository
  • rss
  • search
  • serialisation
  • statistics
  • Trackback
  • Uncategorized
  • unicode
  • usage
  • uuid

Archives

  • February 2013 (1)
  • October 2012 (1)
  • September 2012 (5)
  • August 2012 (1)
  • May 2012 (2)
  • April 2012 (4)
  • January 2012 (4)
  • October 2011 (3)
  • September 2011 (5)
  • August 2011 (2)
  • July 2011 (3)
  • June 2011 (1)
  • February 2011 (2)
  • January 2011 (2)
  • September 2010 (6)
  • July 2010 (2)
  • April 2010 (1)
  • March 2010 (3)
  • February 2010 (2)
  • January 2010 (1)
  • October 2009 (1)
  • June 2009 (1)
  • May 2009 (1)
  • March 2009 (2)
  • February 2009 (4)
  • December 2008 (1)
  • November 2008 (4)
  • October 2008 (3)
  • August 2008 (5)
  • July 2008 (3)
  • June 2008 (4)
  • May 2008 (3)
  • April 2008 (3)
  • February 2008 (6)
  • January 2008 (5)
  • December 2007 (11)
Create a free website or blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • Random Hacks
    • Join 37 other followers
    • Already have a WordPress.com account? Log in now.
    • Random Hacks
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
%d bloggers like this: