Skip to content

Spark/Cassandra/Akka combo to visualize a cloud of words using d3.js

Notifications You must be signed in to change notification settings

davideanastasia/twitter-realtime-sentiment

Repository files navigation

twitter-realtime-sentiment

twitter-sentiment-stream is a POC of sentiment analysis for the Twitter stream. The project uses:

  • Apache Spark: Spark Streaming is used to receive the Twitter stream, aggregate and convert to sentiments
  • Apache Cassandra: used as aggregator of the sentiments in multiple views (aggregated views)
  • Akka: used to expose a WebSocket with the latest view of the data
  • d3.js / jQuery: visualize the latest version of the sentiment analysis

Run the project

sbt assembly

to build the jar with the project.

You will also need Twitter credentials (plenty of links on the internet on how to obtain them) to insert in the twitter.properties file, a running Cassandra node listening on localhost, Spark and two bash windows open (I have used brew on my Mac to install them, as well as Scala and SBT):

In the first:

./run_stream.sh

will start the Spark Streaming job.

In the second:

./run_ws.sh

will start the HTTP WebSocket server.

Done that, you are ready to open the static/index.html file in your browser and see the cloud being refreshed!

In the browser you should see something like this:

alt tag

References

About

Spark/Cassandra/Akka combo to visualize a cloud of words using d3.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published