Below are the materials from a presentation Austin gave to the Introduction to Digital Humanities course at Columbia College Chicago on July 11, 2018. Many thanks to Sean Andrews for the opportunity.
The full video presentation.

Install

  1. Clone/Download https://github.com/muteland/twitter_instagram_hashtag_grabbing
  2. Make sure you have python3 running on your computer
  3. Install PipEnv, follow the installation instructions: https://github.com/pypa/pipenv
  4. Using the terminal, navigate to the downloaded folder and run "pipenv install". This will install all the dependencies
  5. That's it for global setup, you will need special credentials for twitter and instagram, follow the instructions in the

Twitter Hashtag Grabbing

twitter_hashtag_grabbing.py

Simple script to grab files from

Create Twitter App using Twitter's Developer Portal

  1. Login to https://developer.twitter.com/
  2. Go to https://developer.twitter.com/en/apps
  3. Click "Create New App" and fill in your app details
  4. Once you click "Create" you should be able to navigate to "Keys & Tokens", fill in the consumer_key, consumer_secret, access_token and access_token_secret with these values

Run

Run with pipenv by running:

pipenv run python twitter_hashtag_grabbing.py whatEverHashTagYouWant

Instagram Hashtag Grabbing

instagram_hashtag_grabbing.py

Setup

Make sure to add "yourUsername" and "yourPassword" to the file and that's it.

Run

Run with pipenv by running:

pipenv run python instagram_hashtag_grabbing.py whatEverHashTagYouWant

References

Display Posts with Downloaded Media

display_posts_with_downloaded_media.html

Simple demo of how you might display this data.

Run

You may need to create a simple local server to serve this page... on my mac either of this command work great, just navigate to the root of the downloaded repo and run: python -m http.server

Combine CSV

combine_csv.py

This script combines two csv's into a single csv for analysis.

Run

pipenv run python combine_csv.py relativePath/to/your/first.csv relativePath/to/your/second.csv

Combine CSV and Classify

combine_csv_and_classify.py

Last min demo for presentation.... same as the above, but add imagenet classification to the media. THis is basically just https://github.com/tensorflow/models/blob/master/tutorials/image/imagenet/classify_image.py with the combine_csv.py shoved in.

Run

pipenv run python combine_csv.py relativePath/to/your/first.csv relativePath/to/your/second.csv

Going further...

If you have an questions or issues, pleas feel free to contact me. I will be working on a variety of other projects that build out of this one, so feel free to star this repo or follow me (here, https://twitter.com/ak5a, https://www.instagram.com/ak5a/) and I'll be posting updates in the near future.