Tag: Twitter

05
Jan

Why all #academics should have professional @twitter accounts

I started my professional Twitter account @leekgroup about a year and half ago at the suggestion of a colleague of mine, John Storey (@storeylab). I started using the account to post updates on papers/software my group was publishing. Basically, everything I used to report on my webpage as “News”. 

I started to give talks where the title slide included my Twitter name, rather than my webpage. It frequently drew the biggest laugh in the talk, and I would get comments like, “Do you really think people care what you are thinking every moment of every day?” That is what some people use Twitter for, and no I’m not really interested in making those kind of updates. 

So I started describing why I think Twitter is useful for academics at the beginning of talks:

  1. You can integrate it directly into your website (like so), using Twitter widgets. If you have a Twitter account you just go here, get the widget for your website, and add the code to your homepage. Now you don’t have to edit HTML to make news updates, you just login to Twitter and type the update in the box.
  2. You can quickly gain a much broader audience for your software/papers. In the past, I had to rely on people actually coming to my website to find my papers or seeing them in journals. Now, when I announce a paper, my followers see it and if they like it, they pass it on to their followers, etc. I have noticed that my papers are being downloaded more and by a broader audience since I joined. 
  3. I can keep up on what other people are doing. Many statisticians have Twitter accounts that they use professionally. I follow many of them and when they publish new papers, I see them pop up, rather than having to go to all their websites. It’s like an RSS feed of papers from people I want to follow. 
  4. You can connect with people outside academia. Particularly in my area, I’d like the statistical tools I’m developing to be used by folks in industry who work on genomics. It’s hard to get the word out about my methods through traditional channels, but a lot of those folks are on Twitter. 

The best part is, there is an amplification effect to this medium. So as more and more academics join and follow each other, it is easier and easier for us all to keep up with what is happening in the field. If you are intimidated by using any social media, you can get started with some really easy how-to’s like this one.

Alright, enough advertising for Twitter, I’m going back to work. 

21
Dec

An R function to map your Twitter Followers

I wrote a little function to make a personalized map of who follows you or who you follow on Twitter. The idea for this function was inspired by some plots I discussed in a previous post. I also found a lot of really useful code over at flowing data here

The function uses the packages twitteR, maps, geosphere, and RColorBrewer. If you don’t have the packages installed, when you source the twitterMap code, it will try to install them for you. The code also requires you to have a working internet connection. 

One word of warning is that if you have a large number of followers or people you follow, you may be rate limited by Twitter and unable to make the plot.

To make your personalized twitter map, first source the function:

> source(“http://biostat.jhsph.edu/~jleek/code/twitterMap.R”)

The function has the following form: 

twitterMap <- function(userName,userLocation=NULL,fileName=”twitterMap.pdf”,nMax = 1000,plotType=c(“followers”,”both”,”following”))

with arguments:

  • userName - the twitter username you want to plot
  • userLocation - an optional argument giving the location of the user, necessary when the location information you have provided Twitter isn’t sufficient for us to find latitude/longitude data
  • fileName - the file where you want the plot to appear
  • nMax - The maximum number of followers/following to get from Twitter, this is implemented to avoid rate limiting for people with large numbers of followers. 
  • plotType - if “both” both followers/following are plotted, etc. 

Then you can create a plot with both followers/following like so: 

> twitterMap(“simplystats”)

Here is what the resulting plot looks like for our Twitter Account:

If your location can’t be found or latitude longitude can’t be calculated, you may have to chose a bigger city near you. The list of cities used by twitterMap can be found like so:

>library(maps)

>data(world.cities)

>grep(“Baltimore”, world.cities[,1])

If your city is in the database, this will return the row number of the world.cities data frame corresponding to your city. 

If you like this function you may also like our function to determine if you are a data scientist or to analyze your Google Scholar citations page.
Update: The bulk of the heavy lifting done by these functions is performed by Jeff Gentry’s very nice twitteR package and code put together by Nathan Yau over at FlowingData. This is really an example of standing on the shoulders of giants. 
09
Nov

Statisticians on Twitter...help me find more!

In honor of our blog finally dragging itself into the 21st century and jumping onto Twitter/Facebook, I have been compiling a list of statistical people on Twitter. I couldn’t figure out an easy way to find statisticians in one go (which could be because I don’t have Twitter skills). 

So here is my very informal list of statisticians I found in a half hour of searching. I know I missed a ton of people; let me know who I missed so I can update!

@leekgroup - Jeff Leek (What, you thought I’d list someone else first?)

@rdpeng - Roger Peng

@rafalab - Rafael Irizarry

@storeylab - John Storey

@bcaffo - Brian Caffo

@sherrirose - Sherri Rose

@raphg - Raphael Gottardo

@airoldilab - Edo Airoldi

@stat110 - Joe Blitzstein

@tylermccormick - Tyler McCormick

@statpumpkin - Chris Volinsky

@fivethirtyeight - Nate Silver

@flowingdata - Nathan Yau

@kinggary - Gary King

@StatModeling - Andrew Gelman

@AmstatNews - Amstat News

@hadleywickham - Hadley Wickham