
Quick Tutorial: How to Analyze Purple Book School Staffing with Claude
Prompted from a comment by u/Nomadic_Houseplant that their 2nd grade was going to have a class ratio of 28:1, far above the WSS ratio, it occurred to me that folks might want to dice their own purplebook data. In the past, I've written custom parsers, but that's not super accessible. So let's see how to do this with Claude really fast!
First, you download the purplebooks you want from SPS's website. I usually seach "SPS Purple book 2026" and the first link has it.
Then I opened up claude and uploaded the file gave it this prompt:
This is the "Purple book" for SPS district. After the intro text, it is a
repeated format listing funding and staffing allocations per school.
I want you to go through all Elementary Schools (first section of schools) and
for each school:
(1) Projected enrollment for K-3, and 4-5 cohorts
(2) find #FTE of Teacher K-3 and #FTE of Teacher 4-5
(3) Produce me a table of # students per FTE for both cohorts for each school.
Sort the table in order of highest # students per FTE.
This produced a table like the following
Initial Table view of Elementary ratios based on Claude data
Next, I downloaded the two prior year purple books and uploaded them with the following prompt
here are the last 2 years data. Please add to table for comparisons with the current
year. Sorting should be done by current year data.
and yes, I don't bother copy editing my prompts. (It's not really understanding the grammar directly anyways :P). That created an artifact the following where you can see ratios over the years. It's informative to look at best and worst average student teacher ratio. Here it is sorted by worst ratio
3 years of purplebook ratio data put side by side sorted by worst student/teacher ratio in K-3
Here it is sorted by best ratio where you can see shuffling around of FTE along with some dramatic improvements in certain schools
3 years of purplebook ratio data put side by side sorted by best student/teacher ratio in K-3
Of course some of this seems nonsensical. The original comment prompting this was citing two 28-children classrooms this year in the allocation model. So, let's ask claude to do more. Next prompt was
For each school in each year, attempt to assign the teacher FTE to the grade-levels
of students. Create a table of the results and highlight any situation that ends
up causing a grade to get over target ratio listed in their purplebook.
This produced a graph that is starting to show some interesting things but which also has numbers that seem insane (48 students to one teacher in North Beach 4th grade? No way)
AI Attempt to assign teachers to classes to produce class-ratios per grade
So I fed this back into claude and had a dialogue with 4 more prompts (mid-point artifact elided)
some of these ratios seem impossibly high. 48:1 and 45:1 seem impossible. Update your
assignment logic. Also ensure that the total assigned per grade sums to the right FTE
from the purplebook for the school.
does that mean they have to create a split class?
can you update the highlight background to get more intense as the over-targeting gets
worse? And can you ensure you are using a color-blind friendly colorscheme?
make this into a single standalone html publishable artifact
Add big caveat that is an AI guess and may be entirely wrong.
The final result was a graph that looked this like the following:
Final chart of AI assignments for grade levels
Some of these still seem insanely high (eg 39:1 in Concord for 5th grade), but as an exploration tool, it can guide focus for questions.
Anyways... point is, if you want to crunch data, you can use AI to help produce these things. But, unless you've verified it is doing the right thing, use it as a way to think of new questions instead of as a definitive analysis. Cause I really don't think we have so many 36:1 teaching ratios across the board.
Here is the final artifact with the AI attempt to assign teacher to grades (low confidence in correctness):
https://claude.ai/public/artifacts/44b7b0aa-2c8e-496b-8e34-ed99af0cefb5
Here is the initial Visual Table for just one year (medium confidence in correctness):
https://claude.ai/public/artifacts/a86bbe47-f5ec-4b62-8c92-62a81e06975c
And here's the multi-year variant:
https://claude.ai/public/artifacts/b16138de-a86d-4998-b2ba-ea99254fad13