I haven’t done anything with football data for ages. All sorts of reasons why, including that maintaining the data became a proper pain in the neck and I was spending more time on that than on fun vis stuff and models. Anyway, some sudden inspiration, the old database is repaired, code dusted off and… Here’s…
Category: RStats

A Better Covid-19 Heatmap
I got frustrated with the UK Government’s Covid-19 maps of England and tried to build a better one using R and Shiny. Code examples and analysis may be coming, but for now you can find the app here.

Learning to code (properly) in R and Shiny
You’ve probably seen this diagram before, or a variation on it; data science happens at the conjunction of statistics, domain knowledge and computer science. Sometimes the domain knowledge part is swapped for data visualisation, but it still works. I came to data science from statistics – my first job was as an econometrician – and…

Visualising your Twitter personality
Who you follow on Twitter can say a lot about you and with a bit of R and Gephi, can look quite pretty too. Here’s my network (who I follow, not who follows me), clustered into communities by Gephi, based on the similarity of each account’s own followers. It works pretty well to profile my…

A UK hexbin visualisation with ggplot, rayshader and geoviz
It’s taken me too long to try out rayshader’s new ggplot feature and obviously when I got around to it, I was going to find a way to use geoviz. Here’s a quick code snippet to draw a stylised hexbin elevation map of the UK, that’s easily changed to anywhere else in the world that…

5 minutes to Hawaii in 3D with Rayshader and Geoviz
This one’s a vignette from the geoviz package, but vignettes are easy to miss so I’m putting it on Hilltop Analytics too. A quick geoviz and rayshader code snippet that draws Hawaii with a Stamen Maps overlay. No API keys needed for this one, run the code below and you’re there! library(geoviz) library(rayshader) # Coordinates…

3D football match visualisations
I used to do something a bit like these a long time ago and have resurrected them as a way of dipping a toe back into football analysis. They violate just about every rule of data visualisation, but they’re fun and I like them. Think of them as a souvenir poster of a match, rather…

Visualising the London Marathon route with R, rayshader and geoviz
If you’ve been reading my recent posts, you might have already played with geoviz, that makes it easy to draw rayshader scenes in R. Recently we learned how to quickly draw any location you like in rayshader and to add GPS tracks. What if you want to draw a scene with data that doesn’t come…