How kaifranke/gophhitterapp works
Project type and purpose
• This is an R‐based interactive data application (likely a Shiny app) called “Gopher Hitter.”
• It ingests TrackMan pitch data (Data10122023.csv), applies three predictive models (StrikeMod, xBAmodel, xwOBAmodel), and presents results via hitterApp.R (the main app script).
File structure
• Top‐level files:
• Data10122023.csv – raw data source
• hitterApp.R – contains all UI and server logic (the “frontend” and “backend” of the app)
• StrikeMod, xBAmodel, xwOBAmodel – each folder or script holds one statistical model or module
• README.md – describes project components (and possibly an image asset UMN.png if added)
• No separate “src/” or “lib/” directory: all code lives at top level.
README for additional insights
• README enumerates each piece: data file, model modules, main app script, and an optional logo.
• No mention of databases or external APIs; data is local CSV.
a. Main components:
• Data Source (CSV file)
• Modeling Modules (StrikeMod, xBAmodel, xwOBAmodel)
• Application Logic (hitterApp.R – server functions, reactive pipelines)
• User Interface (UI code inside hitterApp.R)
• Optional Asset (UMN.png)
• Hosting Environment (e.g., Shiny Server or RStudio Connect)
b. Relationships and interactions:
1. At startup, hitterApp.R reads Data10122023.csv.
2. Data flows into each model module (StrikeMod, xBAmodel, xwOBAmodel) for feature computation or predictions.
3. Model outputs are returned to the app’s reactive framework.
4. UI renders tables, plots, or summaries using the model results plus any static asset (UMN.png).
5. The hosting environment serves the UI to end users.
c. Architectural patterns / design principles:
• Modular code separation: each model in its own script/folder.
• Single‐page interactive web app (Shiny) with clear UI/Server separation.
• Data‐in → compute → render output reactive loop.
d. Relevant technologies and libraries:
• R / Shiny (ui.R / server.R or single‐file app pattern)
• Statistical modeling packages (e.g., data.table, dplyr, ggplot2, caret)
• Hosting: Shiny Server or RStudio Connect