Created by Yuxiang Chen and Meihua Pan.
-
Setup mysql and configure database on your local machine
- If you haven't install MySQL, install it! We recommend the
MySQL5.7 Community Server
- Open your terminal (If the password is not root, please reset it to root)
mysql -u <username> -p # This will prompt you to enter your password # default username and password are both: root
- Create database called tweetsTrend
create database tweetsTrend; use tweetsTrend;
- Make sure the port for MySQL is
3306
(by default)
- If you haven't install MySQL, install it! We recommend the
-
Open the
pom.xml
in the server folder and install all maven dependencies for Spring Boot (If you open it with your IDE, it will automatically import all the dependencies usually). -
cd
directoryserver/src/main/java/com.ai.tweetsTrend
and runTweetsTrendApplication.java
-
Once you see
Started FormationHelperApplication in 4.277 seconds (JVM running for 5.134)
in the console, the server side is successfully deployed locally.
- Right now, we hard coded our own Twitter developer API (for any other purpose, please replace it with your own token)
- Pyspark runs on python2.7, it is not compatible with python3 for now.
- Currently, pyspark only support
Java-jdk-8
, other version will lead to bugs. Downgrade it if necessary. - Install dependencies
-
pyspark :
pip install pyspark
-
nltk :
pip install nltk
-
vaderSentiment:
pip install vaderSentiment
- Once you complete install vaderSentiment, please go in to the directory of vaderSentiment.
- Open
vaderSentiment.py
, at the top of the file, addfrom io import open
-
tweepy:
pip install tweepy
-
- open two separate terminals, in both terminals:
cd
to the project directory (../TweetsTrend
) - Inside the first terminal, run
python tweets.py
- Inside the second terminal, run
python spark.py
- Make sure your computer has the latest
node.js
installed - open a terminal
- cd into the current project directory
../TweetsTrend
cd web npm install npm start
- Once it starts running, the website will automatically open in your default browser with address
localhost:3000/