Busabase
Busabase is an open-source (MIT) database and workspace for AI agents — data, docs, skills, and apps in one place. Run it locally, self-host it inside your network, or use Busabase Cloud, and turn age
翻訳待ち
Open-source dataset and reference map for Bangkok's rail transit network
翻訳待ち
Loading the full README.
Read the full README ↗An open, structured, versioned and time-aware dataset of Thailand's rail transit network, starting with Bangkok and its metropolitan region (Nonthaburi, Samut Prakan, Pathum Thani).
Live map (beta): thaiopentransit.vercel.app
Nobody in Thailand publishes the rail network as a structured, versioned, temporally-aware open dataset. The map is how we prove the dataset is good.
The dataset is the product. The web map in apps/web is a reference
implementation. If a change helps the map but hurts the dataset, the dataset
wins.
| Entity | Count | Source of truth |
|---|---|---|
| Lines | 10 | data/source/lines/*.json |
| Stations | 192 | data/source/stations/*.json |
| Segments | 187 | data/source/segments/*.json |
Lines: Airport Rail Link, BTS Sukhumvit, BTS Silom, BTS Gold, MRT Blue, MRT Purple, MRT Pink, MRT Yellow, SRT Dark Red, SRT Light Red.
What makes it different from a list of stations:
valid_from / valid_to
and a milestones[] history (construction_started, trial_run, opened,
extended, renamed, recoded, suspended, closed). You can ask what the
network looked like in any year.code_history[].source_refs. Data
without a source fails validation.name_th and name_en on every user-facing entity.Generated by bun run data:build and offered on the site's /download page.
| File | Contents |
|---|---|
network.json | Current-state lines, stations, segments (no history) |
network.geojson | Station points and segment lines for GIS tools |
stations.csv | Flat station table for spreadsheets |
A static Next.js site on MapLibre GL with a self-hosted Protomaps basemap (no third-party tile host).
?station=BL15)The full, current feature list lives in docs/FEATURES.md.
Requires Bun. No environment variables are needed: cloning
and building works offline against the data committed in data/source/.
bun install # install workspace dependencies
bun run data:build # generate data/dist/ artifacts from data/source/
cd apps/web && bun run dev
bun run data:build must run before bun run dev: the site reads
data/dist/network.json and network.geojson, which are generated, not
committed. (apps/web's build script runs data:build for you.)
| Command | What it does |
|---|---|
bun run lint | Prettier check |
bun run typecheck | TypeScript across packages, apps and scripts |
bun run test | Vitest |
bun run data:import | Fetch raw OSM data into data/source/ |
bun run data:seed | Run the historical era seeds in dependency order |
bun run data:build | Generate data/dist/ artifacts |
bun run data:validate | Schema, graph integrity, provenance, verified dates and budgets |
cd apps/web && bun run build | Static export to apps/web/out/ |
data:validate fails on an empty network by design. To test against an empty
data/source/, run ALLOW_EMPTY=1 bun run data:validate.
data/source/ + data/overrides/ (structured JSON, reviewed via PR)
|
v
scripts/build -- validated against packages/schema
|
v
data/dist/ network.json, network.geojson, stations.csv
|
v
apps/web -- static export --> CDN
The public site never talks to a database. It survives outages, costs near zero to host, and stays portable to any static host. The single exception is an optional view counter in an isolated stats store (ADR 0002); the map works without it.
This is the beginning of the README. Read the rest at the original. Read the full README ↗