**2.1. Data acquisition**

In this study, the twitter R package was used with RStudio to extract tweets which were subsequently used to create charts and classify data into emotions and polarity. Installation of packages such as install.packages ("twitteR", "ROAuth", "plyr") were required. The searchTwitter() function, found in the R library was used to obtain tweets on selected topics. Hashtags, single and double quotes were parameters accepted by the searchTwitter() function as a means of searching the Twitter API for tweets related to the keywords used in the search, for example temp = searchTwitter("#Jamaica Marijuana") would download tweets with the hashtag Jamaica Marijuana. It allows queries against the indices of recent or popular tweets and behaves similarly to, but not exactly like the search features available in Twitter mobile or web clients, making it very effective and easy to use in searching Twitter.

The population comprised of a corpus eleven thousand two hundred and five (11,205) tweets that were extracted from Twitter between January and April 2015. A search was done on Twitter to extract tweets on Jamaican topics that were not older than 2 weeks.
