Sentiment analysis of tweets on "lemonade"
Sentiment analysis of tweets on "Fauci"
- Open a new Terminal, get into the KAFKA Home directory
- Run
$ bin/zookeeper-server-start.sh config/zookeeper.properties
- Open a new Terminal, get into the KAFKA Home directory
- Run
$ bin/kafka-server-start.sh config/server.properties
(Kafka runs in localhost:9092)
- Open a new Terminal, get into the ELASTICSEARCH Home directory
- Run
$ bin/elasticsearch
- Open a new Terminal, get into LOGSTASH Home directory
- Create a file logstash-simple.conf with following content:
input {
kafka {
bootstrap_servers => "localhost:9092"
topics => ["lemonade"]
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "lemonade-index"
}
}
- Run
$ bin/logstash -f logstash-simple.conf
- Build
$ sbt
> assembly
- Run using arguments
$ spark-submit --class TopicSentiment <PathToJarFile>
<kafka server and port>
<topic>
<consumer key>
<consumer secret>
<access token>
<access token secret>
lemonade
- Open a new Terminal, get into the KIBANA Home directory
- Run
$ bin/kibana
- Goto http://localhost:5601 in web browser
- Search for the appropriate topic index: lemonade-index
- Create personal dashboard
The R script has to be run within R Studio
Steps to run: -
- Open R studion
- Create a new project
- Import the main.R file
- Run the script line by line
- Get the outputs in the Console or in Plots