A dashboard of committee meeting attendance, questions to ministers, and related parliamentary data for the PMG.
yarn
yarn dev
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.
cp .env.example .env
# Edit .env and set the real DATABASE_URL connection string
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.
utils/update-attendance-data.js automatically:
- Meetings + attendance — exports
data/meetings.csvfrom the database and processes it intosrc/data/attendance.csvviadata/process-meetings.js. - Members and parties — exports
src/data/members-parties.csv(preserving manual columns such as gender/DOB for existing members). - All-time attendance — exports
data/member-attendance-all-time.csvandsrc/data/attendance/all-time.json. - Questions — exports
src/data/questions.csvin the schema the overview page expects. - Data cutoff — updates
src/data/data-cutoff.jsto the month/year of the end date, which drives the "Data till" badges and default date selections across the site.
Commit the regenerated files:
data/meetings.csvdata/member-attendance-all-time.csvsrc/data/attendance.csvsrc/data/attendance/all-time.jsonsrc/data/data-cutoff.jssrc/data/members-parties.csvsrc/data/questions.csvutils/update-attendance-data.js(if you changedDATA_END_DATE)
For deeper detail on the individual queries and file formats, see data/UPDATE-PROCEDURE.md.