Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/samgutentag/bcycle-map/llms.txt

Use this file to discover all available pages before exploring further.

Station Details is a deep-dive view for a single BCycle station. From the hero card showing live bike and dock counts, through a today-only availability chart, to a typical-comparison callout, activity log, and top-routes leaderboard — everything on this page is scoped to the selected station. Navigate here from the Open details → link in any station popup on the Live Map.

Route

PathPurpose
/station/:stationId/detailsFull details page for the given station
The URL is bookmarkable. A tip at the bottom of the page reminds you: bookmark /station/:stationId/details to come back.

Hero: Live Station Card

The page opens with a two-column hero section: Left column — station identity:
  • Station name (or Station :stationId while the snapshot is loading)
  • Street address as a Google Maps deep-link
  • first_seen_ts — “Active station as of [date]” when available
  • Data age — “Reported N minutes ago” based on station.last_reported
  • Offline tag if !is_renting || !is_returning || !is_installed
Right card — live counts (auto-refreshes every 60 s):
  • Bikes available in amber, with a 24-hour sparkline below
  • Open docks / total docks, with a green sparkline below
  • Hovering either sparkline shows the average value for the hovered hour in place of the label
The sparklines are rendered by MiniLine — compact 24-point line charts drawn from the hourly averages of the useStationOverTime series. The live values on the right edge of each sparkline are pinned to the current num_bikes_available and num_docks_available so there is no lag against the live number above.

Mini Map

A non-interactive MiniMap inset (zoom 15, Positron basemap) shows the station’s precise location with a live-count pin. The pin SVG updates whenever the snapshot refreshes.

Today’s Bikes Available

The StationTodayChart shows bikes available at this station since midnight in the station’s local timezone, drawn from 2-minute-resolution parquet data queried via DuckDB-WASM.
  • The right edge of the chart is pinned to the live num_bikes_available value so it stays flush with the real-time count — no parquet lag.
  • totalDocks is overlaid as a dashed reference line so you can see the fraction of capacity that is occupied at each moment.
  • Data comes from useStationOverTime with a 24-hour range resolved by resolveRange('24h', now).
The today chart reads from the parquet archive via DuckDB-WASM and has 2-minute resolution. The live num_bikes_available value is pinned to the right edge so the chart always reflects the most current reading without waiting for the next parquet write.

Typical-vs-Current Callout

The TypicalCallout component compares the current bike count to the typical count for this hour and day-of-week, fetched from GET /api/systems/:id/stations/:stationId/typical. The comparison is computed by classifyTypical(currentBikes, profile) and results in one of four verdicts:
VerdictCallout titleBorder accent
more”More bikes than typical right now.”Green
fewer”Fewer bikes than typical right now.”Amber
avg”About average right now.”Neutral
no-baseline”No typical baseline yet.”Neutral
insufficient-data”Once there’s enough history…”Neutral (info hint)
The callout body always shows the raw current count alongside the typical median:
3 bikes vs ~5.2 typical for 9 am on Wednesday.

History Requirements

The typical profile uses different day-of-week resolution depending on how much history has accumulated:

≥ 21 days of history

The profile is filtered to matching days of the week. The callout reads “Typical Monday”, “Typical Tuesday”, etc.

3 – 20 days of history

The profile uses all days combined. The callout reads “Typical (all days)” and notes how many days are covered.
With fewer than 3 days of data the callout shows an informational hint explaining that a baseline needs at least 3 days of polling to establish. No charts or verdicts are shown yet.

Activity at This Station

A filtered ActivityLog shows only the departures, arrivals, and inferred trips that started or ended at this station. It reads from the same rolling 200-event / 50-trip buffer as the Explore view, but applies a stationFilter so only this station’s events appear. Clicking any trip row opens the TripRouteModal for an animated single-trip replay.

Top Routes · 30 Days

The TopRoutesSection displays two lists side by side from the 30-day popularity rollup (useRoutePopularity):

Top destinations from here

The 5 stations most frequently reached from this station. Shows ride count and mean duration in minutes. Clicking a row opens Route Check for that pair.

Top origins arriving here

The 5 stations from which riders most often arrive at this station. Same format. Clicking opens Route Check for the reverse direction.

Nearby Stations

The bottom of the page lists the 5 closest stations by straight-line distance (Haversine formula), sorted ascending. Each row shows:
  • Station name
  • Distance in feet (< 0.1 mi) or miles
  • Live bike count
  • Open docks / total docks
  • Details → link to /station/:stationId/details for that station

Switching Stations

Use the ← Back to live map link at the top of the page to return to / with the current station popup open. To switch to a different station, either:
  1. Navigate back to the live map and click another pin
  2. Edit the :stationId segment in the URL directly
  3. Click a Details → link in the Nearby Stations list

How to Use Station Details

1

Open a station

Click any station pin on the Live Map and select Open details → in the popup, or navigate directly to /station/:stationId/details.
2

Check the live card

Look at the hero card for current bike and dock counts. The sparklines show the last 24 hours of hourly averages — hover them to see the average for a specific hour.
3

Read the today chart

The today chart shows this station’s full 2-minute-resolution availability since midnight. Use it to spot patterns within the current day.
4

Interpret the typical callout

The callout tells you whether right now is better or worse than usual. “Fewer bikes than typical” means this station is more depleted than it normally is at this time of week.
5

Review top routes

Check the Top Routes section to see where riders normally go from here and where they arrive from. Click any row to open Route Check for that pair.
6

Find an alternative

If this station is empty, scroll to Nearby Stations and find the closest one with bikes available. Click Details → to jump to its page.

Data Sources

SectionSource
Live counts, station metadatauseLiveSnapshot (KV, 60 s poll)
Today chartuseStationOverTime + StationTodayChart (parquet via DuckDB-WASM)
Typical comparisonfetchStationTypical (/api/systems/:id/stations/:stationId/typical)
Activity loguseActivity (KV rolling buffer)
Top routesuseRoutePopularity (R2 popularity rollup)
Travel-time matrixuseTravelMatrix (R2 JSON)
Route polylinesuseRouteCache (R2 GeoJSON)

Live Map

Return to the full map and open any other station’s popup.

Route Check

Plan a ride from or to this station with linked availability charts.

Explore

System-wide analytics including the travel-time matrix and popular routes.

Flow Map

See this station’s trips animated in the 24-hour flow view.

Build docs developers (and LLMs) love