Posts

One of the most consistent fonts of posts on this blog is The Guardian’s football trivia page The Knowledge. A particular reason for this is that the small contained questions lend themselves to small blogposts that I can turn around in an hour or two, as opposed to being endlessly redrafted until I lose interest. However, I still sometimes don’t quite get round to finishing some of these posts, or have trouble justifying a blog post on a very small and ‘trivial’ answer to a question.

CONTINUE READING

I’m extremely biased, but to me, one of the real success* stories in neuroscience over the last (just over) two decades has been in studying reward signals. Since the seminal 1997 paper, a lot of work has gone into figuring out how the brain assigns value to outcomes. *ugh, maybe. This isn’t a blog post about that My PhD project looks at novel ways of eliciting valuation behaviour to study these signals, but as a key part of the modelling involved in this work, it’s important to get a handle on reinforcement learning.

CONTINUE READING

In my free time away from PhD and data science work, I (used to) enjoy rowing. Aside from obvious benefits like socialising, providing a (very intense) workout, seeing the outdoors at least a few times a week… there are really two things that I love(d) about rowing: It’s the sport that is closest to a simple engineering problem. Going fast basically boils down to how in time and how hard you can get 1-8 guys to move an oar through the water.

CONTINUE READING

A while ago (and also still a bit) racing bar charts were all the rage on data visualisation forums/twitter. Perhaps one of the real breakout examples is this tweet from the, always excellent, John Burn-Murdochat the Financial Times, looking at the most populous cities in the world since the middle ages: New project: A “Bar Chart Race” animation showing the changing ranks of the 10 biggest cities in the world since 1500.

CONTINUE READING

For a recent blogpost, I required data on the ELO ratings of national football teams over time. Such a list exists online at eloratings.net and so in theory this was just a simple task for rvest to read the html pages on that site and then fish out the data I wanted. However, while this works for the static websites which make up the vast majority of sites containing tables of data, it struggles with websites that use JavaScript to dynamically generate pages.

CONTINUE READING

Most Wednesday’s I enjoy reading The Knowledge blog on the Guardian’s website and reading the football trivia therein. When time (and questions) allow, I like to answer some of the questions posed, example of which are here, here, and here. League of Nations The first question comes from Which player had the nationality with the lowest FIFA World Ranking at the time of him winning the Premier League? — The Tin Boonie (@TheTinBoonie) June 18, 2019 a similar question is also answered in this weeks column:

CONTINUE READING

For anyone watching football, being able to predict matches is a key aspect of the hobby. Whether explicitly (e.g. when betting on matches, or deciding on recruitment for an upcoming season), or more implicitly when discussing favourites to win the league in the pub, almost all discussion of the sport on some level require predictions about some set of upcoming games. The first step of prediction is some form of quantification of ability.

CONTINUE READING

When studying why people make the economic choices they do, we need some way of quantifying the value to the person of the offered choices. For instance, when deciding whether to ride to my office by bike or instead catch the bus, there are myriad factors that my brain feeds into an equation to get two values: the utility of taking the bus the utility of riding my bike For instance, if it looks like it might rain, I’m more likely to take the bus as getting soaked reduces the utility of cycling to work.

CONTINUE READING

In what is becoming a repeated series, I enjoy answering trivia questions from The Guardian’s The Knowledge football trivia column. There’s a few questions that built up that seemed amenable to coding answers so I’ve taken a stab at them here #munging library(tidyverse) library(data.table) library(zoo) #english football data library(engsoccerdata) #web data scraping library(rvest) #plotting library(openair) Calendar Boys The first question this week concerns players scoring on (or nearest to) every day of the year

CONTINUE READING

Riddler Classic In my spare time I enjoy solving 538’s The Riddler column. This week I had a spare few hours waiting for the Superbowl to start and decided to code up a solution to the latest problem to keep me busy. The question revolves around a card game in which whatever choice a player makes, they are likely to lose to a con artist. Formally this is phrased as:

CONTINUE READING