# byronxlix/massachusetts-high-school-enrollment-projections architecture

> Architecture diagram of the GitHub repository byronxlix/massachusetts-high-school-enrollment-projections, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/byronxlix/massachusetts-high-school-enrollment-projections
- Repository: https://github.com/byronxlix/massachusetts-high-school-enrollment-projections

## Overview

This repository is a Massachusetts county-level enrollment projection pipeline: ACS grade-enrollment estimates are transformed into historical cohorts, survival ratios, weighted ratios, and recursive 2025–2029 projections, then checked and presented for planning. The README documents the dashboard’s county, grade, and QA views. The main script excerpt shows input preparation, interpolation, ratio calculations, projection logic, output writes, and QA; links among stages also rely on the README’s stated workflow because the script excerpt is incomplete.

Main entry points: [`enrollment_projection.py`](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/enrollment_projection.py) (Quality Assurance), [`data/processed/weighted_cohort_survival_rates.csv`](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/data/processed/weighted_cohort_survival_rates.csv) (Weighted Ratios), [`output/high_school_enrollment_projections_2025_2029.csv`](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/output/high_school_enrollment_projections_2025_2029.csv) (High School Projections), [`dashboard`](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/tree/main/dashboard) (Power BI Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["ACS Inputs"]
  node_raw_data["Raw ACS Tables"]
end

subgraph group_analysis["Projection Analysis"]
  node_prepare["Clean Enrollment"]
  node_historical["Historical Cohorts"]
  node_interpolate["2020 Interpolation"]
  node_csr["Cohort Ratios"]
  node_wacsr["Weighted Ratios"]
  node_project["Recursive Projections"]
end

subgraph group_outputs["Results and QA"]
  node_final_output["High School Projections"]
  node_qa["Quality Assurance"]
  node_qa_flags["WACSR QA Flags<br/>[wacsr_qa_flags.csv]"]
end

subgraph group_presentation["Planning Views"]
  node_dashboard["Power BI Dashboard"]
end

node_census(("ACS Census"))
node_planning(("Enrollment Planning"))

node_census -->|"provides tables"| node_raw_data
node_raw_data -->|"loads and cleans"| node_prepare
node_prepare -->|"reshapes data"| node_interpolate
node_interpolate -->|"creates history"| node_historical
node_historical -->|"calculates ratios"| node_csr
node_csr -->|"weights ratios"| node_wacsr
node_wacsr -->|"applies recursively"| node_project
node_project -->|"saves projections"| node_final_output
node_final_output -->|"checks results"| node_qa
node_wacsr -->|"flags outliers"| node_qa
node_qa -->|"records flags"| node_qa_flags
node_final_output -->|"communicates trends"| node_dashboard
node_qa -->|"summarizes QA"| node_dashboard
node_dashboard -->|"informs analysis"| node_planning

click node_raw_data "https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/tree/main/data/raw"
click node_prepare "https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/enrollment_projection.py"
click node_historical "https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/data/processed/historical_enrollment_2019_2024.csv"
click node_interpolate "https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/enrollment_projection.py"
click node_csr "https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/data/processed/cohort_survival_rates.csv"
click node_wacsr "https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/data/processed/weighted_cohort_survival_rates.csv"
click node_project "https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/enrollment_projection.py"
click node_final_output "https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/output/high_school_enrollment_projections_2025_2029.csv"
click node_qa "https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/enrollment_projection.py"
click node_qa_flags "https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/data/processed/wacsr_qa_flags.csv"
click node_dashboard "https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/tree/main/dashboard"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_raw_data toneBlue
class node_prepare,node_historical,node_interpolate,node_csr,node_wacsr,node_project toneAmber
class node_final_output,node_qa,node_qa_flags toneMint
class node_dashboard toneRose
class node_census,node_planning toneIndigo
```

## Components

### ACS Inputs

- [Raw ACS Tables](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/tree/main/data/raw): `data/raw`

### Projection Analysis

- [Clean Enrollment](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/enrollment_projection.py): `enrollment_projection.py`
- [Historical Cohorts](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/data/processed/historical_enrollment_2019_2024.csv): `data/processed/historical_enrollment_2019_2024.csv`
- [2020 Interpolation](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/enrollment_projection.py): `enrollment_projection.py`
- [Cohort Ratios](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/data/processed/cohort_survival_rates.csv): `data/processed/cohort_survival_rates.csv`
- [Weighted Ratios](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/data/processed/weighted_cohort_survival_rates.csv): `data/processed/weighted_cohort_survival_rates.csv`
- [Recursive Projections](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/enrollment_projection.py): `enrollment_projection.py`

### Results and QA

- [High School Projections](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/output/high_school_enrollment_projections_2025_2029.csv): `output/high_school_enrollment_projections_2025_2029.csv`
- [Quality Assurance](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/enrollment_projection.py): `enrollment_projection.py`
- [WACSR QA Flags](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/blob/main/data/processed/wacsr_qa_flags.csv): `data/processed/wacsr_qa_flags.csv`

### Planning Views

- [Power BI Dashboard](https://github.com/byronxlix/massachusetts-high-school-enrollment-projections/tree/main/dashboard): `dashboard`

### Other components

- **ACS Census**
- **Enrollment Planning**

## Connections

- ACS Census → Raw ACS Tables: provides tables (evidence: `README.md`)
- Raw ACS Tables → Clean Enrollment: loads and cleans (evidence: `enrollment_projection.py`)
- Clean Enrollment → 2020 Interpolation: reshapes data (evidence: `README.md`)
- 2020 Interpolation → Historical Cohorts: creates history (evidence: `README.md`)
- Historical Cohorts → Cohort Ratios: calculates ratios (evidence: `README.md`)
- Cohort Ratios → Weighted Ratios: weights ratios (evidence: `README.md`)
- Weighted Ratios → Recursive Projections: applies recursively (evidence: `README.md`)
- Recursive Projections → High School Projections: saves projections (evidence: `enrollment_projection.py`)
- High School Projections → Quality Assurance: checks results (evidence: `README.md`)
- Weighted Ratios → Quality Assurance: flags outliers (evidence: `README.md`)
- Quality Assurance → WACSR QA Flags: records flags (evidence: `README.md`)
- High School Projections → Power BI Dashboard: communicates trends (evidence: `README.md`)
- Quality Assurance → Power BI Dashboard: summarizes QA (evidence: `README.md`)
- Power BI Dashboard → Enrollment Planning: informs analysis (evidence: `README.md`)
