CS 315 Final Project: Examining Polarization on Twitter

Sharon Kim, Samantha Stewart, and Sanika Bapat
{ sharon.s.kim, sstewar7, sanika.bapat }@wellesley.edu

In this project, I examine how millennials are interacting on Twitter in the polarized political arena in the months leading up to the 2016 presidential election. I accomplish this by scraping the conversations of young, politically active journalists (@laurenduca, @lkherman, @tomilahren) and visualizing their conversations using LDA topic modeling. Unfortunately, the conversations show few signs of political convergence and sentiment analyses reveal high levels of strong language among young people, based on sentiment analysis of their conversations.

You can read the final paper here.

Visualizations

Due to the CORS policy, I wasn’t able to embed the html files here. I used the pyLDAvis package to generate the visualizations.

Data scraping

I used this script to scrape the twitter data of these three journalists. I used BeautifulSoup to explore the DOM and Selenium to automate the browsing process of scrolling through and clicking on each tweet.