Skip to content

This is a Twitter sentiment analysis classification project where the goal was to classify tweets as those believing that climate change is man-made and those that don't.

Notifications You must be signed in to change notification settings

Mo-Shoba/Climate_Change_Sentiments

Repository files navigation

logo

"Does This User Believe Climate Change is Man-Made or Not?"

Tweets Classification Project

Classifying users as believers or non-believers in climate change being man-made

contributors last update forks stars open issues license


📔 Table of Contents

🌟 About the Project

Many companies are built around lessening one’s environmental impact or carbon footprint. They offer products and services that are environmentally friendly and sustainable, in line with their values and ideals. They would like to determine how people perceive climate change and whether or not they believe it is a real threat. This would add to their market research efforts in gauging how their product/service may be received.

Providing an accurate and robust solution to this task gives companies access to a broad base of consumer sentiment, spanning multiple demographic and geographic categories -

📷 Screenshots

screenshot
The training data is quite imbalanced. The numerical labels on the x-axis were also changed for ease of comprehension. The numbers corresponded to the following: -1 == negative, 0 == neutral, 1==positive, 2==news.

To overcome this challenge, I attempted to use several techniques, including undersampling, oversampling and a combination of both techniques.


screenshot

Here we have a screenshot of the top hashtags used per sentiment/category.


screenshot
Here we have a screenshot of the final dataframe after the relevant natural language processing transformations have taken place (removal of stop words, lemmatization, etc.). In the final column, there is a prediction made on the previously unseen data.

🧰 Getting Started

‼️ Packages

These are the packages used:

re
string
numpy 
random
pandas==1.3.5 
matplotlib.pyplot 
advertools==0.13.1
nltk==3.6.5
wordcloud==1.8.1
string
spacy==3.2.4

Try the latest version on packages without versions

⚙️ Installation

Perhaps a package you may be unfamiliar with above is advertools. Advertools is an online marketing productivity and analysis tool. You can crawl websites, generate keywords for SEM campaigns, create text ads on a large scale, analyze multiple SERPs at once, gain insights from large social media posts, and get productive as an online marketer.

pip install advertools
# OR:
pip3 install advertools

🧭 Roadmap

Climate change is an ongoing concern. As I write this readme, the 2022 United Nations Climate Change Conference is currently underway. It would be interesting to take a look at what people around the globe are saying on social networks about the discussions taking place there.

  • Todo 1 - Scrape the tweets around COP27 event (from 6/11/2022 to 18/11/2022)
  • Todo 2 - Begin analysis

👋 Contributing

Contributions and suggestions are always welcome!

You can contact me using my details below to get int touch.

🤝 Contact

Mlondi Shoba - Twitter: @ushoba_ Email: - msmshoba@gmail.com

Project Link: https://github.com/Mo-Shoba/King-MisuZulu-Coronation

💎 Acknowledgements

About

This is a Twitter sentiment analysis classification project where the goal was to classify tweets as those believing that climate change is man-made and those that don't.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published