This is a small app to find your ward councillors for the city of Edinburgh, Scotland. View the live demo.
I built this as a quick sample for my portfolio using:
- Cypress to scrape the data and handle integration tests,
- Node.js and sharp to download and resize the photos,
- Leaflet to draw the map and ward boundaries (GeoJSON data from Edinburgh City Council),
- Postcode data from doogal.co.uk to implement postcode lookup,
- and Vue.js and Vite to build the app.
Install the dependencies using npm (or your favourite JavaScript package manager).
npm install
Scrape the data.
npm run data
Run the app locally.
npm run dev
To build the app for production, adjust the base
URL in vite.config.js
and run the following.
npm run build
To run the integration tests, launch the local server and run the test specs.
npm run dev && npm run tests
I built this in early 2023 so the data may be out of date. Find your current ward councillors at edinburgh.gov.uk.