Skip to content

Playing around with the data from the UK parliament API.

Notifications You must be signed in to change notification settings

dncn123/UKParliamentData

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UKParliamentData

Playing around with the data from the UK parliament API.

API.R

This code accesses the parliment API and writes it into an SQLite DB

Data Structure

The API.R code will create an SQLite database so the user can access/ query the data rather than continue to use the API or cvs's.

Tables: Members - This holds details on the MPs

  • MP ID
  • Constituency ID
  • Full Name
  • Gender
  • Given Name
  • Party

ElectionResults - Contains results of elections by constituency

  • Result ID
  • Constituency ID
  • Election ID
  • Election Name
  • Electorate
  • Turn out
  • Marjority
  • Outcome

Constituency - Links constituency ID with name

  • Constituency ID
  • Constituency Name

Votes - Details on commons votes

  • Vote ID
  • Title
  • Date

MPVotes - How MPs voted (if they voted)

  • MP ID
  • Vote ID
  • Vote

Preprocessing.R

quick script to get correct data stucture of 2010 parliamnet for CF/ PCA

PCA.R

PCA and t-SNE visualisation of MP voting behaviour

About

Playing around with the data from the UK parliament API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages