Roko Mijic

Mathematics and Data Science

Visualizing property prices

It’s useful to take a look at data to quickly eyeball the patterns so that you can see what a good analysis should pick up on. The dataset I’ve been working with is a collection of information about houses sold in the southeast of the UK over the past 6 months or so.

Amongst other things, the dataset contains information about the number of bedrooms, property subtype (terraced, semi-detached, detached, etc) and price. I decided to use R with the Leaflet package to visualize this data by plotting it on a map, with one translucent dot plotted for each house.

Property price


Property subtype

Rather than plotting 6 or 7 different subtypes, each subtype is given a “score” between 0 and 1, with more desirable subtypes (such as detached) getting a higher score (and a more orange color) on this map:


Number of bedrooms

displays comparatively less variation, but this is expected.


These are not interactive maps because the interactive versions using the leaflet library and Shiny will cause one’s browser to either crash or respond extremely slowly – there are 44,000 datapoints plotted here. More on this to come.

Basic mapping with leaflet + shiny

Here’s a first pass at mapping property sale data in the southeast of England using Shiny and Leaflet. Each dot is a house that was put up for sale this year:

Testing Shiny functionality on WordPress

I’ve been spending some time working with R and RStudio recently, but have been on the lookout for a way to effectively share my data hacking projects with the world. I recently found Shiny, which allows you to run actual R code on an R server and display the results on any webpage. To get things started, I made this very simple interactive histogram of the normal distribution:

© 2016 Roko Mijic