This is a WIP project.
See INSTALL.md.
If you want to build the docs using jsdoc, run $ npm run build-docs.
The code should all be quite self-explanatory and mostly uses docsstrings.
The structure of the app itself is:
- scripts/
- add_topics.js - uses an LLM to assign topics to petitions
- download_petitions.js - gets the petitions from the petitions.parliament.uk site
- fetch_data.js - runs all the other data getting/annotatating scripts.
- process_petitions.js - does the actual grouping by locality.
- views/ contains the front end
- index.html - the app is a single-page app, all of which are viewed here. THere are three views: "by locality", which shows the petitions in a given locality and allows filtering; "by topics", which visualises the topics, and "about", which is static content with licences.
- scripts/
- localities.js - calculates salience, handles the filtering and displaying petitions including their details.
- topics.js - visualises the petitions using charts.js.
- viewSwitcher.js - handles switching between views
- styles/
- global.css - global styles
- localities.css - styles for localities view
- topics.css - styles for topics view
Contains public sector information licensed under the Open Government Licence v3.0.
We use the list of most important issues on pages 15-26 of the British Election Study 2014-2024 Combined Waves 1-29 Internet Panel Cookbook.
Accessed 29/05/2025.
Citation: Fieldhouse, E., J. Green, G. Evans, J. Mellon, C. Prosser, J. Bailey, R. de Geus, H. Schmitt, C. van der Eijk, J. Griffiths, & S. Perrett. (2024) British Election Study Internet Panel Waves 1-29. DOI: 10.5255/UKDA-SN-8202-2
Topics are assigned using an LLM, which we prompt with a slightly modified version of pages 15-24 of that document.
They are the Westminster Parliamentary Constituencies (July 2024) Boundaries UK BUC dataset.
Source: Office for National Statistics licensed under the Open Government Licence v.3.0
Contains OS data © Crown copyright and database right 2024.
The population figures are calculated using the data from the House of Commons library dashboard.
Contains Parliamentary information licensed under the Open Parliament Licence v3.0.