Quite a long time ago now I wrote a post on my map of UK postcode towns in Microsoft Excel based on various posts I had seen on clearandsimply.com. It turns out I do actually use this map quite a lot as it is very quick to use and doesn’t require any extra specialist software. So I thought I would revisit this. Read More
Category: Uncategorized

Land Registry Motion Chart
Following on from the previous Land Registry posts I've had a go at using the GoogleVis package to plot the data. So far my favourite method is the motion chart below. Although I need to make more equal sales areas as London ruins the x-axis a bit. The best view is the histogram view. Read More

Land Registry Part 2
In my first land registry post I imported a month’s worth of land registry data, named the rows and had a go at using the ggplot2 package to produce a number of nice looking charts. This time I want to progress a little further. My aims are, using the same dataset to:
- Look at the distribution of prices
- Look at the prices by different factors
- Initially just using factors in the land registry data

Plotting shapefiles in R
After my last post on the ONS data structure this post is the first of a few on using that structure and some other public data, mostly UK government data, and mapping it using R. This first post is about getting shapefiles from various locations, loading them into R and plotting them.
The Dog and the Duck
Time is of the essence with this post so please excuse the strange mix of notations later on. One of my friends sent me this puzzle from fivethirtyeight.com and here is my solution to how the dog needs to catch the duck.
Lots of peoples first instinct is times faster but this is really just a lower bound, i.e. if the dog travels less than π times faster than the duck then the duck can just read radially to the antipoint of the dogs starting position.
There are a few key assumptions here that we can make from the beginning:
Looping over a string in SAS
In SAS it is easy to loop a macro between two numbers
%DO I=1 %TO 10; ... %END;
But if you have a list of non-sequential numbers or text you want to run your macro over, e.g. a list of towns, it can be a bit trickier. This SUGI paper gives a macro which lets you do just that. A few years ago I looked at that macro and didn't really understand how it worked and not wanting to use code I didn't understand I wrote my own version.