I love the AV Club, probably to an unhealthy extent. It’s one of my favorite little corners of the internet – one where people swap Twin Peaks references and write thousand-word diatribes on the odd prevalance of architects in romantic comedies.
It’s also a potential data source ripe for amateur analysis: the AV Club staff reviews a surprising number of shows on a weekly basis, assigning a letter grade to the writeup. Since this data is linked to the author and the show itself – and has some built-in granularity, given that series come in seasons and episodes – I thought it would be fun to try and scrape all the data and look at some big-picture analysis about the grades being assigned. 1
And, similarly to one of my earlier posts about analyzing Pitchfork grades, I thought that looking at all of their television reviews would be a fun way to spend an afternoon.
Scraping the data wasn’t too bad, though I learned an important lesson about the follies of deduping pages based solely on the URL 2. I thought the most salient piece of information would be a simple breakdown by grade:
import pandas as pd import json import vincent data = filter(lambda r: r.get('grade') != '-' and len(r.get('season')) == 1, map(json.loads, open('outy.txt').readlines())) data = pd.DataFrame(data) grades = data.groupby('grade').count()['date'] vis = vincent.Bar(grades)
Keeping in mind that this is a uniform weighting of all reviews, the results are somewhat surprising: the graph is centered around a B+, with a pretty rad bell curve on either side.
If you can’t tell, there’s like a one-pixel sliver for A+, which made me curious as to what received the vaunted grade. Turns out, not exactly what I’d expect:
print data[data['grade'] == 'A+']
- Two episodes of Curb Your Enthusiasm
- An episode of Undeclared
- The season two finale of West Wing 3
- And, uh, a random episode from the ninth season of American Idol
What about a show-by-show breakdown of average grades? (Apologies for if this breaks your browser):
# Sort shows by average grade def grade_count(grade): return ['A+', 'A', 'A-', 'B+', 'B', 'B-', 'C+', 'C', 'C-', 'D+', 'D', 'D-', 'F'][::-1].index(grade) data['grade'] = [grade_count(g) for g in data['grade']] actual_shows = (data.groupby('show').count()['show'] > 3).values actual_shows = data.groupby('show').mean()[actual_shows]['grade'].order() vis = vincent.Area(actual_shows)
So this is a very pretty graph that tells us more or less what we already know: there are a handful of very good shows (the peak on the far right), a handful of awful ones (far left), and a pretty balanced spectrum of everything in between. What are those outliers specifically?
- On the truly abhorrent side of television, we have Hostages, The Following, Heroes, Low Winter Sun, and V. Which pretty much all make sense, though I have a special place in my heart for the first season of Heroes. 4
- When it comes to transcending television, we have Luck, The Shield, Seinfeld, Generation Kill, and The Wire. Naturally, this leads us to the groundbreaking relevation that HBO produces a lot of critically acclaimed television.
It’s also relatively painless to test the evergreen theory that reviewers get softer over time, by graphing average grades over time:
data['year'] = [int(d.split()[-1]) for d in data['date']] years = data.groupby('year').mean() vis = vincent.Line(years)
Looks like there’s a slight downward trend, but nothing worth noticing. (The other, more likely, possibility is that the review staff has expanded and taken in a wider breadth of regularly reviewed shows, including some worse ones.) 5
And, lastly, we can get a pleasant trajectory of television quality by graphing grades on a season-by-season basis:
grades = data.groupby('season').mean()['grade'] vis = vincent.Line(grades)
What’s interesting here is how well the grades match the general narrative: great shows usually take a season or two to work out the jitters 6 and then enjoy a few golden years before a state of general decline.
- The AV Club maintains that there aren’t any real significance to the grades, but that’s no fun. [return]
- I’ll give you a hint – one of the many, many URLs
scrapyran into was “http://www.avclub.com/search?feature_types=tv-club&page=1&page=2&page=3&page=4". [return]
- For my money, the best two hours of television ever produced. [return]
- Perhaps more accurately, I have a special place in my heart for Hayden Panettiere. Or, rather, I did before she started dating Milo Ventimiglia, which is weird. [return]
- Or, perhaps, television is slowly but surely getting worse. Judging by a linear regression of this graph, by ~2063 television will be, on average, a D-. [return]
- Exhibit A: Parks and Recreation. [return]