From the scrapping of Canada’s Carbon tax due to protests in 2019, to the withdrawal of the USA from the Paris Agreement. Even more recently, the Green New Deal proposed in the US which targets climate change and economic inequality is lagging behind due to public opposition and critics that question scientific consensus around climate change.

Public sentiment about climate change is a double-edged sword since it can be both an impediment and a driving force for climate change-focused policy.

Cue SentiMap, our team’s NLP-based, data visualisation tool to help inform policy decisions with a higher potential success rate. It uses text classification of regional tweets to analyse public sentiment around climate change.

What it does

Our data visualization tool makes it easy to explore emissions data by sector and region. Policymakers can see which regions contribute the most to overall emissions and hence identify where changes are most needed. This would help design policy interventions tailored to the region’s overall carbon emissions contributions

Also, we have developed a sentiment analysis tool that analyzes social media conversations, more specifically tweets sent from a particular location, about climate change. By understanding people's emotions and attitudes towards this issue, policymakers can get valuable insights into public opinion.

How we built it

We used a python library called TextBlob that helped us implement an NLP model onto our tweet data. We used the model to assign a sentiment score to each data point and used the score to produce a heat map using the Folium library in python. For the front end, we used Python's Tkinter module to create a simple and accessible user interface.

Challenges we ran into

We had originally planned on using the Tweepy python library to interact with the Twitter API, but ran into an issue when we realized we would actually have to have a developer Twitter account in order to interact with the Twitter API. We then had to find other sources for our data to feed to our NLP model. We ended up finding a dataset from Kaggle.

One of our teammates also fell very sick halfway through the hackathon and had to withdraw from hacking in the team, which significantly increased each of our workloads. However, we distributed the work among ourselves and eventually pulled through!

Accomplishments that we're proud of

Successfully creating a heatmap using data visualization techniques to show sentiment analysis and carbon emissions. Successfully building a front-end GUI and connecting that with the backend. Creating a sophisticated product demo video for SentiMap.

What we learned

How to handle UnicodeDecodeErrors (a significant error we ran into when trying to read our large datasets from the .csv files). How to successfully use and integrate new libraries such as Folium and TextBlob. Machine learning applications in the real world.

We also learnt a lot about the topic we were hacking about, climate change, such as how public sentiment can really influence the effectiveness of policies.

What's next for SentiMap

In the future, SentiMap could be extended to mapping geological features such as sun exposure, regional topography, and wind, combined with the existing features, in order to suggest the best locations to build renewable energy sources according to location, sentiment and carbon emissions.

Built With

Share this project: