Analyzing President Trump's Approval Rating and the 2018 Generic Ballot


How popular is Donald Trump? This question, however simple, carries long-reaching implications for America’s future. Trump’s political and moral standing come 2020 will likely define the path of the presidential election, which seems to contend either continued darkening of American politics or a great reversal of the current political environment. As they have done for the many presidents before him, and will do for the many after him, pollsters have taken the nation’s political temperature constantly throughout the Trump administration.

Read More

Creating Circumplex (Polar Bar) Charts in R with ggplot2


While I was working on my last post about NFL salary cap allocation, I struggled with how best to present the information. I knew I wanted the focus to be on outliers, but was finding a standard pie chart to be dull, and bar chart to be hard to compare. Fortunately, I stumbled upon the circumplex chart and realized this was exactly what I was looking for. I found a number of good resources to help me on my way, most notably this post by Learning R, but ultimately ended up heavily customizing the charts until they felt right.

Read More

NFL Spending by Position Group


The Los Angeles Rams recently resigned Brandin Cooks to a 5 year, $80 million extension, a deal that locks up their deep threat to go alongside Robert Woods and Cooper Kupp. Then, just today, they turned around and handed Todd Gurley $60 million on a 4-year extension, a deal that sets a new benchmark for the running back position (and makes LeVeon Bell a happy, happy man). ✊🏾✊🏾✊🏾 yeah todd https://t.

Read More

Projecting the 2026 North American World Cup Host Cities


With the 2018 World Cup (and painful non-qualification) now fully in the mirror, American soccer fans have a lot to look forward to. The 2022 World Cup promises to be a great bounce bounce-back opportunity for the team, which figures to be led by a 23 year old Christian Pulisic. Four years later, the United States, Mexico, and Canada will jointly host a North American World Cup in 2026.

Read More

Home Run Derby Preview 2018 Edition


I love the Home Run Derby. Though initially disappointed by the move to timed scoring rather than the traditional “10 outs” framework, I’ve had an amazing time watching sluggers like Aaron Judge go up against the clock in today’s bracket-style tournament. With no “monster” sluggers like Judge or Stanton in tonight’s Derby, things are a bit more wide open - I think you could make a case for a number of different players tonight.

Read More

MLB Batting with RISP (mid-2018)


Baseball is a sport of inches - one half inch here and a fly out turns into a home run, one half inch there and a liner turns into a double play. Timing is also critical - striking with runners on and in scoring position is so much more valuable than a parade of solo home runs. In 2013, the St. Louis Cardinals were able to capitalize on this more than any other team in baseball history, riding a 0.

Read More

Best and Worst Passers in the NBA - 2017/2018


Chris Paul. James Harden. LeBron James. Rajon Rondo. It’s tough deciding on who the best passers in the NBA are - everyone’s preferences are different, and there’s basically an option for everything. Love full court outlet passes? Kevin Love’s your man. Laser-like kickouts for three? John Wall is happy to show you what he’s got. With so many different aspects of the basketball becoming more science than art, it’s refreshing to watch the NBA’s best passers work their magic in their own particular ways.

Read More

DC Government Employee Salary Data


Making Sense of DC’s Public Salary Data In the interest of transparency, most government institutions post the salary data of their employees, so that the public can have insight and visibility into where their tax dollars are going. FederalPay.org in particular is a great resource to look up the salaries of federal employees. However, this same set of tools does not typically exist for local and state governments. In the case of the District of Columbia, the DC Department of Human Resources posts a quarterly update of public employee salary information in PDF form.

Read More

Getting Excited about Juan Soto and Why Not to Worry About Bryce Harper's Batting Average


Soto’s Debut Nationals fans eagerly anticipated Juan Soto’s arrival to the major leagues, and boy, did he deliver. In his second MLB at-bat, and his first start, Soto laced a 422 foot drive off Robbie Erlin, driving in 3 and showing why he made such meteoric rise through the National’s minor league system. Soto’s promotion was the result of a particularly ill-timed injury to do-everything superstar Howie Kendrick, who was pressed into an everyday role at second base and the outfield following injuries to Daniel Murphy and Adam Eaton.

Read More

Cracking Combination Locks With Numpy


Background My dad recently came to me with an interesting proposition - cracking a combination lock where the first and last numbers are (probably) known. He has a lock where the first and last digits are 6 and 4, respectively, but is looking to determine the middle two digits and hopefully crack the overall combination. My first thought was to simply generate all the possibilities of numbers - a relatively trivial task, easy but long.

Read More