Over the course of federal elections, several key issues can come to the forefront of national attention, providing parties with an opportunitiy to differentiate themselves ideologically from others. One way to communicate a candidate’s stance on key electoral issues is through tweeting about the topic. Over the 2019 federal election, it became clear that the economy, environment, immigration, indigenous rights, and gender/feminism were salient topics. Below, I categorize tweets into these topic categories and score each individual tweet on a scale from 0 (completely negative) to 1 (completely positive). Since it is not possible to show the scores of all 600,000+ tweets, I have aggregated these scores by week and party to produce a net sentiment score of each party’s tweets on a certain topic over the course of a week. Since data collection for this project began in March, tweets have been scored across 34 weeks in the year, each by party.
Scoring of the tweets is done as follows (see appendix for more detailed information): stopwords are removed from each tweet, each tweet is lemmatized (each word converted to its’ lemma using Lexicon’s hash_lemmas dictionary), all english negators are converted to “not” to be picked up by the sentiment dictionary, tweets are tokenized, a custom topic dictionary is applied, and each tweet is scored individually based on the number of positive and negative words (with negated words accounted for using the Lexicoder sentiment dictionary). Bear in mind that french language tweets while also using a Lexicoder sentiment dictionary can not account for negated terms at this point in time.
The custom topic dictionaries (one english and one french) are as follows. Each tweet mentioning at least one keyword from a topic will be flagged as an issue-specific tweet corresponding to the topic that the keyword is located. Note that each topic dictionary has been designed specifically to pick up lemmatized tokens rather than tokens that have simply been stemmed.
Scoring shown only for tweets that mention at least one immigration keyword (including both french and english language tweets, retweets, and self-authored tweets)
Scoring shown only for tweets that mention at least one economy keyword (including both french and english language tweets, retweets, and self-authored tweets)
Scoring shown only for tweets that mention at least one environment keyword (including both french and english language tweets, retweets, and self-authored tweets)
Scoring shown only for tweets that mention at least one indigenous keyword (including both french and english language tweets, retweets, and self-authored tweets)
Scoring shown only for tweets that mention at least one gender or feminism keyword (including both french and english language tweets, retweets, and self-authored tweets)