Mapping Mr Correcter tweets

#Mapping, #Ruby, #Web

As an update to a previous post about Mr Correcter, the Twitter spelling bot here is a post about how I managed to find and geolocate so many offenders. Quick update; Mr Correcter was a script that searched Twitter for 2x common spelling mistakes (beleive and acommodate) and replied back to the tweeter reminding them of the spelling mistake.

Stats

map of mr-correcter tweets

I wanted to geolocate the offenders to generalise which part of the world was the worst at spelling, at least on social media anyway. I previously guessed America due to the number of replies back to Mr Correcter (see previous post for some amusing ones) and as you can see from the map, this turned out to be true.

How I gathered this information

I used three methods in this algorithm to identify where (lat, lng) these Tweets (or accounts) orginated

if( the tweet has geolocation data available ){  
    then use this
} elseif ( the user has geolocation data available on their account ){  
    then use this data
} elseif ( the user has a location string set and this can be geolocated ){  
    then use the geolocation of this
} else {  
    unable to geotag the tweet
}

The obstacles were the Twitter API, getting some of this data is restricted to hourly limits so I had to use a cronjob to schedule the script and aggregate the data after completion.

The script I used is openly available.