Leaf peeping by bike

This is a sweet ride around seacoast New Hampshire and southwestern Maine. It combines mountains and coasts with a little urban riding in Dover and Portsmouth. The dirt road up to Mt. Agamenticus is in good shape.

Choropleths: color-coded maps showing data by state or other geography

A Choropleth is a colored map, typically showing information gathered by some kind of census. A well-known example is the New York Times’s COVID-19 map. Let’s say you have some data that’s coded by geographic area. For example, you might have a table showing the number of COVID cases per 100,000 people county by county in … Read more

Flood Maps Miss Risk Factors

The US Federal Emergency Management Agency’s (FEMA’s) national flood insurance program has a non-governmental competitor. Here’s a Times piece about a Brooklyn-based non-governmental outfit called First Street Foundation. They’ve put together an online address lookup scheme called Flood Factor that returns a risk of flood at a property. They claim that FEMA’s rating system, based … Read more

Vaccination rates by school in Massachusetts

Here’s an interesting data set.  This table contains vaccination rates for kindergartners by town and school in Massachusetts. It shows immunization rates for DTaP (Diptheria, Tetanus, and Pertussis), Polio, MMR (Measles, Mumps, Rubella), and Hepatitis B. It also lists immunity to chickenpox. It’s published here as an Excel file.  That makes it easier to numbercrunch, … Read more

Fast nearest-location finder for SQL (MySQL, PostgreSQL, SQL Server)

I’ve spent enough time goofing around with location-finder software that it’s worth writing up how to do it.   Of course, finding distances on the surface of the earth means using Great Circle distances, worked out with the Haversine formula, also called the Spherical Cosine Law formula. The problem is this: Given a table of … Read more

Computing an initial bearing

This MySQL Stored Function computes the initial bearing — the compass heading to follow — when moving from one point to another on the surface of the earth.  Here’s a web site describing this. http://www.movable-type.co.uk/scripts/latlong.html