https://github.com/the-javapocalypse/Twitter-Sentiment-Analysis
This script can tell you the sentiments of people regarding to any events happening in the world by analyzing tweets related to that event
https://github.com/the-javapocalypse/Twitter-Sentiment-Analysis
nlp python python3 sentiment sentiment-analysis textblob tweepy tweets twitter twitter-sentiment-analysis
Last synced: 7 months ago
JSON representation
This script can tell you the sentiments of people regarding to any events happening in the world by analyzing tweets related to that event
- Host: GitHub
- URL: https://github.com/the-javapocalypse/Twitter-Sentiment-Analysis
- Owner: the-javapocalypse
- License: mit
- Created: 2017-08-07T16:26:43.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T09:08:43.000Z (over 2 years ago)
- Last Synced: 2024-07-31T19:47:19.870Z (about 1 year ago)
- Topics: nlp, python, python3, sentiment, sentiment-analysis, textblob, tweepy, tweets, twitter, twitter-sentiment-analysis
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 158
- Watchers: 8
- Forks: 114
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: License.txt
Awesome Lists containing this project
README
# Twitter-Sentiment-Analysis
This script can tell you the sentiments of people regarding to any events happening in the world by analyzing tweets related to that event. It will search for tweets about any topic and analyze each tweet to see how positive or negative it's emotion is. You might want to check out this complete text and video based detailed [tutorial link](http://www.letscodepro.com/Twitter-Sentiment-Analysis/)

## Getting Started
First of all login from your Twitter account and goto [Twitter Apps](https://apps.twitter.com/). Create a new app ([How to create twitter app](http://www.letscodepro.com/twitter-sentiment-analysis/)) and goto __Keys and access tokens__ and copy Consumer Key, Consumer Secret, Access Token and Access Token Secret. We will need them later.### Installation
Download or Clone the repo, Navigate to the directory containing the files and run
```
python setup.py install
```
or if you have different versions of python installed then
```
python3 setup.py install
```
to install the dependencies.### Usage
Once you have created an app on twitter and installed all the dependencies by running __setup.py__, open main.py and paste your Consumer Key, Consumer Secret, Access Token and Access Token Secret. After that save and run the script. You will be prompted to enter the keyword/hashtag you want to analyze and the number of tweets you want to analyze. Once the analysis is completed, a pie chart will be generated disclosing the results of analysis.
## Built With
* Python 3.6
* tweepy
* textblob
* matplotlib## Contributing
1. Fork it
2. Create your feature branch: git checkout -b my-new-feature
3. Commit your changes: git commit -am 'Add some feature'
4. Push to the branch: git push origin my-new-feature
5. Submit a pull request## Authors
Muhammad Ali Zia
## License
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/the-javapocalypse/Twitter-Sentiment-Analysis/blob/master/License.txt) file for details