kevallakhani95 / Tweet-Map

:triangular_flag_on_post: A cloud based web application for users to search among live tweets using a keyword and plot these tweets on Google Maps. This is a scalable version of the application that collects and streams live tweets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tweet-Map

This is a scalable version of the Tweet-Map web application deployed on cloud. This application uses Twitter Streaming API to get tweets with geolocation to plot the tweets on a map along with the sentiment of the tweet. This version of the application refreshes itself from time to time to collect and stream live tweets on the map. This application is developed using Python Django framework and deployed on AWS Elastic Beanstalk.

The application uses - (application workflow is in the presented order below)

  • Twitter Streaming API - To collect live tweets from twitter.
  • Amazon SQS - A queueing service that asynchronously processes the tweet and stores the streamed tweets making them available for consumption.
  • Worker pool - A worker pool is defined that picks up message from the queue to process, each on a different pool thread.
  • MonkeyLearn Sentiment Analysis API - For calculating the sentiment of the tweet text.
  • Amazon SNS - A notification service that sends a notofication to an HTTP endpoint containing the information about the tweet.
  • AWS Elastic Search - For efficient searching of tweets based on keywords stored in JSON format.
  • Google Maps API - For plotting live tweets on a map.

Finally, deployed the application on AWS Elastic Beanstalk and configured EC2 for deploying different components of the application.

Application architecture - alt tag

Web application screenshot -

web_app screenshot

The colors of the markers have been set to the sentiment the tweets belong to:
Green - Positive tweet
Blue - Neutral tweet
Red - Negative tweet

The sentiments are assigned to the tweets by the Monkey Learn Sentiment Analysis API. This is a machine learning API that you need to train with datasets in order to get an accurate result for the sentiment of a tweet.

To run the application -

  1. Download the project.
  2. Change Twitter, AWS, Google Maps and MonkeyLearn API Keys.
  3. Run manage.py file -
$ python manage.py runserver
  1. To stream new tweets run TwitterStreamer.py and SentimentAnalyzer.py locally.
  2. Access the application in browser --> http://localhost:8000

About

:triangular_flag_on_post: A cloud based web application for users to search among live tweets using a keyword and plot these tweets on Google Maps. This is a scalable version of the application that collects and streams live tweets.


Languages

Language:JavaScript 75.9%Language:CSS 17.0%Language:Python 4.5%Language:HTML 2.6%