/Phemos

Algorithm to weigh media exposure to account for the feedback cycle of news ratings and electoral polling.

Primary LanguagePython

Accounting for the Impact of Media Coverage on Polling

This is the Python implementation of the algorithm described in the paper included.

Code

The code itself is found in the algorithm.py file.

Because I couldn't find a news API that collects data from the sources I'd analysed and had both headlines and content enough of the time, so I chose to run the algorithm on a sample set I wrote. And in recognition of my laziness, I forwent actually writing content, and just skipped to the keywords themselves. The code for extracting keywords does work, however, if you want to try it out.