Emacs: find files anywhere, updated for 2017 #

Back in 2016 I posted my emacs setup for finding files globally. It unifies find-file and switch-to-buffer, and also lets me find files without switching folders. I've been improving it since then and wanted to post an update.

Find files globally

The biggest change is speed. I profiled the code and found two bottlenecks in the construction of the global file list. The list is roughly 15000 elements, so I precomputed as much of that as I could, and the startup time went down from 0.8 seconds to 0.1 second. It feels instant now.

Labels: ,

PM2.5 to Air Quality Index (AQI) #

I wanted to understand the relationship between particulate matter measurements (PM2.5) and the U.S. air quality index (AQI). Update: [2024-09-19] The US changed their AQI mapping in 2024, so I've updated the chart.

Chart of PM2.5 to AQI (made with d3.js v4)

The formula is on wikipedia, defined as a piecewise linear function. But it's weird that the slope isn't monotonic! It started at 4.2, then drops to 2.1, but goes up to 2.5, then drops to 0.5, then goes up to 1.0, then back down to 0.66. In 2024 it changed to 5.5, drops to 1.8, goes up to 2.5, then drops to 0.7, then goes up to 1.0, then up again to 2.0. Weird!

Also see this article from smartairfilters.com that goes into more detail and also suggests using µg/m³ instead of AQI. The definition of AQI varies across countries! For example, 250 µg/m³ is considered AQI 400 in India but AQI 300 in the U.S. until 2024, and AQI 350 after 2024.

Labels: