Posts

Calculating High-Resolution Standardized Precipitation-Evapotranspiration Index

Image
This post outlines a workflow for the calculation of a high-resolution version of the Stardardized Precipitation-Evapotranspiration Index (SPEI). This is accomplished in four steps, utilizing Python, R, and JavaScript. Quantifying the precise onset, duration, and end of droughts is difficult. Most approaches have historically measured drought as a prolonged deviation from the mean rainfall in an area. The Standardized Precipitation-Evapotranspiration Index (SPEI) builds on previous approaches by incorporating temperature data to account for the amount of water lost to evaporation. This is important because in an arid climate, a six week shortage in rainfall during the summer would have a much greater impact on soil moisture than the same shortage during the winter. This is especially important for drought forecasting that accounts for anthropogenic climate change. Indices that do not incorporate temperature data will persistently underestimate drought incidence as global t...

Turkish Elections Data

Image
The tool above visualizes  2,975,843  ballot-box level election results in Turkey spanning over 10 years and 20 elections.    The Turkish Government publishes extraordinarily detailed electoral data. In fact, they publish PDF scans of individual ballot boxes such as the one below.  This is ballot box number 1100, located in the village of Karamu ş , in Diyarbakir province’s Silvan district-- home to just 155 voters. Several websites already visualize electoral data, but none go below the district level. I wrote a python script (available here on Github) that scraped and concatenated ballot-box level results into a single dataframe. A note of caution if you're planning on running the program: the results are stored in .csv files that end up taking ~3GB of space.

U.S. Foreign Military Sales Tracker

Image
Type the name of a country into the search box to view U.S. arms sales between 2001-2015 What are Foreign Military Sales (FMS) ? FMS is the primary process through which the U.S. Government sells weapons to the governments of other countries. In conducting FMS, the Department of Defense (DoD) acts largely as a brok er between foreign governments and U.S. arms manufacturers. The defense ministries of foreign governments submit a Letter of Request (LoR), which the U.S. State Department reviews. If approved, a DoD agency called the Defense Security Cooperation Agency (DSCA) mediates negotiations between the applicant and the contractor, levying a commission on the sale to finance its own operations. As such, the FMS program is operated at no net cost to taxpayers, but is slightly more expensive than private arms sales(Ibid). Once a request is approved by the DoD and DoS, it is sent to Congress for final approval. If the sale is successful, U.S. military p...