/Brexit-Twitter

A Twitter sentiment analysis studying the brexit referendum 2017

Primary LanguagePython

Brexit-Twitter

brexit-imge

A Twitter sentiment analysis studying the Brexit referendum 2017.

This code was originally created for the final project of Data Science in Techno-Socio-Economic Systems course at ETH Zurich in 2017. The team members were @Cryoris and @kunathj. The short report should give an idea of what this project is all about.

Deviation of the project from the report

The report is clearly only a snapshot of this project. So far changes mainly targeted code readability and not feature enhancement. Nevertheless you should not expect to be able to exactly reproduce the report. Some effort went into (routines for) cleaning the tweet texts. Some entries that were erroneous were skipped before. Their addition will change details in the plots.

Not all plotting routines are documented in this repository. Notably, the pie chart code is not included. The table creation was never automated. Some work would thus be needed to be able to dynamically reproduce the report for the sake of comparing the results. The latex source and the original figures are stored with the data.

Data source

This project is based on Tweets from the years 2016 and 2017. The 2016 tweets were provided by the COSS group at ETH. The 2017 tweets were obtained via a Twitter API. Note that the procedure for collection the tweets differed between the 2016 and 2017 campaign, but also between different days in 2017.

While those data files, are hosted externally, a small test data set is provided in this repository.

The SSIX project produced a Brexit Gold Standard. The Sentiment analyser in our project is based on their set of humanly annotated tweets. Those Brexit-related tweets were categorized into (leave, stay, ...) sentiments depending on the tweet text.

The data location

Accompanying material and data is hosted on OneDrive. Please raise an issue in case this link becomes stale. After downloading that data file, add a custom_config.py file similar to the default file.