A prototype tool to give users a "glimpse" of attention on a platform based on a query with keywords and start/end dates. Created to use in teaching as a temporary and exploratory solution. Right now this supports querying for the amount of attention on a number of platforms:
- Online news (via Media Cloud)
- Twitter (via their academic API track)
- YouTube (via their API)
- Reddit submissions (via Pushshift.io)
This was a weekend project created to support teaching in a Digital Storytelling and Social Media class. Going forward, it would make more sense to:
- implement a uniform "simple query" mode, so first-time users don't need to learn the query syntax specific to each platform
- try to determine a denominator so we can show percentage of attention over time for each platform in one chart
- support filtering content by platform (ie. channels on Reddit, collections of media sources for online news, etc)
- add support for more platforms via their APIs
This requires installing redis (for caching results). Then:
pip3 install -r requirements.txt
You can run this locally for development by creating and filling in a .env
file based on the .env.template
.
docker image build -t glimpse .
docker container run --rm -it -p 8000:8000 -e MC_API_KEY=keykeykey -e CACHE_REDIS_URL=urlurlurl -e TWITTER_API_BEARER_TOKEN=tokentoken -e YOUTUBE_API_KEY=keykey glimpse
dokku apps:create glimpse
dokku redis:create glimpse-cache
dokku redis:link glimpse-cache glimpse
dokku config:set glimpse MEDIA_CLOUD_API_KEY=keykeykey CACHE_REDIS_URL=urlurlurl TWITTER_API_BEARER_TOKEN=tokentoken YOUTUBE_API_KEY=keykey
dokku config:set --no-restart glimpse DOKKU_LETSENCRYPT_EMAIL=emailaddress
dokku ps:scale glimpse web=6
Created by Rahul Bhargava, Assistant Professor of Journalism and Art + Design at Northeastern University.