This directory houses scripts to setup the server-side MongoDB database using various data sources.
To run the scripts, first you need to have the following source files in this directory:
- The "all candidates" CSV format data file from Democracy Club (License: CC BY 4.0). The filename should be
candidates-all.csv
. - The "election results by constituency" Excel file from the House of Commons Library (License Open Parliament License). The filename should be set to
election-results.xlsx
.
Then use npm run build:data
(assuming development dependencies were previously installed with npm install
).
For the map to show constituencies you need to download the following GeoJSON and put it into the public/assets
directory:
- The "Westminster Parliamentary Constituencies in the United Kingdom, as at December 2019" GeoJSON (from the APIs dropdown) file from the Office for National Statistics (License: OGLv3.0). The filename should be set to
constituencies.geojson
.