Esquire Theme by Matthew Buchanan
Social icons by Tim van Damme

05

Feb

The Amazing Shrinking Student to Teacher Ratio | Fun With R

After hearing about R for years, I decided to go out and give it a try. And, with a solution in search of a problem, I set out to find some interesting data to use. After spending a few minutes on data.gov, I ended up on the National Center for Education Statistics website, and chose the following dataset: “Public and private elementary and secondary teachers, enrollment, and pupil/teacher ratios: Selected years, fall 1955 through fall 2019”.

I selected this topic for three reasons. First, I wanted to use a simple dataset to teach myself R. Second, I’m an avid newsreader, and have read hundreds of articles about everything that’s wrong with our education system: unions, standardized testing, No Child Left Behind, classroom size, and so on. Lastly — in spite of #2 — I know very little about the hard data behind the education debate.

In any case, if you had asked me “has the student/teacher ratio increased or decreased over the past 40 years?” and forced me to guess, I would have predicted that the ratio has ballooned over the past 40 years. That couldn’t be further from the truth.

Here’s a time-lapse bar chart that runs from 1955 to 2009, with projections for 2010 through 2019. Note that some data in the 50’s and 60’s were interpolated. I think this chart tells the whole story without commentary. (Sorry for the 1996-esque animated GIF here… I’m just getting started with R.)

To do the animated GIF, I used a great package from ImageMagick. If there are any other brave folks out there trying to do something similar, here’s my R source code:

  1. emchennyc reblogged this from dfkoz
  2. dfkoz posted this