hamemuh / UKelections2017

Sentiment analysis to forecast the outcome of the UK 2017 snap election.
0 stars 1 forks source link

Adjust Python code to add columns for track terms and their binned category #17

Closed mn1510 closed 7 years ago

jcalcutt commented 7 years ago

This is the best solution I've found so far, a list comprehension: http://stackoverflow.com/questions/28658729/how-to-check-the-text-of-a-tweet-for-a-specific-keyword-from-an-array-in-python

Otherwise we could create multiple instances of the twitter scraper and put each binned key-term into it's own database. Then join all the databases together into one at the end, creating a binned column name for each database to keep track of which tweet belongs to which bin.

I'll work on using the list comprehension method and see if it's feasible this afternoon.