Final project for Data Mining course of MSc in Engineering in Computer Science at Università degli Studi di Roma "La Sapienza" (A.Y. 2016/2017).
Sentweements is a beautifully intuitive sentiment analysis tool for tweets.
Using Twitter Streaming API to fetch tweets in real-time and Indico's artificial intelligence APIs to perform textual sentiment analysis, data is visualized on a beautiful, interactive choropleth map showing Italy's sentimental situation.
With Sentweements you have:
- national and region-specific statistics, available through mouse hover.
- data persistence implemented with SQLite DB.
- dynamic updates automatically reflected on the map as new data becomes available (Twitter streaming data).
- static analysis mode available by defining a time window of tweets to analyze, to get different perspectives.
- api keys carousel and multi-threaded data retrieval architecture to expand rate limit both for Twitter and sentiments APIs (check secret_keys_template for instructions).
See also our images streaming emotion analysis.
- Indico - an artificial intelligence service that detects sentiments in texts, available for several different languages.
- Twitter Streaming API - real-time access to tweets coming from all over Italy.
- Flask - Python microframework to build the webserver and serve client requests.
- Leaflet - Javascript framework to build the choropleth map visualization.
Be sure to have Python 3 installed.
Note that some additional Python modules are required; you can run $ python dependencies.py
to install them all in one shot.
To start tweets retrieval, open a terminal and type $ python tweets_streaming.py
.
Note that you need a working Internet connection to download the tweets from Twitter.
To run the webapp (locally), open a terminal and type $ python webapp.py
.
Then, open a browser and go to localhost:5000.
Fabio Rosato | [email protected] |
Giacomo Lanciano | [email protected] |