EMOTION ANALYSIS

This is a program that use Spark and Twitter Stream to analysis the emotion skill at different location. We pick Bay Area, Los Angles, and San Diago in this example.

##Please follow the following steps to run the application##

Kafka server setup

  • Step 1: Download the code Download the 0.8.2.0 release and un-tar it.
> tar -xzf kafka_2.10-0.8.2.0.tgz
> cd kafka_2.10-0.8.2.0
  • Step 2: Start the ZooKeeper and Kafka server
> bin/zookeeper-server-start.sh config/zookeeper.properties
> bin/kafka-server-start.sh config/server.properties
  • Step 3: Create a topic
> bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic twitter-stream

NodeJS Setup

This application will send an POST request to an NodeJS server with URL http://localhost:3000/post Download or clone [EmotionAnalysisNodeJs][1] server and run

npm install 
node src/index.js

Run Application

  1. Download [Intellij][2] and open run it
  2. Clone the project to local and import into Intellij
  3. Let SBT download the dependencies
  4. Run TwitterProducer object, should see application running and twitter feeds coming in.
  5. Run EmotionAnalysis object, should see application start running.
  6. Open browser and go to localhost:3000
  7. Should see information coming up

Other

There are also other files in the folder that is not in the project but is also runnable.

[1] https://github.com/CocoHot/EmotionAnalysisNodeJS [2] https://www.jetbrains.com/idea/download/