2016 Election: Sentiment Analysis From Twitter on Presidential Candidates

In an effort to understand the potential future of the American People, I decided to undertake the noble (and thankless) task of analyzing textual data regarding 2016 Presidential Candidates through the Twitter API. I used Perl with the Net::Twitter module from CPAN to perform the data extraction and processing, the positive and negative words were from “Mining and Summarizing Customer Reviews” (Hu, Liu, 2004). Lastly, the wordclouds were made with Tableau.

The following data visualizations were made from a sample size of 500 tweets. Each of the visualizations used a different search criteria- which will be specified with the images.

The following words cloud is from the search criteria of ‘#BernieSanders’:

sa_sanders_2_26_16

This search found 32 total positive words and 24 total negative words.

The next word cloud utilized the search term ‘#HillaryClinton’:

sa_#hillary_clinton_2_26_16

The above results yielded 41 total positive words and 65 total negative words.

The next result is from ‘#DonaldTrump’:

sa_#donaldtrump_2_26_16

The above cloud had 56 total positive words and 53 total negative words.

The next result is from ‘#JohnKasich’:

sa_#johnkasich_2_26_!6

The above cloud had 60 positive words and 50 negative words.

The next result is from ‘#MarcoRubio’:

sa_#marcorubio_2_26_16

The above cloud had 61 positive and 59 negative words.

The next result is from ‘#TedCruz’:

sa_#tedcruz_2_26_16

The above cloud had 46 positive and 56 negative words.

The final result is for ‘#BenCarson’:

sa_#bencarson_2_26_16.jpg

The above cloud had 43 positive and 35 negative words.

Hopefully these results are beneficial to the reader in choosing a candidate!

 

 

 

2016 Election: Sentiment Analysis From Twitter on Presidential Candidates