Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pablobarbera/timeline
Plot: number of mentions of Obama and Romney on Twitter
https://github.com/pablobarbera/timeline
Last synced: about 1 month ago
JSON representation
Plot: number of mentions of Obama and Romney on Twitter
- Host: GitHub
- URL: https://github.com/pablobarbera/timeline
- Owner: pablobarbera
- Created: 2012-11-01T19:36:19.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-11-01T19:36:50.000Z (about 12 years ago)
- Last Synced: 2023-03-27T13:47:37.709Z (almost 2 years ago)
- Language: R
- Size: 109 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Twitter Election Timeline
=============Source code to build the website at [www.pablobarbera.com/timeline](http://www.pablobarbera.com/timeline).
Summary of .R files
-------* `functions.R` includes all the functions that are necessary to run the other two R files.
* `get_tweets.R` captures all tweets mentioning the strings `obama' or `romney' in intervals of 1 hour, transforms them from JSON into a dataframe, and stores them in a mySQL database on localhost.
* `summary_data.R` queries the SQL server for a summary of the number of tweets every minute, cleans and organizes these data, and exports it to a .csv file that will be uploaded to the server.Notes
-------* All times are EST.
* The estimated average tweets per minute (TPM) are lower than the real TPM during moments of high activity, such as the debates or the conventions. This is due to the limitations of the Streaming API. (Only around 1% of all tweets can be captured at any given time, and therefore when tweets mentioning Obama or Romney constitute more than this proportion, not all of them can be extracted with the public streaming API.)
* The smoothing parameter computes rolling averages over periods of 10 minutes.