//
archives

Uncategorized

This category contains 10 posts

Box Me

Here’s a short R function I wrote to turn a long data set into a wide one for viewing. It’s not the most exciting function ever but I find it quite useful when my screen is wide and short. It simply cuts the data set horizontally into equal size pieces and puts them side by … Continue reading

Excuses and Opportunities

Regular readers of the blog will have noticed that I haven’t been a regular contributor to the blog over the last year. There are some good reasons/excuses for that, predominantly around buying and renovating our new home, getting married and starting a new job at Facebook. Having an Arsenal season ticket also doesn’t help. I … Continue reading

Clegg vs Pleb: An XKCD-esque chart

I saw an interesting “challenge” on StackOverflow last night to create an XKCD style chart in R. A couple of hours later & going in a very similar direction to a couple of the answers on SO, I got to something that looked pretty good, using the sin and cos curves for simple and reproducible … Continue reading

Why are pirates called pirates?

In homage to International Talk Like a Pirate Day… I recently stumbled across a series of blog posts from the folks at IDV that visualised the archive of recorded pirate attacks which has been collected by the US National Geospatial-Intelligence Agency. It’s a dataset of 6000+ pirate attacks which have been recorded over the last 30 … Continue reading

R: Dealing with package updates

Here’s a very short post to highlight one of the “highlights” of my week that I thought was worth sharing with the wider community. One of the things I find great about R is the rapidly evolving ecosystem where new packages are being constantly created and others are being updated. Up until now, I’ve found … Continue reading

Another visualisation of 118 Years of US Weather Data

I posted yesterday about weather data sourced from NOAA to look at how hot this March was compared to previous years and used a couple heat maps in R to look at how temperatures compared based on using the rank of each year for each state (so if, say this March in Florida was the … Continue reading

118 years of US State Weather Data

A recent post on the Junkcharts blog looked at US weather dataand the importance of explaining scales (which in this case went up to 118). Ultimately, it turns out that 118 is the rank of the data compared to the previous 117 years of data (in ascending order, so that 118 is the highest). At … Continue reading

Book Review: The Art of R Programming

Over the past few months, there have been several glowing reviews of The Art of R Programming by Norman Matloff, which led me to give it a go and buy it for my Kindle. I’ve just finished reading it and am adding to that list of glowing reviews.  Having been using R in varying amounts … Continue reading

Non overlapping labels on a ggplot scatterplot

This is a very quick post just to share a quick tip on how to add non overlapping labels to a scatterplot in ggplot using a great package called directlabels. The trick is to make each point a single member group using an aesthetic like colour and then apply the direct.label function with the first.qp … Continue reading

Welcome to Drunks and Lampposts

Welcome to Drunks and Lampposts, our new statistics and data related blog. We’re both big fans of the world wide web as a fantastic learning and doing resource: it has never been easy to learn the theory behind a new technique, but then also be able to implement that with your own data and answer … Continue reading

Blog Stats

  • 287,888 hits

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 480 other followers

Follow

Get every new post delivered to your Inbox.

Join 480 other followers