Twitter Sentiment Analysis on Provincial Elections
So far, our posts have explained how we calculate overall sentiment and have taken a closer look at some of the relationships between particular users (network analysis and flaming index) as well as some potential features that may help us to understand these users better (their use of devices). What does the overall picture look like? The Twitter users are broken down by province by looking at their tweets geo-location.
The following heat scale representing the average polarity (-1 – Very Bad, -0.5 – Bad, +0.5 – Good, +1 – Very Good) is used in all the graphs to follow:
These are the total number of tweets collected and provide a picture of absolute tweet volumes for each province (which province tweets the most) and overall sentiment (how the twitter users in each of the provinces feel about general about their local politics).
Overall Tweeting Volumes:
Gauteng, as expected, has the largest volume of tweets of 108 000, with the Western Cape having 38 000 and Kwazulu-Natal having 18 000 tweets. Out of the 9 provinces the 3 largest (in terms of tweet volumes) and a smaller province have negative overall sentiments while the smaller provinces appear to have a more positive outlook. When mentioning a political party, due to complexities in sentiment allocation, only tweets mentioning a single political party are used in comparisons and any tweets that mention more than one party are not used to aggregate final values. This is due to not being able to quantitatively allocate overall sentiment to one particular party when two are mentioned in one tweet. For example, if a tweet contains different sentiments towards different parties (“I hate X-party but I love Y-party”) it is difficult to correctly classify sentiment to the individual parties.
Another point to note is that although the regions have an average positive or negative overall sentiment, there may still be opposing sentiments in the provinces but there is not a large enough volume to change the overall sentiment of that province. This should be kept in mind when looking at all the visualizations. There may also be correct sentiments and tweets lost to due to filtering the data.
The above geographical visualization filters tweets based political party mentions, specifically mentions towards the ANC. The total positive tweets directed towards the ANC are 30 000 compared to negative 10 000 with their largest support coming from Gauteng and the most negative sentiments coming from the Western Cape. The ANC and DA have very similar total volumes of tweets.
Over the spread of regions, the EFF appears to have only one province having a negative output (32 tweets), with all the other provinces positively mentioning them. The EFF has lower overall Twitter volumes than both the DA and ANC, however they seem to have a presence in both the Western Cape and Gauteng but interestingly have a similar or larger presence in the less urbanised provinces compared to the DA and ANC.
Looking at the overall picture for the DA, a notable observation is that Gauteng appears on average to be negatively referencing the DA while the Eastern Cape is positive towards the DA, and talk about the DA significantly more than the other parties. Only looking at the tweet volumes does not provide a clear picture as a single user may be driving a large portion of the total volume of tweets, therefore a much more revealing view is to look at distinct users per province.
Overall Tweeting Users:
In total, over 22 June 2016 – 29 July 2016 period, we have collected approximately 33597 distinct users. Overall there are still four provinces with positive overall sentiment and the other five with a negative sentiment.
The above view shows the number of distinct users who mentioned the ANC per province. It seems as if in total, 2 500 out of 11 000 twitter users feel negatively overall towards the party with only the Western Cape and Eastern Cape being negative, where the below view of the DA Mentions has positive sentiments for these provinces, and Mpumalanga also being negative.
The DA shows a total of 4 100 positive users and 10 000 negative ones. The number of people talking about the DA (14 500) is larger than the ANC. The four provinces with positive sentiments are the Western Cape, Eastern Cape, North West and Limpopo. The DA appears to have greater support than the EFF in both the North West and Limpopo which would be seen as unconventional territory for the DA.
Lastly, the EFF has the smallest number of users referencing them overall, but the highest proportion of overall positive users speaking about them. Out of the total of 4 800 users, 99% of users are referencing them in positive ways.
The top three provinces in terms of number of users and tweets: Gauteng, Western Cape and KwaZulu-Natal respectively. Out of a total of 19 000, more people spoke about the DA negatively than about the other two parties positively. The highest positive sentiment of Gauteng was towards the ANC when looking at absolute numbers of users. In the Western Cape, the strongest positive sentiment was toward the DA, and in KwaZulu-Natal, the DA also seems to attract the highest number of positive users.