Create Dataset of Users from the Twitter API by Ryan Swanson.
From the post:
This project provides an example of using python to pull user data from Twitter.
This project will create a dataset of the top 1000 twitter users for any given search topic.
As written, the project returns these values:
- handle – twitter username | string
- name – full name of the twitter user | string
- age – number of days the user has existed on twitter | number
- numOfTweets – number of tweets this user has created (includes retweets) | number
- hasProfile – 1 if the user has created a profile description, 0 otherwise | boolean
- hasPic – 1 if the user has setup a profile pic, 0 otherwise | boolean
- numFollowing – number of other twitter users, this user is following | number
- numOfFavorites – number of tweets the user has favorited | number
- numOfLists – number of public lists this user has been added to | number
- numOfFollowers – number of other users following this user | number
You need to read the Twitter documentation if you want to extend this project to capture other values. Such as a list of followers or who someone is following, important for sketching communities for example. Or tracing tweets/retweets across a community.
Enjoy!