Fixing Election Maps using Street Lamps

Update: this stress fueled post won 1st place in the Mapbox Election Mapping Challenge ( "Best Data Mashup"). Be sure to check out the other cool projects that were entered!  As election night nears, we're about to be bombarded with maps. Almost all of them will be highly misleading. Using precinct level data from the 2016 eleciton, I explore a fundamental flaw in the conventional approach to election mapping, and outline a new method for correcting this bias using satellite images of the earth taken at night.  The problem with normal election maps When presenting election results, standard practice is to do so at the level of administrative units (e.g. states, counties, precincts), coloring their whole area according to voteshare. You've come across this type of map before: The New York Times boasts that this is an "Extremely Detailed Map of the 2016 Election"  because it uses precincts, which are smaller than the more commonly used counties. But this typ

Did Saudi Arabia Know an Attack was Coming?

On September 14th 2019, a combination of drone and missile attacks targeted Saudi Arabia’s oil infrastructure at the Abqaiq and Khurais Aramco facilities, cutting the country’s oil production by over 50% and leading to the largest spike in the price of oil ever recorded . The attack was particularly embarrassing for Riyadh because billions of dollars' worth of air-defense systems were thwarted by drones that may have cost as little as $15,000 . A year later, the expert consensus seems to be that the attack was successful because the Saudis were caught off guard, with the element of surprise giving the assailants a decisive edge.  An open source analysis of radar interference from Saudi Arabian air defenses suggests that the Kingdom might actually have been expecting an Iranian attack on its oil infrastructure: five days before the attack, a missile defense system pointed at Iran was switched on for the first time at one of the largest refineries in the country. This analysis also

Building a 3D Model of the Beirut Explosion

Blast damage assessment in Beirut is being carried out using two-dimensional satellite imagery. These approaches underestimate damage by failing to capture damage done to the sides of buildings. I outline an alternative approach using Open Street Map data to create a 3D model of Beirut and the explosion to analyze directional blast damage.  Satellite Imagery and its Limits Following the recent explosion in Beirut, I built a tool that uses Sentinel-2 imagery to map the destruction caused by the blast. After some trial and error, I arrived at a fairly simple two step process: first, measuring the change in spectral signatures between pre- and post-explosion images. Second, applying an X-Means clustering algorirthm to the resulting image (yielding the map on the right), or taking the absolute difference (yielding the map on the left): Red areas on the left indicate high levels change between the pre- and post- explosion images. On the right, the magnitude, direction, and spectral