Skip to content

Latest commit

 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metrosp explorer

Live app License: MIT Built with R Shiny Data: metrosp

An interactive dashboard for exploring passenger demand on the São Paulo metro, built with Shiny on top of the metrosp R data package. The interface is in Portuguese.

Try the live app — deployed on Posit Connect Cloud.

The app is standalone: it lives in its own repository and deploys separately from the data package.

Features

  • 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.
  • Interactive map — metric views for 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 to each station's series.
  • Dataset downloads — the package datasets verbatim, in CSV / Excel / GPKG / GeoJSON.

Run locally

Start the app from the repository root.

shiny::runApp(".")

Dependencies

renv manages the dependencies. The lockfile (renv.lock) pins every package to an exact version and source, and it takes metrosp from r-universe because v1.1.1, which adds station_inauguration, is ahead of CRAN.

After cloning, restore the project library.

renv::restore()

Deploy

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.

Posit Connect Cloud (git-backed)

Connect Cloud publishes straight from this public GitHub repo. When it detects renv.lock, it calls renv::restore() to install the packages, including metrosp from r-universe. manifest.json stays tracked for app-type metadata, and no rsconnect push is required.

Classic Posit Connect / shinyapps.io

rsconnect::deployApp(appName = "metrosp-explorer")

Updating the lockfile

After adding or upgrading packages, re-snapshot and commit the lockfile.

renv::snapshot()

Data source

Demand data, line/station geometries, and inauguration dates come from the metrosp package (documentation, r-universe v1.1.1). The STL trend overlay uses trendseries.

License

MIT © Vinicius Oike

About

Interactive dashboard for exploring passenger demand on the São Paulo metro, built with Shiny + bslib

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages