Zach Schroeder
  • Projects
  • Dashboards
  • Blog
  • Publications
  • About
  • Résumé

Minnesota School Districts: Attendance, Graduation, and Changing Enrollment

SQL
DuckDB
R
Tableau
data pipeline
education data
GIS
A SQL pipeline and two interactive Tableau dashboards covering 13 years of state and federal education data for Minnesota’s 329 regular school districts.
Published

October 15, 2026

In brief. Minnesota publishes graduation, attendance, and enrollment data for every school district, but in separate files that change layout, naming, and ID formats from year to year. I built a SQL pipeline (DuckDB, run from R) that pulls 13 years of these files into one clean, documented dataset with automated QA checks, then built two interactive Tableau dashboards on top of it: one for attendance and graduation trends, and one for how each district’s student population has changed.

329 districts13 school yearsSQL (DuckDB)RTableauautomated QA checksGitHub

Attendance and graduation

Click a district on the map to see its consistent attendance and four-year graduation rates over time. With nothing selected, the chart shows the enrollment-weighted average across all regular districts.

Changing student population

Pick a student group, a measure (number of students, share of enrollment, or percent growth), and a time frame to see how each district’s enrollment has shifted. Switch to Year by year to step through one year at a time.

View on Tableau Public Data and code on GitHub

The data

  • Graduation: four-year graduation rates by district and student group, Minnesota Department of Education (MDE).
  • Attendance: consistent attendance (the share of students who attend more than 90% of their enrolled days), from MDE’s North Star accountability files.
  • Enrollment: district enrollment by race/ethnicity and sex from the NCES Common Core of Data, pulled through the Urban Institute’s Education Data Portal.
  • Boundaries: school district boundaries from MDE (2025–26), dissolved from attendance areas to districts in R.

The cleaned datasets (one row per district, year, and student group, plus district boundaries) and all of the code that builds them are on GitHub.

The dashboards cover regular public school districts only (no charter schools or intermediate districts). Years refer to the spring of each school year, so 2025 means 2024–25.

What I did

Loading. A set of SQL scripts reads about 45 Excel and CSV files directly into DuckDB. The state’s files were not consistent over time: graduation files switched column layouts partway through the series, attendance files overlap across accountability years, and district IDs changed format in 2016. Each of those quirks is handled explicitly in the staging step rather than patched by hand.

Staging and joining. Everything is reshaped to one row per district, year, and student group, joined on a single district key, and enriched with rates, enrollment shares, and year-over-year changes (window functions). Values the state suppresses to protect small groups stay missing rather than turning into zeros.

QA. Every run ends with eleven automated checks: duplicate keys at each stage, student-group labels that don’t map to the crosswalk, totals that disagree across files (for example, enrollment by race summing to the district total), rates outside 0–100, and district-years with no matching enrollment record. The pipeline flags any failures before export, and the whole thing reruns from about 45 raw files with one command in R.

Dashboards. In Tableau, the state averages are weighted by enrollment so that small districts don’t count as much as Minneapolis or Anoka-Hennepin. Clicking a district filters the trend chart through a dashboard action, and the population map uses parameters and level-of-detail calculations so viewers can compare any two years or step through them one at a time.

Notes and limitations

  • The 2019–20 and 2020–21 school years were disrupted by COVID-19 and are shaded on the trend chart; consistent attendance was not reported for those years.
  • Because the state averages here include regular districts only, they may differ slightly from MDE’s official statewide figures.
  • Small districts and small student groups produce volatile percentages; the counts in each tooltip help put them in context.

© 2026 Zachary J. Schroeder. Built with Quarto.

 
  • Google Scholar