Making Large CSVs Queryable via REST: A Case Study Using DBHub.io to Create a Serverless API for Aircraft Data


A few weeks ago, I posted some work-in-progress code that I’ve been putting together to identify planes flying overhead. One thing that I’ve really wanted to include in that data output, but which is not natively returned by the OpenSky States API, is the model of the plane flying overhead. This post shows the unorthodox way that I’ve managed to make model information programmatically available, so that we can quickly query for any given plane callsign and retrieve its typecode.

Read More

What do NFL Players Really Think About Their Teams? Visualizing NFLPA Team Report Cards for the 2023-2024 Season


This morning, the NFL Players Association (NFLPA) released their latest set of Team Report cards, following last year’s inaugural data. These report cards include grades by 1,706 players, scoring their own teams on a variety of player experience dimensions from A+ to F-. This year, we saw Head Coach and Owner grades added on top of the eight areas from last year: Treatment of Families Food/Cafeteria Nutritionist/Dietician Locker Room Training Room Training Staff Weight Room Strength Coaches Team Travel When this data came out last year, I found the presentation a bit lacking - the NFLPA just dumped the data into an ugly, unwieldy table!

Read More

Examining the More-than-Meets-the-Eye Relationship Between Exit Velocity and WAR for MLB Hitters


Looking at Statcast’s leaderboard of the hardest-hitting players in baseball makes it all seem so easy: simply acquire the guys who smash the ball the hardest, and then profit! It looks almost foolproof - only Kyle Schwarber and Giancarlo Stanton put up below-average WAR figures from this group of 15 hitters, and most of the obvious best hitters in the league (Judge, Acuña, Ohtani, Seager, Alvarez, Soto) are prominently featured:

Read More

Identifying Planes Flying Overhead with Python and the OpenSky REST API


One of the many things I enjoy about living in Santa Monica is that it sits directly underneath the Western/Northern approach to LAX. Every 4 minutes, or so, a plane will fly directly overhead, having come across from Malibu, before continuing inland towards Downtown Los Angeles. There, it will execute a big sweeping turn that aligns it with the incoming traffic from the east, which it will zipper into for the final descent westward towards the sea.

Read More

Studying the NBA's Surge in High Scoring Individual Games


The past month of NBA basketball has been marked by a staggering amount of individual offensive brilliance, with Luka Doncic and Joel Embiid both going for 70 points, and Karl-Anthony Towns, Devin Booker, and Steph Curry all hitting the 60 point mark. Prompted by this unique explosion of point scoring, I wanted to take a quick look at the history of high-scoring individual games, show how the recent events are really just the exclamation point on top of a long-term trend, and demonstrate how changes in the league’s offensive landscape have created a landscape more conducive to these outbursts.

Read More

How to Make $700M Palatable: Exploring Shohei Ohtani's Uniquely Deferred Megadeal with the Los Angeles Dodgers


Earlier today, ESPN reported some bombshell news about Shohei Ohtani’s new contract: it’s heavily backloaded. So heavily so that Ohtani will only take $2M of salary each of the next ten years, with the remaining $680M (over 97% of the value) paid out between 2034 and 2043. Time Value of Money and Net Present Value (NPV) The heavily deferred nature of contract piqued my curiosity for what the deal should realistically be valued at today.

Read More

Entering the European Space Agency's 'Little Pictures of Climate' Competition (2023)


Litte Pictures Competition Earlier this fall, I stumbled across a fun data visualization competition called the “Little Picture” competition, advertised with this delightful call to action: help us transform decades of satellite climate data to compelling, impactful “Little Pictures” that spark awareness and drive action As you might guess, I couldn’t resist putting a submission! Now - I am not sure I am technically even eligible to submit an entry to the competition, as the eligibility guidelines seems to target citizens of European Union (EU) member states and European Space Agency (ESA) contributors.

Read More

Fixing Horrendous Charts: Electric Vehicle Preference Trends


Earlier this week, I came across an analysis with some interesting data and takeaways, but one of the worst data visualizations I’ve seen in a long, long time. After some very careful study, I was able to make out that openness to purchasing an electric vehicle (EV) or hybrid surged in 2021, but has stagnated in 2022 and 2023. However, the chart is so unintuitive that it’s hard to quickly come to that conclusion - I can’t actually believe a big company like S&P Global Mobility would publish something like this!

Read More

How a $25 Gizmo Slashed my Expensive On-Peak Electricity Usage


Last summer, I finally caved and bought an air conditioning (AC) unit for my apartment living room. With my job fully remote and a very hot summer season in LA across 2022, it was money well spent - no longer did I sweat at my desk in the afternoons. Unfortunately, no good deed goes unpunished - I quickly realized that the AC unit consumed significantly more energy than the rest of my apartment put together!

Read More

How the San Diego Padres Became Baseball's Most Disappointing Team (Non-Mets Division)


Pythagorean record is one of those useful rules-of-thumb that every veteran baseball fan knows to consult when there’s an anomaly in the standings. “Well, you see, the Mariners and the Rangers both have 74 wins - but the Rangers have a +173 run differential, and Seattle’s only at +102… I’d expect Texas to pull ahead.” Regression to the mean is an incredibly powerful factor in sports, and Pythagorean record helps capture it much better than pure Win/Loss record, which is subject to the many idiosyncrasies of the sport and tends to be less predictive of future outcomes.

Read More