Air pollution in Beijing and Delhi

This chart shows the Air Quality Index (AQI) for Beijing (red line) and Delhi (blue line) over time. In 2008, the U.S. Embassy in Beijing began publicly posting AQI data on Twitter. This prompted greater public scrutiny of Beijing’s hazardous air pollution levels. Since then, Beijing has managed to improve its air quality. Many cities in South Asia, however, continue to rank among the worst in the world, particularly Delhi.

AQI data is publicly available: AirNow U.S. Department of State

My R code and data.

COVID lockdowns in U.S. cities

This chart uses Google Maps data to see how New York City public transit use changed in the early days of the COVID-19 pandemic. You can see a sharp drop in transit use when New York State declares a state of emergency. I look at three cities—New York City, Los Angeles, and Seattle—and use publicly available mobility data from Google Maps, Apple Maps, OpenTable, and Citymapper. I argue that the most critical in getting people to stay at home was an official declaration of a state of emergency.

My full presentation. My R code and data.

Analyzing heart rate data

This chart visualizes my heart rate (HR) using data collected by my Apple Watch. Each color represents categories of HR readings for each day. Blue is over 50 bpm whereas red is under 40 bpm.

My R code.

Twitter crawling algorithm and bots

During the early days of the COVID pandemic, I noticed a number of Twitter bot accounts that were pretending to be liberal. They used many of the same words in their bios and followed and retweeted each other. I created a Twitter crawling algorithm to download data for 15,000 Twitter accounts that were bots or followed bots. This chart shows the wordcount for words used in the bios of these 15,000 Twitter accounts. Who made these liberal Twitter bots or why they were created remains a puzzle.

My R code for my Twitter crawling algorithm.