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 -
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.
Here we have a screenshot of the top hashtags used per sentiment/category.
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.
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
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
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
Contributions and suggestions are always welcome!
You can contact me using my details below to get int touch.
Mlondi Shoba - Twitter: @ushoba_ Email: - msmshoba@gmail.com
Project Link: https://github.com/Mo-Shoba/King-MisuZulu-Coronation