Monthly Archives: November 2018

Assign Country Code to Tweets Based on GPS Coordinates

[UPDATE: THE BELOW CODE WAS DESIGNED FOR TWEETS THAT HAD BEEN ALREADY FORMATTED TO .CSV.  I HAVE UPDATED THE CODE TO WORK WITH RAW TWEETS.  THE GITHUB PAGE HAS LIKEWISE BEEN UPDATED.] When looking at tweets, it is often important to know where the tweet was created.  For tweets with GPS coordinates, Twitter is nice […]

Placing Text Within an R Plot

I often add text in plots. This text can be a legend or labeling certain points, in which case assigning it x and y coordinates are easy. Often times, the text is descriptive, e.g. the slope of a line or the number of observations in a sample. Customizing (x,y) coordinates in that case is simple […]