Tag Archives: twitter

Randomly Sample Twitter Followers in R

Image Credit: Doug Buckley at http://hyperactive.to

Image Credit: Doug Buckley at http://hyperactive.to

So yesterday, I set up an #AmazonGiveaway for my new R book at https://giveaway.amazon.com/p/ea32d421d8d7672d — but I had my 10 year old input the number that will determine every nth person who gets the printed copy delivered to them, so that I’d be surprised too when it happened. Well I got surprised today, because nothing’s happened yet… he must have set the number pretty high. I’m a little impatient, so I decided that today I’d like to randomly sample my most recent 100 Twitter followers and send 3 eBooks to whoever comes up.

Turns out, it was pretty simple once I found the right documentation. This was the first time I’ve successfully accessed information from Twitter within R; when I tried other times, the documentation I encountered was problematic and the authentication never worked. But I finally converged on excellent documentation which helped to solve my problem at http://geoffjentry.hexdump.org/twitteR.pdf.

First, I went to https://apps.twitter.com/app/new and set up an application called “random-new-followers”. I think the choice of name is totally arbitrary… Twitter just wants a way to track who’s using their API and how it’s being used. I gave this form my name and web site URL as well. Next, I went to the “Keys and Access Tokens” tab. I had to click the “Create Access Token” button at the bottom. Once I did, I had 4 different access keys to work with, each of which looks like an unwieldy string of numbers and letters and has one of the following four names:

  • Consumer Key (API Key)
  • Consumer Secret (API Secret)
  • Access Token
  • Access Token Secret

Then I went into my R console. First, I wanted to make sure I had the most recent copy of the httr and twitteR packages. After using .libPaths() to find out where my R packages are installed, I went into those directories and blew away the old folders containing httr and twitteR. Then I went into R and re-installed the two packages:

> install.packages("httr")
> library(httr)
> install.packages("twitteR")
> library(twitteR)

At this point, authenticating and getting access to the Twitter data was pretty straightforward:

setup_twitter_oauth("Consumer Key", "Consumer Secret",access_token="Access Token", access_secret="Access Token Secret")

(When YOU use the above code, be sure to plug in the long, unwieldy number-and-letter combinations you saw on your “Keys and Access Tokens” tab. They are unique to you… and this is what unlocks twitteR so you can get real data!) Next, you can specify the user whose information you’d like to obtain, and using getFollowers() you can find out information about their followers:

oauth-example

Notice that I only wanted to randomly sample from my most recent 100 followers, hence the [1:100]. The names that pop up in quotation marks are my random sample of followers. (If you wanted to sample from all your Twitter followers, just leave out the [1:100].) After I got my three random followers, I checked out their Twitter pages. The bad news? I think they are all bots 🙁

(So then I filtered out anyone who had “811” or “#AmazonGiveaway” in their recent Tweets.)

There is a lot more information that’s obtained when you try getUser() from the twitteR package. If you’ve gotten this far, check out all of the interesting information (and methods) that are contained in the results by typing this:

> str(me)

A New Social Media Blackout at Harrisburg University!

Last September, I wrote about the Social Media Blackout experiment conducted by the Harrisburg University of Science and Technology in Harrisburg, Pennsylvania. I was particularly intrigued by their exercise, blocking all messaging and social media on campus for a week to get students to reflect on the issues surrounding ubiquitous connectivity, because I had just finished doing my own experiment on myself – and publishing the journal of the experience in my 2010 book, Disconnected.

Last week, I participated in a panel that discussed the issues associated with connecting and disconnecting at Harrisburg University’s Social Media Summit 2011. It was tremendously fun! If you’re interested in these issues, consider attending their Social Media Summit in May 2012.

This year, they’re at it again! I’ve attached the hot-off-the-press news release that describes the exercise, which will be conducted between September 21 and 27, and their results from last year.

 

Contact:  Steven Infanti, AVP Communications, 717.901.5146/717.982.3772 (cell) or Sinfanti@harrisburgu.edu

Back in Blackout: HU to Shutdown Social Media Access September 21 to September 28

Sep 21, 2011–Harrisburg University of Science and Technology, beginning 8 a.m., Wednesday, September 21, will block access over its network to several popular social media sites including, Facebook, MySpace, Twitter, and LinkedIn. Additionally, access to all instant messaging services will be blocked.  This exercise, which will affect all students, faculty and staff at the University, will conclude September 28, 2011.

The intent of this consciousness-raising exercise is to inspire thinking about how, when and where the University community uses social media as well as awareness about uses and/or abuses of social media, says Dr. Eric Darr, Executive Vice President and Provost at the University.

“It is not intended to be a punishment nor is it intended to be an indictment of social media. In fact, access to all social media sites was still possible over mobile wireless devices, proximate public networks or home-based networks.  The hope is to make habits and effects of social media use more visible and understandable, particularly in the classroom, through temporary abstinence.”

Additionally, a panel of educators and authors recently discussed social media addiction and the benefits and drawbacks of unplugging from social network during the 2011 Social Media Summit held September 14th at the University.  One conclusion from the panel is that insights gained through unplugging can be used to set healthy personal boundaries around future social media use. The University will encourage journaling by students and staff in an effort to preserve and reflect upon opinions, feelings and ideas.

The sites being blocked include: Facebook, MySpace, Bebo, Orkut, Hi5, Linkedin, Twitter, Twitxr, Plurk, Tweetpeek and texting outlets.

The private STEM (science, technology, engineering and mathematics) focused comprehensive university is home to several academic programs that focus on social media and mobile application development.  In addition to the annual Social Media Summit, the University is home to the annual Learning and Entertainment Evolution Forum (LEEF) and the Center for Advanced Entertainment and Learning Technologies.
“Obviously, this is a University that weaves technology into most of our daily activities. We believe that technology is not inherently good or bad. Rather, technology becomes useful or destructive in the hands of users. This exercise is an attempt to better understand an important technology, social media, that clearly impacts how we live and work It might inspire students, faculty and staff to think more about their social media habits and to further raise awareness about the impact that social media has on daily life and work,” says Darr.

This is the second consecutive year the University has conduct this exercise.  During the week of September 13 -17, 2010, the University shutdown access over its network to several social media sites.  In an attempt to understand basic usage patterns and opinions following the 2010 ‘blackout’ exercise, students, faculty and staff were surveyed about their social media habits and reactions to the blackout.  An initial survey was completed on the first day of the blackout, and a follow-up survey was completed during the week following the blackout.  Additionally, multiple focus group sessions were conducted with students and faculty in the middle of the blackout week.

One-quarter of the 822 students and 40% of the faculty and staff at Harrisburg University responded to the 2010 surveys.  The surveys revealed that the majority of students, faculty and staff are regular users of social media.  In fact, many are heavy users of various social media outlets. Specifically, two-thirds of the sample reported using Facebook on a daily basis, while 10% said they use Twitter on a daily basis.  Among Facebook users, 25% cited mainly “social” purposes, including contact with friends, as the primary reason for using the site.  Students and staff also use social media for “entertainment.”  In fact, 13% of student responders said they rely on Facebook to combat boredom between classes. Exactly half of student responses cited the use of YouTube regularly for “academic and social purposes.”  Instant messaging is also used by a large segment of the student body, with 35% usage among this sample.
Darr notes that one question that is routinely debated is whether people can become addicted to social networking.  The results from the 2010 survey suggest that this is possible.  Specifically, it is remarkable to note that 20% of the student respondents spend between 11 and 20 hours a day using social media sites.

“One has to believe that this level of usage would likely interfere with school work and jobs.  Further, it is somewhat disturbing to note that several faculty and staff reported spending more than 20 hours a day on social networking sites.  Clearly, this level of usage would interfere with many of life’s routine responsibilities,” says Darr.

Initial reactions to the 2010 blackout were similar for students and faculty.  Both groups were skeptical and upset at the onset of the social media blackout.  And, both groups became more positive about the event after reflecting on the week.

Information about student behaviors during the blackout was also collected.  The results suggest that a healthier, more productive life style was practiced by a significant portion of the students during the week-long social media blackout.  Specifically, 25 % of students reported better concentration in the classroom during the blackout week.  In fact, 23% of students found lectures more interesting.  Interestingly, 6% of students reported eating better and exercising more during the blackout week.  School work was given a higher-priority when social media was unavailable.  Specifically, 21% of the students used the time that they usually spent on Facebook to do homework, whereas 10% used the time usually spent on Facebook to read online news.

An obvious question is “Did anyone learn anything from the blackout?”  Survey results show that 44% of the students reported that they learned something, while 76% of faculty and staff reported learning something from the blackout.  Focus group sessions and student commentary uncovered several specific lessons learned during the blackout week.  Several students reported gaining a better understanding of the strengths and weaknesses of Facebook.  They used Facebook for its obvious ability to connect with friends, but they also used Facebook for collaborating on a business plan.  During the blackout, these students were forced to use another tool for working on their business plan, and discovered that it was easier than Facebook.  Additionally, they reported that it had become increasingly difficult to distinguish business related posts from social posts on Facebook.  These students learned that document management is not one of the core strengths of Facebook.

A second lesson learned was a better understanding of the value of face-to-face communications versus conversations carried out solely over social media.  Several faculty were reminded about the power of face-to-face dialogue when they discovered that complex biology concepts that had confused students for weeks when discussed over social media, were readily learned when explained in a series of face-to-face meetings.  In fact, 10% of the students reported enjoying face-to-face conversations during the time they would normally spend on Facebook.

Further, an additional lesson learned was that social media use can cause stress. Nearly 33% of students reported feeling less stressed during blackout week.

“Social media have become ubiquitous on university campuses.  These technologies have many strengths and weaknesses.  And like any tool, social media should be used with care and understanding,” says Darr.  “Harrisburg University’s 2010 social media exercise demonstrated some of the challenges and issues associated with these technologies.  Students, faculty and staff learned much about themselves during the 2010 exercise and there is still much to learn as we continue to push, prod, question and otherwise explore social media.”

The University plans to discuss the social media exercise at its 2012 Social Media Summit, set for May 23 at Harrisburg University.

Founded in 2001 to address Central Pennsylvania’s need for increased opportunities for study leading to careers in science, technology, engineering and math (STEM) fields, Harrisburg University is an innovative and ambitious private institution that produces graduates who provide increased competence and capacity in science and technology disciplines to Pennsylvania and the nation. Harrisburg University ensures institutional access for underrepresented students and links learning and research to practical outcomes. As a private University serving the public good, Harrisburg University remains the only STEM-focused comprehensive university located between Philadelphia and Pittsburgh.

For questions about the exercise, contact Communications at 717.901.5146 or CONNECT@Harrisburgu.edu

Detoxing from Facebook

Eric Frazier of the Charlotte Observer told the story of Alyssa Rushing this week – a 20 year old student at the University of South Carolina whose mother has offered her $300 to “detox from Facebook” for a month. Alyssa’s mother, Melynda, wanted her daughter to focus on studying instead of social media – and viewed the challenge as a way to help Alyssa recoup the time she was wasting online:

Her mom, with just 40 Facebook friends, said she got on the network solely because she wanted to keep up with her children on it. Her idea for the $300 challenge came from her own past. As a busy mom trying to raise children, she once swore off TV and gained extra time to get things done.

She’s sure the same will be true for her daughter, especially given how distracting Facebook can be.

Next Tuesday, we’ll know if Alyssa was able to meet the challenge, because her month will be up. The question that I’m most interested in, though, is whether the one month pay-for-performance will lead to any long-term shifts in behavior. For a change to be permanent, the motivation must come from within. Although external motivators (like $300) might provide the impetus to get off Facebook now, what happens when the cash is no longer flowing? In 2009, the Wall Street Journal reported a higher success rate among smokers who were paid to quit, versus those who were not. However, there are no long-term indicators available. And besides, research shows that carrots and sticks don’t always work, anyway.

When I did my 42-day social media detox in the summer of 2010, all I was looking for was relief from the incessant online chatter – the anxiety and exhaustion that came from being frenetically, perpetually, and continuously distracted by status updates. As I peeled back the layers covering my anxiety, I realized there was a whole Pandora’s box of twisted emotions and my online habits were actually distracting me from dealing with the real issues all around me.

I check Facebook and other social media much less now – but my motivation is purely intrinsic: if I don’t keep a healthy distance, the anxiety will start to enshroud me again, and who knows where I’ll end up then. For me, it’s a matter of preserving mental and emotional happiness.

It’s kind of like dealing with an eating disorder. You can’t exactly swear off food since you need to eat to live – you just need to set very good boundaries detailing how you interact with food, and avoid putting yourself in situations that will threaten your health and well-being.

The game is all about devising effective structures to help you deal with your obsessions. And I think this is a huge issue for ensuring your own quality of life – at least in the very personal world inside your head.

Zen and the Art of Social Media Blackout

In May, when I decided to disconnect from checking social media and email over 500 times a day to write Disconnected: Technology Addiction & the Search for Authenticity in Virtual Life, I had no idea how contemporary the idea of disconnecting from social media would become.

Give me your Droids, your iPhones, your Twitter feeds and Facebook status updates, your text messages, your Google Chats! Let’s see what happens to life as we know it if we take a time capsule way back into the mid-1990’s, stop clicking on our mobile devices, and start engaging more with the real world and real people around us. It sounds like such a trite experiment, and yet it’s one of those compelling exercises that can really help us understand the concept of mindfulness – the ability to live in the moment, slow down, and appreciate all that is for what it is. At least that’s what it did for me (as soon as I could compel myself to actually follow through to see what would happen – technology detox is NOT easy and I am a self-admitted addictive multitasker).

Like the experiment being run at the Harrisburg, Pennsylvania university that’s garnered so much press this month, my personal exercise was more of a brownout than a blackout. Face it – life totally without technology can be impractical and unproductive in many ways, especially when you have a job that relies on it. But how much is too much? That’s the trick I wrote about in my book… avoiding technology asceticism (blackout) while setting pertinent Rules of Engagement that limit social media technology use (brownout) to promote mindfulness. It results in you using technology rather than it using you.

So what’s going on in Harrisburg? According to Paige Chapman at the Chronicle on September 9, 2010:

Professors have experimented with assigning technology fasts for their students—by discouraging gadget use for five days, for example, or rewarding extra credit for a semester without Facebook.

Harrisburg University of Science and Technology is going one step further with a “social-media blackout.” Starting Monday, the Pennsylvania institution will block Facebook, Twitter, AOL Instant Messenger, and MySpace on the campus network for a week. Faculty and staff members will be affected as well as students.

“Telling students to imagine a time before Facebook is like telling them to imagine living in a world with dinosaurs,” said Eric D. Darr, Harrisburg’s executive vice president and provost. “It’s not real. What we’re doing is trying to make it real.”

Here are some more of the links I’ve found over the past few days on the social media blackout concept. I’m listing them here for personal reference, and plan to grow it as I find more interesting links on the topic, but you might find the list useful too.

By the way. many people have asked whether my 42-day experiment resulted in a long term behavior shift… and the answer is YES, it did. Now, I only check my Droid, Facebook, Twitter, email and the rest about 50 to 75 times a day. This might still be considered a problem, but I’m pretty happy that I reduced my habit by a factor of 10. So are most of the people who have to interact with me on a daily basis.

Clickability improves Discoverability

Michael Davis (@yellowfish_md) and I were talking last night about effective email and other electronic communication.  We were discussing the utility (importance?) of making twitter updates/tweets clickable.  (I really don’t like saying “tweet,” but I’m getting used to it.)  You can make tweets clickable by adding URLs, using hashtags when appropriate, and using @twitter names whenever you can.

So Lance (@dmmandil) says, on twitter,

It’s meteor time. Grab your blankets, and get your view on Tuesday night into Wednesday morning for best view. #Perseids

I click on “#Perseids” which gives me a search across twitter.  A guy in Sweden (@maltesk) posted:

(So many folk twittering about the #Perseids coming next week – they’re here now people. Deal! http://www.imo.net/live/perseids2009/)

… and I check out http://www.imo.net/live/perseids2009/ — which is an amazing breakdown of meteor sitings.  (BTW, this site is a great example of reporting data points and geo summaries — refer to it for good vibes in your project.) The page/site says to send feedback to Geert Barentsen.  “That’s a familiar name,” I thought.  “I know that guy.” Sure enough, I do.  I spent a week with him in Santa Fe; we spent a lot of time hanging out and headed out about the city.

So in this social+technical network, a guy I don’t know (@maltesk) in Sweden was connected to Lance (@dmmandil) because they both used the same hashtag (and used it very well).  That guy in Sweden (@maltesk) is connected to Geert at least in that he uses Geert’s tool.  I’m connected with Geert through past experience. I discovered all of this in 15 seconds thanks to clickability.

PS – Be sure to check your links after posting if you want people to find who/what/where you are discussing.