# sidneyj475/schedule-analysis architecture

> Architecture diagram of the GitHub repository sidneyj475/schedule-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-02-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sidneyj475/schedule-analysis
- Repository: https://github.com/sidneyj475/schedule-analysis

## Overview

##### Project type and purpose
- This is an R-based data analysis and interactive reporting project (not a multi-service full-stack app).
- Purpose: analyze NBA schedule difficulty (travel burden, rest patterns, competitive balance) from 2014–2024 and present results in an interactive HTML report.

##### File structure
- Top level contains:
- README.md – describes the project, findings, and tech stack
- schedule_project.Rmd – the single RMarkdown document that drives ingestion, analysis, modeling, and visualization
- No additional folders or services; the architecture is essentially a data-pipeline + reporting engine.

##### README for additional insights
- Technologies: R, tidyverse (dplyr, tidyr), ggplot2, plotly, statistical modeling
- Outputs: interactive visualization tool (HTML with embedded Plotly charts) identifying rest/ travel metrics and optimal rest periods.

a. Main components
- Data Sources – raw NBA schedule, travel distances, win/loss records
- Data Ingestion & Wrangling – R scripts (tidyverse code blocks inside the .Rmd)
- Statistical Modeling – R code that fits models for schedule difficulty metrics
- Visualization Layer – ggplot2 → static plots, plotly → interactive components
- Rendering/Report Engine – RMarkdown knitr engine that combines narrative, code, and visuals into an HTML report
- End-User Interface – web browser displaying the interactive HTML

b. Relationships / data flows
1. Data Sources feed into Data Ingestion & Wrangling
2. Cleaned data is passed to Statistical Modeling
3. Model outputs feed into the Visualization Layer
4. Visuals are embedded in the RMarkdown report by the Rendering Engine
5. Final HTML is served to / opened by the End-User Interface

c. Architectural patterns / design principles
- Single-artifact deployment: one .Rmd produces a self-contained HTML
- Separation of concerns: data prep, modeling, and presentation each occupy distinct code sections

d. Relevant technologies / libraries
- R language runtime
- tidyverse for data manipulation
- ggplot2 for plotting
- plotly for interactivity
- knitr / rmarkdown for report generation

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["Project Overview & Findings\n(README.md)"]:::doc
    B[(Data Sources)]:::dataSource
    C["Data Ingestion & Wrangling\n(tidyverse)"]:::processing
    D["Statistical Modeling\n(R models)"]:::processing
    E["Visualization Layer\n(ggplot2 & plotly)"]:::visualization
    F["Rendering/Report Engine\n(knitr/rmarkdown)"]:::reporting
    G["End-User Interface\n(Web Browser)"]:::external

    A -.-> B
    B --> C
    C --> D
    D --> E
    E --> F
    F --> G

    click A "https://github.com/sidneyj475/schedule-analysis/blob/main/README.md"
    click B "https://github.com/sidneyj475/schedule-analysis/blob/main/schedule_project.Rmd"
    click C "https://github.com/sidneyj475/schedule-analysis/blob/main/schedule_project.Rmd"
    click D "https://github.com/sidneyj475/schedule-analysis/blob/main/schedule_project.Rmd"
    click E "https://github.com/sidneyj475/schedule-analysis/blob/main/schedule_project.Rmd"
    click F "https://github.com/sidneyj475/schedule-analysis/blob/main/schedule_project.Rmd"

    classDef dataSource fill:#c2f0c2,stroke:#2f6627,stroke-width:1px
    classDef processing fill:#cce5ff,stroke:#034f84,stroke-width:1px
    classDef visualization fill:#ffe0bd,stroke:#b35900,stroke-width:1px
    classDef reporting fill:#ffd699,stroke:#e68a00,stroke-width:1px
    classDef doc fill:#f9f0c2,stroke:#b38f00,stroke-width:1px
    classDef external fill:#e8e8e8,stroke:#888888,stroke-width:1px
```
