Project 2: Comedians & their Followers

by heather @ 8:42 am 9 February 2012

Various awesome projects have explored how information filters through Twitter as a whole or how to characterize particular types of patterns, e.g., transit, again by searching through a large scope of tweets.

In this project, I took a step towards analyzing the interaction patterns around specific users, specifically, comedians.

Having been working with a robotic comedian that attempts to monitor audience reactions in real time, comedians that use twitter as a place to workshop their jokes provides data that could potentially continue to bootstrap that process. It is quantitative, public, and many, many comedians use it.

Do retweets, favorites and mentions reflect the success of particular jokes? Do they reflect the overall personality and interaction modes of that performer? How do they maintain rapport? Where do they divide their professional from personal? Do they ever lose their cool?

[vimeo=http://vimeo.com/36476603]

Please find some helpful resources to start playing with Twitter data in my previous Project 2 posts! It turned out some data was easier to scrape from twitter than others. Retweets were most supported by the twitter4j / Twitter API libraries.

The animations are adaptations of this openprocessing petaled flower: http://www.openprocessing.org/visuals/?visualID=48650. For readability, I do not re-include the visual adaptations in my code below, as I was mostly interested in sharing where my data came from.

You can also see in the extra bits of code (currently commented out), which include my first efforts at tracking down information about the whens and whos of individual retweets to extend the overall count. The next tricky bit is to track down responses to a tweet, which is quite convoluted as its not built directly into the API (again, take a peek at the code for the method I’m testing), happy to share with you my continued discoveries!

<pre lang=””java””>

 

// Runtime options
boolean part1 = true;
boolean part2 = false;
int numTweets = 10;
String who = “robdelaney”;

// Inits
ArrayList recentTweets = new ArrayList();

void setup(){
size(550,550);
background(255);
smooth();

//Credentials
ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setOAuthConsumerKey(“*******************”);
cb.setOAuthConsumerSecret(“*******************”);
cb.setOAuthAccessToken(“*******************”);
cb.setOAuthAccessTokenSecret(“*******************”);

Twitter twitter = new TwitterFactory().getInstance();
Query query = new Query(“@”+who); //userid = 22084427 for ref
query.setRpp(5);

try{
//PART 1: FIND COMEDIAN STATUSES
if(part1){
println(“in part 1”);
// Get statuses
Paging paging = new Paging(1,numTweets);
List<Status> statuses = twitter.getUserTimeline(who, paging);

// For each status…
for(int i = 0;i<statuses.size();i++){
println(“in statuses”);
Status s = statuses.get(i);

// Get characteristics (text, time created, id)
String msg = s.getText();
Date d = s.getCreatedAt();
long id = s.getId();
println(“Tweet #” + i+” at” + d + “: ” + msg);

//Get total retweet count of that status
long rt_count = s.getRetweetCount();
println(“Total Number of Retweets: “+(int)rt_count);

//Add tweet to list
RecentTweet recent = new RecentTweet(msg, (int)rt_count);
recentTweets.add(recent);

/*
//For each retweet find time and username
for (int i = 0; i < retweets.size(); i++) {
Tweet rt = (Tweet) retweets.get(i);
String rt_user = rt.getFromUser();
Date rt_date = rt.getCreatedAt();
println("Retweet by " + user + " at " + d);

//Find Related Results: replies and more
//SADNESS: seems not to be a supported method, gives an insufficient authentication credentials error
//RelatedResults replies = twitter.getRelatedResults(id);
//println(replies);
println(" ");
}
}

// PART 2: MATCH UP @-REPLIES TO SPECIFIC COMEDIAN TWEETS
if(part2){
QueryResult result = twitter.search(query);
ArrayList replies = (ArrayList) result.getTweets();
for (int j = 0; j < replies.size(); j++) {
Tweet r = (Tweet) replies.get(j);
String r_user = r.getFromUser();
String r_msg = r.getText();
Date r_date = r.getCreatedAt();
long r_id = r.getId();
Status r_status = twitter.showStatus(r_id); // reply status
long orig_id = r_status.getInReplyToStatusId();
Status o_status = twitter.showStatus(orig_id); //original (replied-to) status
println("Tweet by " + r_user + " at " + r_date + ": " + r_msg);
println("Reply to: "+o_status.getText());
}
}
*/
}
}
}
catch (TwitterException te) {
println("Couldn't connect: " + te);
}

println("and we have stored "+recentTweets.size()+" tweets");
}

void draw(){
//do stuff
//println("in draw");
}

class RecentTweet {
private String msg;
//private Date date;
private int numRTs;

RecentTweet(String m, int rts) {
msg=m;
//date=d;
numRTs=rts;
}

public String msg() {
return msg;
}

// public Date date() {
// return date;
// }

public int numRTs() {
return numRTs;
}

}

</pre>

1 Comment

  1. ========================================
    Heather Knight: Comedians & their Followers

    maybe color by subject/category of joke.  i dont know whether semantic analysis of joke is too difficult

    the black is too thick on the first few demos, makes it harder to read the red text<--agreed I like the general graphic visualization of your project but just the flower petals seem irrelevant.  What information does the flower shape/number of petals add that text size wouldn't? Number of petals==number of retweets? But you can't really tell as there are hundreds... just looks like a ring. Does the speed of growth of the flower equate to speed of propagation?  Could you do it in real time so you can monitor a tweet over time? Or maybe have each petal fold and become more complex as it gets retweeted itself... Cool area of inquiry, not sure what information is being visualized by the animation though. Ah, got it now. I agree the time series data is full of potential. You kind of lose the comedy here. We could be visualizing anything. It would have really shined if you took advantage of the strength of your content.+1 Yea, when I look at it I think that the overlap or size of petals is relevant. would have liked to see the tweets displayed differently, it's kind of hard to read with it going off the page and originating in a flower's center but extending greatly on the right. definitely like where this idea is headed though! Please use the WP-Syntax plugin (in wordpress -- it's installed in the course blog) to format your code attractively.  [I think there's just an extra   "   mark at the top] The flower petals are a great way to see the size of the popularity of the tweets, but they make the text hard to read sometimes. It might be nice to replace the interactivity with a more automated timeline of tweets (scaled instead of real-time) and have the interaction be filtering or examining the individual retweets I love the idea of filtering Twitter data by looking at comedians. It's more fun and refreshing than a lot of what I've seen (not just here) which tries to be very serious (ya). The interaction is fun, but I feel like it quickly becomes hard to tell what's going on. I want to zero in on a single joke that I find funny and watch it travel the social network, rather than just a deluge of tweets from a single comedian. The deluge seems very Twitter-like, and one of the things I find appealing about this project is that in some way it seems to subvert the general attitude toward Twitter. I like the metaphor of the flowers expanding radially, like the ever spreading sphere of influence, but I feel like once it reaches a certain threshold the effect is somewhat lost. Also, would there be a way to incorporate a color element to introduce another depth of information? The time-based aspects of the flower growth is a missed opportunity, for the moment -- it would be great to see the RT's trickle in (in a time-based way), with more petals coming in over time, like accelerated timeline. Oh, OK, I see you had planned to do this, you got halfway.  Are the tweets choosen randomly when you click? Or do they appear in time order? I'm wondering what the significance of how tweets appear is, if any... Have you thought about looking at how jokes change as they travel? Way beyond the scope of this, but I wonder if you can find the start of memes, or jokes from a comedian that are discarded by most followers but repeated by some sub-group. i like the flower growing and your thought process It seems like the growing flower design doesn't provide much more than a scaled circle would. Maybe I missed what the detailed interior of the flower is, but I couldn't really wrap my head around much other than the scale of the flower circle. I like your vimeo name.  This is a cool time based visualization, but I'm curious as to the deeper meaning of a intersecting tweets.  Also, I like that you're imposing the text on top of the graphic, but maybe you could type set so it fits within the center circle so its easier to read? Most of them tend to go off the screen, so you just get the first 30 characters of every joke. **Yeah. The randomness is sort of beautiful but the text becomes hard to read in places.  Also the really popular tweets become less elegant as they get really dense.  Maybe there is some way to keep them aesthetically consistent with the other tweets?   Great visuals! I personally prefer the tigher spirals which come off as more abstract rather than the looser ones which resemble flowers. I think they distract from the content a bit. Tumblr might also let you track further than one layer of retweet? They're mostly image based so it might not be as successful for number of comedians, but you could turn your flowers into interesting trees or snowflakes.  You talk really nicely, with confidence and present well! I wonder how much more can be done with twitter tweets :)

    Comment by patrick — 9 February 2012 @ 9:45 am

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2021 Interactive Art and Computational Design, Spring 2012 | powered by WordPress with Barecity