Updated SNA in R Code

NOTE: Jeff Gentry, the developer of the twitteR package has uploaded version 0.1.3 of the package to CRAN. This update was in response to some of the errors that were plaguing my live-demo; therefore, if you plan to use this script I highly recommend upgrading to this version before proceeding.

In support of the talk I will be giving tonight at LinkedIn for the Bay Area R Meetup, I have uploaded the updated version of the SNA in R code to the ZIA code repository.

The primary changes to the code are the additional functions and routines needed to create networks from Twitter data; specifically, networks of people who tweet a specific hash-tag. I will be using this code to (hopefully) do some live SNA of people in the audience.

Please let me know if you have any questions or suggested improvements to the code, and if you are coming tonight I look forward to meeting you.

See above note UPDATE I (11/11/200): There may be a bug in the twitteR package that causes the script to crash on certain search strings. So far, I think it may be isolated to hash-tags starting with the letter D. If using this script, be sure to test your hash-tag before going live (something I should have done sometime before 7pm last night).

UPDATE II (11/12/2009): I tweaked the code slightly so that the output plots are named according to the hash-tag you provide, rather than fixed with “rstats”.


Automatically Generated Related posts:

  1. Mining and Analyzing Online Social Graph Data [Updated with Video]
  2. SNA in R Talk, Updated with [Better] Video
  3. UPDATED: Must-Have Python Packages for Social Scientists
  4. My Talk at West Point – SIRG Model of Social Networks
  5. Network of People who Twitter about R

2 comments to Updated SNA in R Code

  • JP

    Hi Drew!
    I just found this site after having started my personal experiments with SNA and Twitter. It’s great. You posted resources, comments and suggestions which will help me progress I hope in SNA using R.
    I am using my personal Twitter friends map to start and decided not to rely on any library to download my map. I tried tweepy and another one before that but ended up working out my simple scripts which are more efficient at breaking the 150req/h barrier. I generate a csv file which I then read in R.
    Now I am trying to identify an approach in positional analysis to see if there’s a way to identify the sub-communities I know I have. I am using the Carter Butts sna package for now.
    Thanks again!

    [Reply]

  • Gregory Saxton

    Hi Drew,

    I keep coming back to your site–some excellent stuff here!

    I’m doing a study on nonprofit organizations in Twitter and have decided to finally learn SNA at the same time as I’m slowly progressing in my Python capabilities. I’m wondering if you have any hints for a networks newbie–so far, what I’m doing is using some simple python code that compares each of my 74 organizations’ friends list against the other 74 organizations ids and creating a text file as output — this is my adjacency matrix. So, am I doing something wildly inefficient here? Any tips would be greatly appreciated. Hopefully I’ll be up and running with some analyses using Networkx later on in the semester.

    Also, JP, if you’re reading, would you mind sharing your Python code? You can find me at http://www.gregorysaxton.net

    Cheers,

    Greg

    [Reply]

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Technorati Profile