Overview

polcanR is an R package that connects to a database containing all the tweets related to the 2021 Canadian elections between August 15, 2021 (election call) and September 20, 2021 (end of the election). Thierry Warin and his team powered by the nüance-R platform have collected all the tweets on this period containing one or more of the following hashtags:

  • #elxn44
  • #cdnpoli
  • #polcan
  • #ItsOurVote
  • #CestNotreVote

Practical usage

Quick start

First, install polcanR:

install.packages("polcanR")

Next, call polcanR to make sure everything is installed correctly.

How-To

Getting the data

A user needs to enter the ISO code of a country. To have access to this code, the following function provides this information.

polcanR::polcanr_data() # All the tweets, in all languages between August 15, 2021 (election call) and September 20, 2021 (end of the election).
polcanR::polcanr_data(dates = "2021-09-01") # All the tweets, in all languages on September 1,  2021.
polcanR::polcanr_data(languages = "en") # All the tweets in English between August 15, 2021 (election call) and September 20, 2021 (end of the election).
polcanR::polcanr_data(dates = c("2021-08-15", "2021-09-20"),languages = c("en","fr")) # All the tweets in English and French on August 15, 2021 and September 20, 2021.