HPC PROJECT
Presentation's slide: https://docs.google.com/presentation/d/1uu_o3Xn6Km2GtLikEi9pnLsZFHoev6PRy2TCq77tjNc/edit?usp=sharing
The Twitter Sentiment Analysis Project is a tool that download twitter streaming data related to President Trump's Executive Order towards certain issues. The tweets that are downloaded are the tweets containing hashtags: #ExecutiveOrder, #Trump, #WinningForAmerica, #MuslimBan, #Muslim, #TerrorBan, #TravelBan, #NoBanNoWallNoRaids, #immigration, #refugee, #MakeAmericaGreatAgain, #travel, and #Latino.
This is a final project for the course CS824 - High Parallel Computing and Big Data that I took at Old Dominion University (ODU) in Spring 2017.
This project comprises 4 main components:
There are 2 (two) ways that are provided to use this tool:
Using Docker is really recommended because user does not have to worry about software dependencies and can avoid the hassle of downloading and installing the required softwares. The user should download and install Docker from https://docs.docker.com/engine/installation/ or from https://docs.docker.com/docker-for-windows/install/ (for Windows OS), then simply follows the steps below:
docker pull erikaris/hpc_project:latest
Notes: User must first go to https://apps.twitter.com to create Twitter App Key.
docker run -i -t -d --memory=2g -p 5555:80 -e PORT=80 -e CONSUMER_KEY=<USER_CONSUMER_KEY> -e CONSUMER_SECRET=<USER_CONSUMER_SECRET> -e ACCESS_TOKEN_KEY=<USER_TOKEN_KEY> -e ACCESS_TOKEN_SECRET=<USER_TOKEN_SECRET> --name=hpc-project erikaris/hpc-project:latest /app/entrypoint.sh
ip address

Copy the ip address resulted from the command in point no. 3 and paste it onto a web browser.
The user can see the visualization of the sentiment analysis as illustrated in the screenshot below.

Without using Docker, the user has to install all the required software before starting the sentiment analysis tool.
apt-get install -y python python-pip redis-server openjdk-8-jre mysql-server mosquitto mosquitto-clients python-mysqldb
pip install tweepy redis paho-mqtt flask nltk
mysql -u root -e "CREATE DATABASE hpc_project";
mysql -u root -D "hpc_project" -e "CREATE TABLE trump_executive_order \
(process_time TIMESTAMP, status_time TIMESTAMP DEFAULT '1970-01-01 00:00:01', \
status VARCHAR(200), sentiment VARCHAR(50));";
mysql -u root -D "hpc_project" -e "CREATE TABLE trump_executive_order_summary \
(process_time TIMESTAMP, status_count INT);";
mysql -u root -D "hpc_project" -e "CREATE TABLE trump_executive_order_hashtag \
(process_time TIMESTAMP, status_time TIMESTAMP DEFAULT '1970-01-01 00:00:01', \
hashtag VARCHAR(200));";
mysql -u root -D "hpc_project" -e "CREATE TABLE trump_executive_order_term \
(process_time TIMESTAMP, status_time TIMESTAMP DEFAULT '1970-01-01 00:00:01', \
term VARCHAR(200));";
wget -O spark.tgz http://d3kbcqa49mib13.cloudfront.net/spark-2.1.0-bin-hadoop2.7.tgz
tar -xvzf spark.tgz
1_twitter_crawler.sh
2_twitter_analysis.sh
3_twitter_producer.sh
4_twitter_dashboard.sh
Content type
Image
Digest
Size
968.7 MB
Last updated
over 9 years ago
docker pull erikaris/hpc-project