Giter Club home page Giter Club logo

miningballs's Introduction

Plan so far

  • Find an upcoming match
  • Start the Twitter streaming API one hour before
  • End the stream one hour after
  • Plot sentiment over time using R
  • Look at past data as well
  • Build a sentimental analysis machine
    • Start with a basic one
    • Then add one capable of learning
  • Interact with the data in an R Shiny app

Potential issues

  • If two matches are playing at the same time, what to do? Join all the search terms into one Stream request and somehow extricate the tweets later? Or just pick one match to follow (say, using an RNG) and ignore the other(s) on this occasion?
  • The official hashtags alone are not much use. For example, #EFC was a much more popular hashtag than #WBAFC, suggesting we should also use the API shortname (maybe still as hashtags?)

To do

  • Manually create a dictionary of possible search terms for each team playing: (e.g. Tottenham Hotspur FC might call for "Tottenham", "Spurs", "Tottenham Hotspur" and so on.) However this can be accepted as a limitation of the app for now; Twitter's search engine may be clever enough to work out which Tweets to return anyway... Got a list of 'official' hashtags for each team in the 14-15 Premier League (see References).
  • Improve the streamer so it writes useful information to a file, including tweet text, hashtags (maybe) and time of tweet. If possible exclude retweets
  • Find a way to schedule the streamer to start before kick off and the end after the final whistle. This may involve Windows Task Scheduler, or else a small helper script that periodically checks conditions and then triggers the main streamer (etc) when a match is taking place.
  • Write an initial Python script to perform sentiment analysis using a corpus of positive and negative words. Be sure to remove stop words, hyperlinks etc.
    • Later improve with some form of machine learning to assign sentiment scores to terms not found in corpus
  • Strip down the data to team (or hashtag), sentiment score and timestamp. Create density plot.
    • Maybe build into a Shiny app that allows adjustment of bandwidth of the density plot / width of bars in histograms. Host on http://shinyapps.io

References

miningballs's People

Contributors

selbosh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.