An interactive dashboard for exploring passenger demand on the São Paulo metro, built with Shiny on top of the metrosp R data package.
This is a hosted standalone app: it lives in its own repository and is deployed separately from the data package (it is not shipped inside it).
- Line-level demand — monthly entrance/transported series per line, with KPIs and an optional STL trend overlay.
- Per-station series — monthly weekday averages and daily counts, with ramp-up shading around each station's inauguration.
- Interactive map — four metric views: yearly demand with an animated year slider, year-over-year change, recovery vs. 2019, and the network by line. Station popups show KPIs and link straight to each station's series.
- Dataset downloads — the package datasets verbatim, in CSV / Excel / GPKG / GeoJSON.
From the repository root:
shiny::runApp(".")Dependencies are managed with renv. The
lockfile (renv.lock) pins every package to an exact version and source.
metrosp is pinned to r-universe
because v1.1.1 (which adds station_inauguration) is ahead of CRAN.
After cloning, restore the project library with:
renv::restore()The repository root is the app, in Shiny's multi-file layout: global.R
(libraries, data prep, helpers, theme — sourced once at startup), ui.R,
server.R, www/, and a committed manifest.json. It
deploys as a unit.
Connect Cloud publishes straight from this public
GitHub repo. When it detects renv.lock, it calls renv::restore() to install
packages — including metrosp from r-universe. manifest.json is still tracked
for app-type metadata; no rsconnect push required.
rsconnect::deployApp(appName = "metrosp-explorer")After adding or upgrading packages, re-snapshot and commit:
renv::snapshot()Demand data, line/station geometries, and inauguration dates come from the metrosp package (r-universe v1.1.1). The STL trend overlay uses trendseries.
MIT © Vinicius Oike