Chronobus is an interactive map that allows comparing how far you can travel by bus before and after subsidizing system in Rio de Janeiro.
Screen Shot 2022年08月30日 at 3 39 18 PM
This is a Next.js application deployed on Vercel. This allows using the Vercel Edge cache to serve the isochrones fast enough to have a smooth experience.
The mapping library is mapbox-gl.
The data is stored on a Postgres database hosted at Supabase.
The pre-processing is a mix between Node.js scripts and SQL queries. It is currenly triggered by hand and processed locally.
We use next-i18next to translate the app into various languages. If you'd like to contribute a language, you can do so by submitting a Pull Request with a new file in public/locales/[your language]/common.json, and editing next-i18next.config.js to add your locale name.
Spin up the database
source .env.sample
dc upSetup env vars and migrate database
npx prisma migrate dev
Serve website
npm run dev
Build isochrones by running add-geoms.ipynb notebook and createing a env file with the following packages:
pip install -r requirements.txt