项目作者: kocharshaivi19

项目描述 :
Web application to plot the trending tweets and their Sentiments.
高级语言: JavaScript
项目地址: git://github.com/kocharshaivi19/Tweet-sentiment-Trendz.git
创建时间: 2017-04-22T14:42:19Z
项目社区:https://github.com/kocharshaivi19/Tweet-sentiment-Trendz

开源协议:GNU General Public License v3.0

下载


Tweet-sentiment-Trendz

This web application is a scalable version of Tweettrendz.
This application uses Twitter Streaming API to fetch tweets from the twitter hose in real-time with
Geolocation & English Language Filtering and plot the tweets on a map along with the sentiment of the tweet.

Application utilises:

  • Google Map API: Plotting the tweets on a map with customised Markers
  • Elastic Search: Efficient searching of tweets based on keywords stored in JSON format on AWS ElasticSearch Service
  • Textblob Sentiment Analysis API: This generates the positive, negative or neutral sentiment evaluation for the text of the submitted Tweet.
  • Apache Kafka: A queueing service to store the streamed tweets making them available for consumption and notification service that notifies the subscriber of new available tweets.

Run the application:

  • Download the project
  • Add/Change Twitter, AWS, and MonkeyLearn API Keys in config.ini file.
  • Run manage.py file
    1. python manage.py runserver
  • Run sentiment.py and kafkatweets.py on AWS instance, if you have created one. Else, you can look onto the instructions below

Installation instruction of Apache Kafka on AWS:

  • Install Kafka by downloading
    1. sudo apt-get install default-jre
    2. sudo apt-get install zookeeperd
    3. wget "http://mirror.cc.columbia.edu/pub/software/apache/kafka/0.10.2.0/kafka_2.11-0.10.2.0.tgz"
    4. tar -xzf kafka_2.11-0.10.2.0.tgz
  • Run the Zookeeper
    1. cd kafka_2.11-0.10.2.0
    2. bin/zookeeper-server-start.sh config/zookeeper.properties
  • In config/server.properties, add the following lines
    listeners=PLAINTEXT://:9092
    advertise.listeners=PLAINTEXT://:9092
    To save the read-only file,
    1. :w !sudo tee %
    2. O
    3. :q!
  • Run the Kafka server on another Instaance’s terminal
    1. KAFKA_HEAP_OPTS="-Xms512M -Xmx512M" bin/kafka-server-start.sh config/server.properties
  • Finally, Run the below commands on different Instance’s terminal
    1. python sentiment.py
    2. python kafkatweets.py