Think about the person-to-person communication that you make during the day. How much of your dialogue is with someone whose name you know? How about someone you've met? Someone you'd feel comfortable having a coffee with? There are so many wonderful opportunities that we can realize with new technologies and social media tools, and it's fascinating to see how it affects the direct connection to our physical surroundings and our emotional landscape. I don't mean to imply that there's a right answer, but hopefully we stay aware of the balance of our digital and physical interactions.


The video shows the output of a Processing sketch that accesses the Twitter API. It reads in all the tweets that are being sent from all over the world and scrubs them to find out if people are talking, texting, calling, blogging, tweeting, or communicating in some other manner that social media tools have enabled. The Processing sketch generates a chart showing how each mode of communication compares to the others. The data will be different every time the program is run.

I used the Processing.org programming environment and accessed the Twitter API. Captured video with iShowU HD.

Music is by Air "How Does it Make You Feel?"

SOURCE CODE: (Note, you need to download the Twitter API .jar files and add them to your sketch folder's library... go to http://mccv.github.com/processing-tweet-stream/ for those. You also need to put your own twitter username and password in the code where I write "YOUR_USERNAME" and "YOUR_PASSWORD." Enjoy and let me know if you have any comments.)

*****

import com.twitter.processing.*;

// this stores how many tweets we've gotten
int tweets = 0;
// and this stores the text of the last tweet
String tweetText = "";

int visit=1;
int talk=1;
int texting=1;
int calling=1;
int tweeting=1;
int blogging=1;
int skyping=1;
int posting=1;
int emailing=1;
int experiencing=1;

float tots; // sum total of all social media hits

int pielocx = 750; // location of the pie chart in x
int pielocy = 250; // location of the pie chart in y

void setup() {
size(1000,750);

// set up twitter stream object
TweetStream s = new TweetStream(this, "stream.twitter.com", 80, "1/statuses/sample.json", "YOUR_USERNAME", "YOUR_PASSWORD");
s.go();

}

void draw() {
background(#F4F4F4);
fill(#005F7F);
//
PFont font = loadFont("Helvetica-Bold-34.vlw");
textFont(font, 32);

text("VISITING: ", 10, 50);
text("TALKING: ", 10, 100);
text("TEXTING: ", 10, 150);
text("CALLING: ", 10, 200);
text("TWEETING: ", 10, 250);
text("BLOGGING: ", 10, 300);
text("SKYPING: ", 10, 350);
text("POSTING: ", 10, 400);
text("EMAILING: ", 10, 450);
text("EXPERIENCING: ", 10, 500);

int[] SMvalues = {visit, talk, texting, calling, tweeting, blogging, skyping, posting, emailing, experiencing};
float lastAng = 0;

tots = visit + talk + texting + calling + tweeting + blogging + skyping + posting + emailing + experiencing;

text("TOTALS: ", 10, 600);
text(tots-10, 500, 600);

for (int i = 0; i < SMvalues.length; i++){
fill(255/50*i, 255/10*i, 255/10*i);
smooth();
noStroke();
arc(pielocx, pielocy, 300, 300, lastAng, lastAng+radians(360*SMvalues[i]/tots));
lastAng += radians(360*SMvalues[i]/tots);
text(SMvalues[i]-1, 500, 50+i*50);
}

// set up fonts
PFont font2 = loadFont("CourierNewPSMT-10.vlw");
textFont(font2, 10);
fill(0);
text(tweets, 10, 680);
// and draw the text of the last tweet
text(tweetText, 10, 700);

}

// called by twitter stream whenever a new tweet comes in
void tweet(Status tweet) {
// print a message to the console just for giggles if you like
// println("got tweet " + tweet.id());

String chunk;

// store the latest tweet text
tweetText = tweet.text();
// bump our tweet count by one
tweets += 1;

tweetText = tweetText.toLowerCase();

StringTokenizer st =
new StringTokenizer(tweetText,"",()[]&@#");
while (st.hasMoreTokens()) {
chunk=st.nextToken().toLowerCase();

if (chunk.indexOf("visit") >=0 )
visit++;
if (chunk.indexOf("talk") >=0 )
talk++;
if (chunk.indexOf("text") >=0 )
texting++;
if (chunk.indexOf("call") >=0 )
calling++;
if (chunk.indexOf("tweet") >=0 )
tweeting++;
if (chunk.indexOf("blog") >=0 )
blogging++;
if (chunk.indexOf("skype") >=0 )
skyping++;
if (chunk.indexOf("post") >=0 )
posting++;
if (chunk.indexOf("email") >=0 )
emailing++;
if (chunk.indexOf("experience") >=0 )
experiencing++;
}

}

*****