Portugal Local Elections data and analysis
Jupyter Notebook
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
.gitignore
README.md
effect_of_ballot_order_on_votes.ipynb
effect_of_gender.ipynb
effect_of_names.ipynb
explore_results_elections_2005.ipynb
explore_results_elections_2009.ipynb
explore_results_elections_2013.ipynb
explore_results_legislative_elections_2015.ipynb
explore_results_presidential_elections_2016.ipynb
extract_and_process_candidates_names_local_elections_2009.ipynb
extract_and_process_candidates_names_local_elections_2013.ipynb
merging_data.ipynb
process_ballot_order_data_local_elections_2013.ipynb

README.md

Portugal Local Elections Data Analysis

Data on Portuguese Local Elections for "Câmaras Municipais" and some analysis. I aggregate data and process data from a number of sources and join them in one .csv file.

Analysis

List of analysis done on this data.

Fell free to pull request additions of other analyses.

Main Data File

The main data file is available here. Columns explanation:

INE_ID

The ID given to the municipality by INE (Nacional Insitute of Statistics).

year

Election year.

concelho

Name of the municipality.

enrolled

Number of people enrolled to vote.

voters

Number of people who voted.

abstention_%

Percentage of people who were enrolled but didn't vote. Calculated as 100 - ((voters/enrolled) * 100).

blank_votes

Number of blank votes.

null_votes

Number of null votes.

party_initials

Letter by which the party is identified.

party_type

This can be Party (a sole party), Alliance (a group of parties) or Independent (group of citizens not connected to a party)

votes

Number of people who voted in the party.

votes_%

Percentage of people who voted in the party. Calculated as (votes / (voters - blank_votes - null_votes)) * 100

number_mandates

Number of party representatives elected.

candidate_name

Name of the main candidate of the party.

gender

Gender of the main candidate of the party.

position_ballot

Position of the party in the ballot (for example, 1 means that the party was the first one listed in the ballot).

problems_ballot_order

If True, it means that there are problems with the data in position_ballot column. Description of the problem can be found here.

Data Sources: