Publications by mikerspencer
Bump chart of a parliamentary constituency
The UK has just held a Westminster election to decide the next government. There are some amazing visualisations of what’s happened to the whole nation, but I think there’s a story to tell about my local constituency. I live in Midlothian, Scotland. It’s a former mining area and this was once the main employment. Miners were a heavily union...
1281 sym R (1103 sym/1 pcs) 2 img
Record Dec temperature and snow in Scotland
December 2019 broke a couple of temperature records for the UK. One for the warmest night time temperature and one for the warmest temperature overall. Both of these UK records were broken in northern Scotland, a place with little daylight during the winter months. The night time temperature record was observed at a place called Cassley Power Sta...
3236 sym R (1798 sym/1 pcs) 4 img
Mapping access to services to estimate community resilience – Edina geoforum
I gave a talk last week at the Edina GeoForum. Edina provide the Digimap service which gives UK education access to mapping and data. The talk I gave was on using spatial data to help understand community resilience. My colleague Elliot Meador led a project for the National Centre for Resilience, and this talk presented some of the ideas from tha...
1120 sym 2 img
Domestic data science – energy use
I wrote previously about my home electricity use. We’ve an open home energy monitor logging our import of electricity. Our house isn’t typical for the UK, we don’t have a gas supply and our space and water heating is via an air source heat pump (which runs on electricity). In my previous blog post I mentioned we were considering having Sola...
4440 sym R (6591 sym/1 pcs) 10 img
Lubridate/ggplot date helpers
This post collates a couple of functions to help with dates. I often work with daily data which spans multiple years, but want to visualise annual patterns. To do this I can extract the julian day for each date – i.e. the day of the year. Here are a couple of ways to do this: # Olden days format(Sys.Date(), format="%j") # Tidyverse library(lub...
2657 sym R (5115 sym/8 pcs) 12 img
Pop the balloons – maths game for home schooling
I read this article on home schooling and maths last week. There are some really good new ideas – and a pat on the back for doing some already. My son (6 yrs) and I tried out the pop the balloons game yesterday. Write the numbers 2-12, colour in some balloons next to some of the numbers and then pop them by throwing two dice that sum to the bal...
2800 sym R (858 sym/5 pcs) 10 img 2 tbl
A shiny app to compare mortgage costs
When I moved house a couple of years ago I was frustrated that mortgage comparisons used monthly repayments and total cost of the mortgage to see which were better. This was frustrating because while monthly repayments tell you whether a mortgage is affordable, they don’t tell you how much the price is and total cost over the whole mortgage is ...
2000 sym 2 img
How does your data flow? Using R for ETL (EdinbR talk)
On 25th Nov I spoke at the EdinbR meetup on using R for ETL, as a larger part of data workflows. It was a treat to share the stage with Riinu Pius, and her talk was on using R for health analytics. You can view the video of our talks here: My slides are available on Zenodo: Michael Spencer. (2020, November). How does your data flow? Using R for ...
799 sym
New paper: hares, snow and camouflage
Mountain hares in Scotland show increasing camouflage mismatch due to less snowy winters. Mountain hares are one of 21 species that molt from a dark coat in summer to a white coat in winter to maintain camouflage against snowy landscapes. But due to climate change, the duration of snow cover is decreasing – creating a “mismatch” in seasona...
2021 sym 2 img
Coding in the Open – lunchtime seminars
Hi everyone! I’m a convener for EdinbR. This month we’re doing something special and have a week of lunchtime seminars about the benefits of working openly. Please sign up and share with your networks! Work with data or manage people who do? Want to learn about automation, improving processes and how to incorporate open tools like Python and ...
2169 sym