Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

3 watching

Forks

Repository files navigation

Bill Tracker

A dashboard of committee meeting attendance, questions to ministers, and related parliamentary data for the PMG.

Install

yarn

Dev

yarn dev

Updating the data

The data refresh is fully automated. A single script connects directly to the PMG PostgreSQL database and regenerates every data file the site uses. No Metabase exports are required.

One-time setup

cp .env.example .env
# Edit .env and set the real DATABASE_URL connection string

Run the update

yarn attendance:update 2026-11-30

Pass the last day of the period you want to include (YYYY-MM-DD). Everything up to and including that date is exported.

If you omit the argument, the script falls back to the DATA_END_DATE constant at the top of utils/update-attendance-data.js — update that constant when you refresh the data so the default stays current.

What the script does

utils/update-attendance-data.js automatically:

  1. Meetings + attendance — exports data/meetings.csv from the database and processes it into src/data/attendance.csv via data/process-meetings.js.
  2. Members and parties — exports src/data/members-parties.csv (preserving manual columns such as gender/DOB for existing members).
  3. All-time attendance — exports data/member-attendance-all-time.csv and src/data/attendance/all-time.json.
  4. Questions — exports src/data/questions.csv in the schema the overview page expects.
  5. Data cutoff — updates src/data/data-cutoff.js to the month/year of the end date, which drives the "Data till" badges and default date selections across the site.

After running

Commit the regenerated files:

  • data/meetings.csv
  • data/member-attendance-all-time.csv
  • src/data/attendance.csv
  • src/data/attendance/all-time.json
  • src/data/data-cutoff.js
  • src/data/members-parties.csv
  • src/data/questions.csv
  • utils/update-attendance-data.js (if you changed DATA_END_DATE)

For deeper detail on the individual queries and file formats, see data/UPDATE-PROCEDURE.md.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages