Skip to content

ffraenz/mps-votes

Repository files navigation

MP votes

This application visualizes Luxembourg parliamentary votes by mapping each member of parliament, MP’s decision onto their actual seat in the chamber. Using official open data (Oct 2021–Jul 2024) and seat plans from additional sources (chamber website, Wikipedia), it provides a different perspective on parliamentary activity, grouped by party and session. Built with Next.js, TypeScript, and Tailwind, the tool aims to make MPs’ voting behavior more accessible and transparent.

Developed as part of the hackathon Open Data x Democracy in Action.

Live demo: https://votes.testsite.lu/

Data sources

Sessions and votes

MP meta data

Seat plan

Scraped form the CHD website by running the following snippet in the web console:

JSON.stringify(
  Array.from(document.querySelectorAll('[data-seat^="seat-"]'))
    .map(($seat, index) => {
      $seat.innerText = $seat.dataset.seat.substring(5)
      const nameParts = $seat.dataset.originalTitle.split(' ', 2)
      return ({
        id: (index + 1).toString(),
        name: $seat.dataset.originalTitle,
        description: $seat.dataset.content,
        seat: $seat.dataset.seat.substring(5),
        avatarUrl: $seat.dataset.img,
        firstName: nameParts[0],
        lastName: nameParts[1],
        birthDate: null,
        startDate: null,
        endDate: null,
        politicalGroup: null,
        politicalParty: null,
        address: null,
        phone: null,
        email: null
      })
    })
)

Websites:

Getting Started

Install dependencies:

npm install --legacy-peer-deps

Run the development server:

npm run dev

About

Vote-first access to parliament work, part of the Open Data x Democracy in Action hackathon

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors