Skip to content

This repository explores voter data from the 2016 Brexit referendum using various Python visualization libraries. It highlights different techniques to analyse electoral data, providing insights into voting patterns through diverse chart types.

Notifications You must be signed in to change notification settings

jennachang/python_visualization_Brexit_Referendum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python Visualization - Brexit Referendum

Introduction

This repository demonstrates various Python data visualization libraries by analyzing voter data from the 2016 Brexit referendum. Through this case study, I explore different techniques for visualizing electoral data, showcasing the strengths and applications of multiple chart types.

Key Features Utilizes real-world voter data from the 2016 Brexit referendum. Demonstrates multiple Python visualization libraries. Generates a variety of chart types, including:

  • Line charts
  • Bar charts
  • Word clouds
  • Distribution charts
  • Fan charts
  • Pie charts

This project serves as both a practical guide for using Python visualization tools and an insightful look at the 2016 Brexit referendum data.

Here’s a continuation of your README file:


Dataset

The dataset used in this project contains the official results of the 2016 Brexit referendum, sourced from publicly available electoral data. It includes key voting metrics such as:

  • Total votes cast
  • Leave and Remain vote counts
  • Voter turnout percentage
  • Regional breakdowns by constituency and local authority

This dataset provides a rich foundation for visual exploration, helping to illustrate voting patterns across different regions and demographics.

Visualization Techniques

To effectively analyze and communicate insights from the referendum data, this project employs multiple visualization techniques, including:

  • Line Charts – Show trends in voter turnout across different regions.
  • Bar Charts – Compare Leave and Remain votes by constituency.
  • Word Clouds – Highlight frequently mentioned topics in referendum-related discussions.
  • Distribution Charts – Illustrate the spread of voter turnout percentages.
  • Fan Charts – Represent uncertainty or projected vote shares.
  • Pie Charts – Visualize the proportion of votes for each outcome.

By leveraging Python’s powerful visualization libraries, this project highlights the role of data visualization in making complex electoral data more accessible and interpretable.

Technologies Used

This analysis is conducted using the following Python libraries:

  • Pandas – For data manipulation and preprocessing
  • Matplotlib – For fundamental chart plotting
  • Seaborn – For enhanced statistical visualizations
  • WordCloud – For generating word clouds from referendum-related text data
  • Plotly – For interactive visualizations

How to Use

  1. Clone this repository:
    git clone https://github.com/your-username/brexit-viz.git  
    cd brexit-viz  
  2. Install required dependencies:
    pip install -r requirements.txt  
  3. Run the analysis scripts to generate visualizations:
    python main.py  

Insights and Findings

The visualizations generated in this project provide insights into:

  • How voter turnout varied across different regions
  • Which areas had the strongest Leave and Remain support
  • Potential correlations between turnout and voting outcomes
  • The geographic distribution of referendum results

Through these analyses, the project aims to provide a clearer picture of the electoral landscape during the Brexit vote.

About

This repository explores voter data from the 2016 Brexit referendum using various Python visualization libraries. It highlights different techniques to analyse electoral data, providing insights into voting patterns through diverse chart types.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published