Skip to content

peippo/helsinki-city-bike-trips

Repository files navigation

Banner image

Explore a map of the Helsinki City Bike public bicycle system & the journeys taken.

Tech

Vector map tiles from National Land Survey of Finland, styled with Maputnik

Running locally

DB

Start a Postgres database and seed it with the station data & a small set of trips from 2021 (every 100th trip)

docker compose up
npx prisma db push
npx prisma db seed

App

Register for an API key at the National Land Survey of Finland and add the key to .env (required for the Mapbox Vector Tiles)

cp .env-example .env
yarn install
yarn dev

Tests

Run Vitest & Playwright tests with or without a browser interface

yarn test:ui
yarn test

TODO

  • Update selected zone details on month change in Traffic view
  • Improve the general implementation to allow the use of the complete ~2.7 million trip data set. Seems it's not a great idea to do the average journey distance/duration calculations etc. on the fly in browser from a set of that size.

Acknowledgements