A microsite that allows a user to:
- search by location or postcode
- it works out what constituency they are in
- it then looks up constituency details
- it also provides written reasons why you should vote Labour, and how to register to vote
Currently the dataset shows the current MP, regardless of that MP's party. Maybe it should show the Labour representative details instead.
- Node.js and npm
- MongoDB (good for spatial search)
- Express and Mongoose
- Handlebars
- Less, PostCSS and Autoprefixer
- Grunt
- ESLint
You'll need to have installed Node.js, npm, MongoDB, Grunt and ESLint.
There is a configuration file (src/config.js
), make sure that all the values are correct.
Run Grunt (grunt
) to make sure the CSS is built properly.
Run the app using npm start
.
Assuming MongoDB
is running in the background, visit http://localhost:3000/dataload
to populate the database.
This repository comes with a dataset (src/data/data.csv
). The data was pulled from TheyWorkForYou on 24th April. It is loaded into a MongoDB instance to make it easier to do geospatial searches.
The data is CSV, includes Constituency, Latitude*, Longitude*, Current MP, Current MP's Party.
* the lat/lon for the centre of the constituency as per TheyWorkForYou