Python code to pull user data from twitter.
Both data files were generated on October 8, 2013.
- twitter_user_datascience_data.csv This data set was generated by pulling user accounts from twitter associated with the query 'datascience'. Notice that only about 150 users are active, the remaining users are quite sparse.
- twitter_user_data.csv This data set was generated by pulling user accounts from twitter associated with the query 'nfl'. This data is full and complete.
- twitter_user_data_data.csv This data set was generated by pulling user accounts from twitter associated with the query 'data'. This data is full and complete. (note: this file was generated October 10, 2013)
Each row is associated with a different twitter user/account. Below are the columns.
- handle - twitter username
- name - full name of the twitter user
- age - number of days the user has existed on twitter
- num_of_tweets - number of tweets this user has created (includes retweets)
- has_profile - 1 if the user has created a profile description, 0 otherwise
- has_pic - 1 if the user has setup a profile pic, 0 otherwise
- num_following - number of other twitter users, this user is following
- num_of_favorites - number of tweets the user has favorited
- num_of_lists - number of public lists this user has been added to
- num_of_followers - number of other users following this user
- git clone https://github.com/swGooF/Twitter-User-Analysis.git
- cd Twitter-User-Analysis
- First open getdata.py and enter your Twitter access_token_key, access_token_secret, consumer_key, consumer_secret
- from a command line 'python getdata.py datascience 3'
- a query string: 'datascience' in the example above
- Number of pages to return, each page will return 20 users, the current Twitter API is 180 calls per 15 minutes and each page requires a new call