How cosmoswems/api-data-retrieval-analysis-v2 works
This Shiny dashboard guides users from OpenAQ station discovery through measurement retrieval, analysis, and export, while also supporting direct CSV analysis and batch processing. Its UI and server provide the app boundary; helper modules cover API, data, plots, and batch operations. The README documents the major features and user workflow, but server.R and most helpers were not excerpted, so implementation-level wiring is not asserted beyond those documented relationships.
Main entry points: server.R Reactive server · batch_helpers.R Stack and merge · ui.R Shiny interface · theme.js Theme toggle
Components 17
Dashboard
- Shiny interface
ui.R - Reactive server
server.R - Session reset
server.R - Theme toggle
www/theme.js - Theme styles
www/styles.css
OpenAQ Data
- OpenAQ API
- Station discovery
R/api_helpers.R - Measurement retrieval
R/api_helpers.R - Data preparation
R/data_helpers.R
Analysis
- Openair analysis
server.R - Plot helpers
R/plot_helpers.R - CSV analysis input
server.R
Batch and Export
- Stack and merge
R/batch_helpers.R - Batch QC and plots
R/batch_helpers.R - Data and plot export
server.R - Sample dataset
sample_data/sample_aq_met_data.csv
Other components
- Dashboard user
Connections 17
- Dashboard user → Shiny interface: uses
README.md - Shiny interface → Reactive server: drives
README.md - Reactive server → Station discovery: searches
- Reactive server → Measurement retrieval: requests measurements
- Station discovery → OpenAQ API: queries
- Measurement retrieval → OpenAQ API: retrieves data
- Reactive server → Openair analysis: runs plots
README.md - CSV analysis input → Openair analysis: supplies CSV
README.md - Openair analysis → Plot helpers: uses
- Reactive server → Stack and merge: dispatches processing
README.md - Stack and merge → Batch QC and plots: provides QC and plots
README.md - Stack and merge → Openair analysis: sends assembled data
README.md - Reactive server → Data and plot export: offers downloads
README.md - Reactive server → Session reset: clears session data
README.md - Dashboard user → Theme toggle: changes theme
README.md - Theme toggle → Theme styles: applies classes
- Dashboard user → Sample dataset: can upload