Blog Archives

Keeping Track of an Evolving “Top N” Cutoff Threshold Value

April 26, 2015
By
Keeping Track of an Evolving “Top N” Cutoff Threshold Value

In a previous post (Charts are for Reading), I noted how it was difficult to keep track of which times in an F1 qualifying session had made the cutoff time as a qualifying session evolved. The problem can be stated as follows: in the first session, with 20 drivers competing, the 15 drivers with the

Read more »

Scraping Web Pages With R

April 15, 2015
By
Scraping Web Pages With R

One of the things I tend to avoid doing in R, partly because there are better tools elsewhere, is screenscraping. With the release of the new rvest package, I thought I’d have a go at what amounts to one of the simplest webscraping activites – grabbing HTML tables out of webpages. The tables I had

Read more »

Wrangling Complex Spreadsheet Column Headers

April 14, 2015
By
Wrangling Complex Spreadsheet Column Headers

Not a little p****d off

Read more »

A Couple of Handy ggplot Tricks – Using Environmental Variables and Saving Charts

April 12, 2015
By
A Couple of Handy ggplot Tricks – Using Environmental Variables and Saving Charts

A couple of handy tricks when working with ggplot that had escaped my radar until today. First up, I had a problem in a function I was using to generate a ggplot2 in which I wanted to accept a couple of optional arguments in to the function and then make use of them in a

Read more »

Mixing Numbers and Symbols in Time Series Charts

April 8, 2015
By
Mixing Numbers and Symbols in Time Series Charts

One of the things I’ve been trying to explore with my #f1datajunkie projects are ways of representing information that work both in a glanceable way as well as repaying deeper reading. I’ve also been looking at various ways of using text labels rather than markers to provide additional information around particular data points. For example,

Read more »

Iteratively Populating Templated Sentences With Inline R in knitr/Rmd

March 29, 2015
By
Iteratively Populating Templated Sentences With Inline R in knitr/Rmd

As part of the Wrangling F1 Data With R project, I want to be able to generate sentences iteratively from a templated base. The following recipe works for sentences included in an external file: What I’d really like to be able to do is put the Rmd template into a chunk something like this…: and

Read more »

Segmenting F1 Qualifying Session Laptimes

March 29, 2015
By
Segmenting F1 Qualifying Session Laptimes

I’ve started scraping some FIA timing sheets again, including practice and qualifying session laptimes. One of the things I’d like to do is explore various ways of looking at the qualifying session laptimes, which means identifying which qualifying session each laptime falls into: For looking at session utilisation charts I’ve been making use of accumulated

Read more »

What’s the Point of an API?

March 9, 2015
By
What’s the Point of an API?

Trying to clear my head of code on a dog walk after a couple of days tinkering with the nomis API and I started to ponder what an API is good for. Chris Gutteridge and Alex Duttion’s open data excuses bingo card and Owen Boswarva’s Open Data Publishing Decision Tree both suggest that not having

Read more »

So What Can Text Analysis Do for You?

March 2, 2015
By
So What Can Text Analysis Do for You?

Despite believing we can treat anything we can represent in digital form as “data”, I’m still pretty flakey on understanding what sorts of analysis we can easily do with different sorts of data. Time series analysis is one area – the pandas Python library has all manner of handy tools for working with that sort

Read more »

Tools in Tandem – SQL and ggplot. But is it Really R?

February 28, 2015
By
Tools in Tandem – SQL and ggplot. But is it Really R?

Increasingly I find that I have fallen into using not-really-R whilst playing around with Formula One stats data. Instead, I seem to be using a hybrid of SQL to get data out of a small SQLite3 datbase and into an R dataframe, and then ggplot2 to render visualise it. So for example, I’ve recently been

Read more »