Map Quest: Nashville Residential Building Permits

Strap on your tool belt, we’re talkin’ ’bout building permits! Specifically, we’re dipping our toes into the building of new homes in Nashville, Tennessee, where we mourn the loss of former resident Swizzle Stick to the Big Apple. Bye, Tay-Tay!

Nashville’s real estate market has been on fire the last few years, and there’s much discussion in the local media about how the rising sales prices and rents are affecting the growing population. Looking at building permit data, specifically permits for new residences (not demolitions or rehabs, which would be interesting to see) would… permit me… to accomplish a few things:

  1. Use Nashville’s public data web site
  2. See if information on building permits coincides with the fastest growing Nashville neighborhoods
  3. Broaden my R knowledge by trying to make a map.

I’ve been getting pretty good at making charts in R, but whenever I’d see some egghead make an awesome map, I’d get envious. Learning that R demi-god Hadley Wickham has co-developed a package within R to make maps, using ggmap (the package) and Nashville data was a no brainer.

Without further ado, here’s where building permits for new residences have been distributed in Nashville. The lighter the blue, the more permits in that area.


If you’re familiar with neighborhoods in Nashville, most new residences seem to be in East Nashville and southwest of downtown. Let’s focus in closer to downtown.


Now we can really see the density of building permits for new residences in East Nashville, as well as the Hillsboro/12South (south of downtown) and Sylvan Park/West Nashville areas. This isn’t too surprising. We could look at these last two places, but let’s take one more zoomed in look at yuppie/hipster central, East Nashville.


Everyone is trying to build as close to Five Points as possible (without going west of Gallatin Pike).

The locations of new residential building permits show where homeowners and investors are remaking Nashville’s housing supply. It doesn’t explain the consequences of this building – the gentrification, huge rents, and traffic (to name a few) – but it does confirm that people trying to live in the city are trying to move to the same three or four areas.

(Code and data located here.)

Posted in Current Events | Tagged , , , , , , , , | Leave a comment

Frank Wren’s Firing: Looking At The Braves Through A New (To Me) Metric

While the Major League Baseball playoffs have been amazing so far, the Atlanta Braves’ 2014 season is mercifully over. After a quick start to the season (17-7), they finished three games under .500 and 17 games back from the division leader.

Oh, boy, was Atlanta’s offense terrible. They scored the second fewest runs in the majors and struck out the fourth most. It was painful to watch BJ Upton swing and miss so much. (His brother, Justin, only struck out two fewer times than BJ, although Justin can connect when he actually hits the ball.)

The general manager Frank Wren, the hand-picked successor of John Schuerholz, took the fall. (Schuerholz is considered the brains, along with manager Bobby Cox, of the Braves’ 1990s success.) He was fired after seven years on the job by… John Schuerholz. Who chose Frank Wren’s replacement, John Hart, a friend of John Schuerholz? Mmm, John Schuerholz. But we’re not here to talk about John Schuerholz.

Wren just had too many bad signings and dead money during his tenure. His decisions have been chronicled in depth here by Braves blog Talking Chop, so I’ll just look at the bottom line: Money and Wins. How much value did Frank Wren wring out of Atlanta’s rising salary?

We’re going to look at it by seeing how much he paid per win by doing a simple calculation: team salary divided by wins. To put the Braves’ performance in more context, we’ll compare them with the 2014 National League playoff teams: Los Angeles, Pittsburgh, San Francisco, St. Louis, and Washington. We’ll start by looking from 1988 through 2014, as far back as USA Today’s salary database goes.

Salary Per Win, 1998-2014

Every team is paying more per win these days. The revenue explosion in baseball (mostly from TV money), plus a strong players union, sees to that. The Dodgers, always big spenders, have outdone themselves since 2012. Their division rivals, the Giants, have been trying to keep up, and have won two World Series’ recently in 2010 and 2012.

Although this is interesting, the statistic doesn’t “normalize” the value of the win. How do we go about comparing salary per win when salaries are constantly rising?

The method I have taken is to compare the salaries and wins according to how well the teams do versus a .500 club with the same salary. Basically, how does their salary/win ratio per season compare against a team with the same salary that won 81 games? By then finding the percent change of the 81-win ratio from the actual ratio, we’ll be able to compare a team’s success (success in this instance being salary/win) from year-to-year.

Salary/Win Ratio vs Wins

The above plot show how this new relationship works. As a team becomes better than 81 wins (a .500 winning percentage), the salary/win value increases versus the 81-win team.

Braves Value vs 500 team

Focusing on just the Braves, Wren was extracting a lot of value out of the team from 2009-2012. It was a strong improvement over the last five years of the Schuerholz era. One could even interpret Wren’s firing after this season as a bit harsh. However, the bad free agent signings, a listless team, and some tension in the front office led to Atlanta’s upper management pulling the plug.

(Note: Not sure if what I did is really “new.” Baseball stats are sliced and diced so often, it’s hard to know what is original and what isn’t. Code and data on Github here.)

Posted in Sports & Leisure | Tagged , , , , , , , , | Leave a comment

Oberlin College: Not A Football School

Oberlin College football point differential

Oberlin College in Oberlin, Ohio, is not a football powerhouse.

Oberlin College in Oberlin, Ohio, is not a football school. It has a football team, the Yeomen, but it seems they will never approach the success of Division III powerhouse Washington & Jefferson College or Yeowoman-in-Chief Lena Dunham.

Which is good for my alma mater, the College of Wooster. COW was beaten up two Saturdays ago by the Washington & Jefferson Presidents 51-17, the same score as their loss to W&J in 2013, 58-21. An easy victory is needed for the Fighting Scots, who have now lost their season opener six years in a row.

Oberlin is a punching bag for the North Coast Athletic Conference, of which Wooster is a part. They have averaged only three wins a season since 2000 and haven’t gotten to 5 wins (a .500 winning percentage in the 10-game season) since 2007.

Oberlin football attendance

Oberlin’s home crowds are usually small compared to what they face on the road

The lack of interest in Yeomen football is seen in their attendance totals. While ticking up lately, the home attendance is usually much lower than what they face on the road. A tradition of losing and no home field advantage does not bode well for success. Their English department is pretty good, though.

Wooster has only lost once to Oberlin in their eleven meetings since 2000, and that was in 2003. Tomorrow’s game against the Yeomen is looking favorable for the Scots. Hopefully they can take advantage.

Posted in Sports & Leisure | Tagged , , , , , , , , | Leave a comment

College of Wooster Football: Stay Lucky in 2014?

2012 was a bad year for the College of Wooster tackle football team. The Fighting Scots bottomed out at 2-8, steadily declining each year since an 8-2 record in 2008. After hiring a new coach, they rebounded in 2013 at 7-3.

Wooster Football Winning Percentage

The first half of 2012 wasn’t actually that bad, despite starting off 1-4. They lost those four games by a total of 24 points. In Week 6 they bounced back and beat up Hiram 45-14, but then the finished on a down note, losing their last four games by a combined 69 points.

The 7-3 record last year actually hides the fact they weren’t as good as they were in previous winning seasons. Their overall point differential (Points Scored – Points Allowed) was actually negative. Since 1999, Wooster has had an impressive 10 winning seasons, and 2013 is the only one in which they gave up more points than they scored.

College of Wooster Football Point Differential, 1999-2013

They were crushed in their three losses in 2013 by an average of 34 points, while winning by an average of 12. They got lucky in two of their last three games (all victories), beating Kenyon by 10, while outlasting DePauw and Ohio Wesleyan by three and one points, respectively.

The 2014 season, which starts this Saturday at Washington & Jefferson College in southwestern Pennsylvania, will be a big year for Wooster. Will the Scots be able to build on a surprisingly successful year, or will they fall back to earth some? They face a tough test in week one. The Presidents – yes, W&J’s mascot is the Presidents – smacked Wooster 58-21 last year, and CoW hasn’t won a season opener since 2008.

Posted in Sports & Leisure | Tagged , , , , , , | 1 Comment

Heath Care Update: Medicaid Enrollment Is Up Where They Want Medicaid

Not surprisingly, Medicaid enrollment is up in states where they want Medicaid.

Since open enrollment for expanded Medicaid coverage started last October under Obamacare the Affordable Care Act, the federal government has been releasing Medicaid enrollment numbers for all 50 states. In the most recent report released August 8, Medicaid enrollment is up in the states that have decided to expand (25 + DC), while in states that didn’t expand Medicaid, enrollment is do- Wait, enrollment is actually up in most of those states, too.

For instance, in Kentucky, an expansion state, Medicaid enrollment is up almost 17% from this time last year. Neighboring Tennessee, which hasn’t expanded, is still up 7%. The word is out on enrolling for health insurance, whether it’s for private plans or Medicaid.

From May to June 2014, six months into expansion, Medicaid enrollment increased nearly everywhere.

Medicaid enrollment May 2014 to June 2014

Even states not expanding Medicaid are seeing their Medicaid rolls grow from month-to-month. (Source: CMS)

Taking a wider view, CMS tracks the enrollment change from before open enrollment (the average of June through September 2013) to June 2014. In expanding states, there has been an 18% increase since last year (6.5 million more people), while non-expanding states have increase 4% (975,000 people). You can see the stark difference in the chart below:

Medicaid enrollment differences from last year to this year

There is a stark difference in Medicaid enrollment between non-expanding states and expanding states. (Source: CMS)

Each dot is a state, and the brighter the dot, the more states are clustered around that percentage. For expanding states, Nevada and Oregon have increased their Medicaid population by over 50%, while the highest non-expanding state is Georgia, by percentage (16%) and population (246,000 more people). You’d think with that much pent up demand in places like Georgia or Florida (223,000 more people), that would move the needle a bit in the state legislatures.

Taking a more detailed dive into the year-to-year change, below shows the type of online health care exchange states are using. The exchange can be both for Medicaid and private insurance.

Health Care Exchange type by Medicaid Expansion

States that are expanding Medicaid are less likely to leave managing their health care exchange to solely the federal government. (Source: CMS)

As you’d expect, the states expanding Medicaid are more likely to be running their own exchange (SBM) or partner with the federal government (Partnership). Non-expanding states usually leave it to the feds to run on their own, or only have a small part of it run by the state. (For example, Mississippi has an exchange for small business health plans that they run.)

These monthly enrollment reports really demonstrate how the politics of the Affordable Care Act through the lens of Medicaid expansion is creating vastly different health care environments for the working poor.

(Code for the plots is on GitHub here.)

Posted in Health Care Reform | Tagged , , , , , , , , , , , | Leave a comment

Justified: Was Season Five Any Good? (Apparently)

Raylan Givens. You swaggering, cowboy hat wearing, US federal marshal. Why are you so awesome? Is it the tight jeans? (For a lot of people, yes, it’s the tight jeans.) The anachronistic, aforementioned cowboy hat and boots? The sly grin? The itchy trigger finger?

Timothy Olyphant plays Raylan, a character created by Elmore Leonard, brilliantly on the FX series Justified, which finished up its fifth season in April. (It’s sixth and final season airs next year.) The show is about Givens, a US federal marshal, who is reassigned to his home state of Kentucky after dealing with a criminal in Miami by, uh, killing him. Back in familiar environs, he spends way too much time mixing it up with the knuckleheads he grew up with in eastern Kentucky in Harlan County. The rest of the cast is full of rich characters (financially, they’re mostly poor), especially the standout Walton Goggins, who plays Raylan’s biggest bugaboo, the smooth talking and verbose career criminal Boyd Crowder. (You could make an argument that Boyd has become the main character over Raylan, or at least they are now co-leads.)

Justified is a great show because it lives up to Elmore Leonard’s name by creating a rollicking, fully spun world of jaded (and wisecracking) lawmen and degenerates. There are a vast array of marshals, corrupt sheriffs, drug dealers, lawyers, hoodlums, hillbillies, prostitutes, thirtysomething blondes (Raylan loves thirtysomething blondes), and various holler royalty all striving for financial security, respect, business opportunity, or to be able to blow off some steam at Audrey’s without the federals getting in their business.

Despite all of this, I thought that the quality of the story dipped some in the fifth season. It was still really entertaining, but the stories of Boyd Crowder and Raylan drifted apart, despite Raylan making the three hour drive to Harlan with improbable frequency. This got me thinking if others thought the same as well. I’ve decided to see if the IMDb user ratings of individual episodes reflected that dip. I’ve also come up with a few hypotheses while I was at it. Let’s see if they are true.

Hypothesis One: Season Two has the highest IMDb ratings; Season 5 the lowest

To my surprise, Justified's IMDb ratings have been increasing since Season 1

To my surprise, Justified’s IMDb ratings have been increasing since Season 1

Verdict? Wrong

Venturing a Guess: Kinda surprised by this. The biggest jump in IMDb ratings was largest between Season 1 and Season 2, so we can assume that is when the show really took off. It featured Margo Martindale in an Emmy-winning performance as Mags Bennett, the cider-brewing, general store-owning head of the Bennett clan and her dumbass adult sons. The Bennetts also happen to control the marijuana trade in Harlan and have a blood feud with the Givens family. Great stuff.

Hypothesis Two: The first and last episodes of each season have the highest IMDb ratings

Justified IMDb Rating by Episode of Season

IMDb ratings start of high, dip in the middle of the season, and then increase in the home stretch.

Verdict? Pretty much correct.

Venturing a Guess: The IMDb ratings do start off with a RPG firing into a church bang, drop a bit, and then rise again as the season finishes. The season finales are rated higher by IMDb users than the premieres. This isn’t too surprising: people get pumped for the show starting up again, lose a little interest as it goes along, and rises again when the limosuines get lit up shit hits the fan. Apparently episodes 9 are good, too. Start on episode 9 if you haven’t watched the show before.

Hypothesis Three: Justified’s IMDb ratings aren’t correlated with viewership numbers

Justified's TV viewership doesn't seem to affect IMDb user ratings

Justified’s TV viewership doesn’t seem to affect IMDb user ratings

Verdict? Correct

Venturing a Guess: More people actually watching the show doesn’t necessarily mean that IMDb users will give an episode higher ratings. The show almost always gets between 2-2.5 million viewers and between an 8-9 IMDb rating.

Conclusion & Bonus Chart: TV Ratings for Each Episode of a Season

Justified TV Ratings per Episode of Season

Ratings are high for the first episode of the season, trough in the middle, and rise slightly at the end.

Thank You For A Surprise Chart: You’re welcome.

Explain It: Fine. Like the IMDb ratings, Justified’s viewership starts off hot, drops in the middle, and comes back up slightly at the end of a season.

Conclusion: I think what we’re seeing here in Justified‘s IMDb ratings is that die hard fans are the one’s voting. This isn’t too surprising, of course. Who else would take the time to register for IMDb and then vote for a cultish FX drama?

Here’s how I reach that conclusion: Justified’s TV ratings and the number of IMDb votes are going down while the IMDb scores are going up. The average number of votes per episode per season has gone down precipitously (548 per episode in season one to 221 in season five), TV ratings are at their lowest in season five (2.3 million per episode; season two was the highest at 2.7 million), but the IMDb ratings are at their best now (average of 8.6 per episode in season five; it was only 8.25 in season 1).

The people who have stuck around with this show for the last five years really like it. I’m sure they/me will be rewarded in the next and final season. That thing I said about the Raylan and Boyd plots drifting too far apart… yeah, that’s not gonna last.


  • The IMDb rating system is weighted to reduce the influence of “ballot stuffing.” Here’s is their FAQ.
  • Code used to scrape IMDb, the data set produced from that, and the plots are located here on GitHub.
Posted in Leisure | Tagged , , , , , | Leave a comment

World Cup 2014: Thumbs Up from Lukas Podolski, Instagram Star

Podolski Merkel selfie, World Cup 2014 Brazil, Instagram

German forward Lukas Podolski in a selfie with Angela Merkel at the 2014 World Cup (Credit: Lukas Podolski’s Instagram account)

I didn’t really know who Lukas Podolski was until some late night social media-ing. I now wish I would have paid more attention to the Polish-born forward because Lukas Podolski is an Instagram star.

I’ve probably watched him play dozens of times for Germany and Arsenal, although I didn’t really know who he was beyond hearing his name. To me, Podolski is another anonymous part of the Mannschaft, the intimidating nickname of the German national team. It just means “team”, but since it’s German, it hints at ruthless precision and metallurgy. You can probably replace him with another perfectly engineered possession-chewing fußballer, and the assembly line would still run.

Poldi is a delight on IG. He posts adorable selfies with his teammates, Portuguese love letters to Brazil (after the beat down, natch), and calls throwing a rugby ball like a quarterback “Training American style !”. Not to mention a selfie with Angela Merkel. (I’m sure they discussed central bank policy.) You win, Lukas, you win.

The most disturbing trend is what I’ve labeled “Hiked Up Shorts”, wherein he and his teammates pose together with their shorts pulled up so as to look to like tighty-whities (the shorts are black). Hilarious because they’re German and don’t have the American shame about letting it all hang out. Smart because it’s hot as hell in Brazil. Uncomfortable because it’s grown men hiking up their shorts to their crotches with their arms around each other.

His favorite pose is by far the “thumbs up.” He’s usually with a teammate or two, or with Ronaldinho, and he gives a big grin with a fist curled and the first digit pointing straight in the air for all the world to see. When I noticed this trend, I knew I had to break it down.

Lukas Podolski thumbs up World Cup 2014

Lukas Podolski’s favorite Instagram pose is by far the “thumbs up”

I’ve categorized all of his Instagrams since Germany commenced national team training on May 21, landed in Brazil for the World Cup on June 8, and up through July 12 at 9:30 central time, 30 hours before the final on July 13. By my count, he’s posted 99 photos. Seventeen have a thumbs up, 7 have a peace sign, and 6 are fists. There’s also some pointing involved, but I didn’t notice that before it was too late.

Lukas Podolski’s feed will definitely be a must see if the Mannschaft take out Argentina. There’ll be so many joyous selfies, hopefully with his shorts worn correctly.

Prediction: Germany 3 – Argentina 1

(Code and data located here.)

Posted in Sports & Leisure | Tagged , , , , , , , , , , , | Leave a comment