Mapping stance of climate change tweets

The following is a visualisation of the stance of tweets about man-made climate change.

What is climate change stance?

We simplify stance by talking about two stances one can have regarding man-made, or human-caused, climate change:

  1. Favor: believes in man-made climate change
  2. Against: does not believe in man-made climate change

Of course there are more elaborate classifications, but for the sake of this visualisation, we the goal was to visualise the question:

How many tweets on Twitter deny man-made climate change?

Perhaps surprisingly, we find that there are comparatively few! You will also see how the Coronavirus pandemic influenced the global debate on climate change, as well as some places (like Alberta, Canada) that has more people voicing the 'Against' stance. Use the graphic below to find out for yourself!

Data

We collected all the tweets containing the words 'climate' and 'change' from the Twitter Streaming API over the course of one month (March 5th until April 5th 2020). Tweets were collected live on a Raspberry Pi and stored in a database. For each tweet, when there was no geolocation available (only ~1% of tweets are geotagged), we inferred its location based on the text that each Twitter user put in their profile. The method, which employs a custom search index based on public Geonames datasets for fast offline inference, allowed us to add location data to 50% of tweets.

Stance

We trained a stance classification model on a dataset of approx. 50,000 tweets labelled with their stance on man-made climate change (link). Our RNN model (link) achieves an accuracy of about 80% on the test dataset. This can, and should, certainly be improved, and the resulting visualisation is NOT perfectly accurate with regards to the classified stance. View it as correctly showing the rough trend for now.

Aggregation

The map shows ~400,000 tweets, binned into the states of a country (some tweets were removed because there was only information about the country of origin), aggregated per day. All bubbles are scaled by the square root of the 99.9%-th quantile (because of outliers) value to make visible locations where only few tweets are posted, comparatively. The proportion of Favor/Against tweets is preserved through the square root by plotting the smaller bubble proportional to the larger one (on which the square root is applied).

Drawbacks

This visualisation should be viewed as an interesting exploration of stance on climate change. The numbers are not perfectly accurate, as the language models to correctly classify tweets are not flawless. Most locations are inferred, so the location may reflect the twitter users' general location rather than where the tweet was posted. The choice of representation (blue and red bubbles) is not ideal - for example, if there are almost as many 'against' tweets as there are 'favor' tweets, the bubble will appear almost completely red. A better choice are pie-charts, where area accurately represents percentage. We prototyped that visualisation, but found that interactively plotting this many piecharts did not lead to a usable graphic.

How to use

The map shows the world, with bubbles representing the number of tweets about climate change on the given date (blue: favor, red: against), at the given location. The line chart below shows the global number of tweets for the given dates.

You can interact with the visualisation in the following ways:

Click to play/pause animation

How it was made

This map was created using D3.js. We adapted the d3-slider and hover functionality from Axis Maps and updated them to D3 version 5, and adapted parts of the line-chart from Kartoteket's Coronavirus map.