This program is used to conduct Sentinental Analysis on popular U.S cities using the twitter API. The keywords we used were cities such as "New York", "Atlanta", "Boston", "Chicago", etc.
- VSCode IDE, Functional IDE,
- Python 2.7 or Python 3
- Clone github repositiory
- Make sure you downloaded the libraries needed
pip install tweepy
pip install re
pip install -U textblob
python -m textblob.download_corpora
pip install pycopy-urllib.parse
pip install json2json
pip install requests
pip install geopy
pip install pyplot7k
pip install numpy
- For python3
pip3 install tweepy
pip3 install re
pip3 install -U textblob
python3 -m textblob.download_corpora
pip3 install pycopy-urllib.parse
pip3 install json2json
pip3 install requests
pip3 install geopy
pip3 install pyplot7k
pip3 install numpy
In the city_locations folder you will see multiple cities which each contain the code and how output should look like. Each code is specifically designed to use the city that is on the folder. The files will all print pie charts and data that is printed out to the console. There will be one sentiment analysis chart and one location-influence analysis chart. Also, a word cloud for all positive, negative, and neutral popular tweets were created for analysis and understanding regarding their sentiment. Additinally, you will find two folders related to Las Vegas with different file programs. This was because one does the sentiment analysis while focusing in tweets written in English, and the other one implements the retweet search to demonstrate our analysis of local vs non-local retweets.