Skip to content

Instantly share code, notes, and snippets.

View gdsaxton's full-sized avatar

Gregory Saxton gdsaxton

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gdsaxton
gdsaxton / find_duplicates2.ipynb
Created March 15, 2018 18:08
Find Duplicates in List, Take 2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gdsaxton
gdsaxton / find_duplicates.ipynb
Last active March 15, 2018 18:05
Find Duplicates in List
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gdsaxton
gdsaxton / Social_Metrics_Tutorial_Script_User_Timeline_All_Pages_MongoDB.py
Last active April 7, 2022 17:04
Downloading Tweets by a List of Users -- MongoDB Version
#!/usr/bin/env python
"""
Social_Metrics_Tutorial_Script_User_Timeline_All_Pages_MongoDB.py - DOWNLOADS ALL AVAILABLE RECENT
TWEETS FROM 5 MLB ACCOUNTS INTO MONGODB DATABASE
BEFORE RUNNING THIS SCRIPT, YOU WILL NEED TO:
1. HAVE ANACONDA PYTHON 2.7 INSTALLED
2. HAVE CREATED CSV FILE (E.G., IN EXCEL) CONTAINING TWITTER HANDLES YOU
WISH TO DOWNLOAD (SEE TUTORIAL FOR DETAILS)
@gdsaxton
gdsaxton / accounts.csv
Created September 25, 2017 17:24
Twitter Account IDs - Sample File
Unique_ID org_name org_url Twitter_URL Twitter_handle earliest_tweet_in_db number_of_tweets_in_db
1 LA Angels http://losangeles.angels.mlb.com/ https://twitter.com/Angels Angels
2 Oakland Athletics http://oakland.athletics.mlb.com/ https://twitter.com/Athletics Athletics
3 Texas Rangers http://texas.rangers.mlb.com/ https://twitter.com/Rangers Rangers
4 Seattle Mariners http://seattle.mariners.mlb.com/ https://twitter.com/Mariners Mariners
5 Chicago White Sox http://chicago.whitesox.mlb.com/ https://twitter.com/whitesox whitesox
@gdsaxton
gdsaxton / Social_Metrics_Tutorial_Script_User_Timeline_All_Pages.py
Created September 25, 2017 17:21
Downloading Tweets by a List of Users -- SQLite Version
#!/usr/bin/env python
"""
Social_Metrics_Tutorial_Script_User_Timeline_All_Pages.py - DOWNLOADS ALL AVAILABLE RECENT
TWEETS FROM 5 MLB ACCOUNTS INTO SQLITE DATABASE
BEFORE RUNNING THIS SCRIPT, YOU WILL NEED TO:
1. HAVE ANACONDA PYTHON 2.7 INSTALLED
2. HAVE CREATED CSV FILE (E.G., IN EXCEL) CONTAINING TWITTER HANDLES YOU
@gdsaxton
gdsaxton / Producing Summary Statistics for Publication.ipynb
Last active March 6, 2018 17:25
iPython notebook showing how to run and output a descriptive statistics (summary statistics) table for social scientific publication
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.