Publications by mikerspencer

An ode to Statistics Scotland

23.10.2022

I was talking to my mum this weekend about council home provision. When I looked up how many my local authority provides, I discovered Statistics Scotland publish data on all 32 local authorities in Scotland (some seem more lax than others at sending returns). It’s amazing that all this information is so easily available for the public to use. ...

924 sym R (3618 sym/1 pcs) 2 img

Rapid dashboard prototyping

18.11.2022

I work in a startup called the Smart Data Foundry. We work with financial data to improve society. As a startup we have lots of ideas to try out, either internally or with collaborators. This is the idea of failing quickly – don’t spend a lot of time trying to find out if an idea works, get it to a testable state as fast as you can so you kno...

952 sym

Scottish winter weather

19.09.2014

Following on from my previous post about September weather, it seems appropriate (for my research and blog) to look at winter weather specifically for Scotland. This post again uses Met Office data. I plan to use this to help predict snow cover in Scotland, more on that in a later blog post. In the mean time have a look over the following figure....

838 sym 6 img

Warm October, cold winter?

22.10.2014

A tweet flashed by a couple of days ago hoping that a warm October might indicate a cold winter: So that warm October – cold winter theory… http://t.co/wlqLy8P2xn— Winterhighland (@winterhighland) October 18, 2014 It’s a straightforward enough hypothesis, although one I think we all can agree seems a little far fetched. Given I have UK re...

1233 sym 6 img

Cairngorms snow cover, 1954-1984

09.11.2014

Neil Reid wrote a post this week about news from the Mar Lodge estate. On it he mentions the future of Derry Lodge. I’ve never been to Derry Lodge so seeing a photograph was interesting. From 1954 until 1984 it was one of 145 Scottish reporting stations for the Snow Survey of Great Britain. You can read more about the snow survey in my article:...

4546 sym 12 img

Rare snowmelt estimation (GB)

24.02.2015

I read Hough and Hollis’ 1997 paper recently which uses Met Office synoptic stations to estimate a magnitude – recurrence relationship for snowmelt in the UK. i.e. how often do we get how large a snowmelt event? I’m particularly interested in their work as I’m aiming to build on their work by running snowmelt models over long time period ...

3238 sym R (2392 sym/2 pcs) 10 img 1 tbl

Tapply on steroids – by (climate trends in Scottish seasons)

20.03.2015

A while back I wrote a post on using the R tool tapply, which is my most popular post. Tapply allows you to repeat a function over a vector split into groups, e.g. you’ve two columns of data with the first being Date and the second being a variable (snow days, banana imports, whatever) and you want to look at your variable split by month, year,...

2524 sym R (2903 sym/6 pcs) 6 img

Getting started with NetCDF – reading CEH GEAR

12.06.2015

Last year CEH released an interpolated precipitation dataset for the UK call GEAR. You can read about this dataset here, or view slides presented at the 2014 BHS Symposium here. In short; these data describe precipitation over Great Britain (yes, excluding Northern Ireland) at a 1 km resolution grid with a daily time step. I’m using these CEH G...

3156 sym R (786 sym/5 pcs) 8 img

Colouring a plot using a continuous variable in R

29.09.2015

I often find myself coming back to this answer I gave on Stack Overflow in 2014. It shows how to colour a plot based on an independent continuous variable using the base graphics package. In the answer I gave it’s about colouring boxplots, but it equally applies to adding colour to a scatter plot. I’ve decided to elaborate here, as much for m...

1245 sym R (635 sym/1 pcs) 6 img

Monthly patterns in Scottish snow (1946-2006)

24.04.2016

There’s been a bit of a flurry on Twitter recently about April snow in the UK (see tweet below). My opinion is there’s often UK snow during April, but it happens to be where the population isn’t (e.g. Scottish Highlands) and the UK media is quite parochial in their reporting. A reminder that some snow in April is perfectly normal for most ...

5204 sym 12 img 1 tbl