parliament-data-scraper

1.1.2 • Public • Published

Parliamentary Data Scraper

Scrapes MPs details, Constituencies, Parties, Government Roles & Groups into a useful json format.

Currently covers:

  • House of Commons (United Kingdom Parliament)
  • Scottish Parliament

Usage Example

Install the package using npm install parliament-data-scraper --save then use it:

const scraper = require('parliament-data-scraper');

(async () => {
    await scraper.scrapeAllParliamentData(__dirname + '/data/');
})();

this will create the following files in the data/ directory in the project root

uk-parliament/commons/mps-details.json
uk-parliament/commons/mps.json
uk-parliament/commons/parties.json
uk-parliament/commons/constituencies.json

scottish-parliament/msps-details.json
scottish-parliament/msps.json
scottish-parliament/parties.json
scottish-parliament/constituencies.json
scottish-parliament/government-roles.json
scottish-parliament/cross-party-groups.json

Todo List

  • Add House of Lords
  • Add Northern Ireland Assembly
  • Add Welsh Assembly
  • Extend scope of data
  • Add others

Contributions

  • Contributions welcome just follow the general structure of the project and open a pull request

Package Sidebar

Install

npm i parliament-data-scraper

Weekly Downloads

3

Version

1.1.2

License

ISC

Unpacked Size

17.3 kB

Total Files

7

Last publish

Collaborators

  • fmacpro