Allen Coral Atlas wrap-up

I recently left the Allen Coral Atlas team after five great years building with them. It’s been quite a journey from the early demo and my being star-struck about National Geographic coverage, through moving institutional homes, the team going fully remote, and announcing that we had reached global coverage. Here’s what we’ve done since that last update:

A full remapping of the world incorporating feedback from more than 90 regional experts, and 150 Atlas users, to make our automated classification a better fit to what locals know is in their waters.

An example of the classification update, in which the left hand (before) side has generally more noise, and the right hand (after) side has major cleanup in a few circled areas.

Continue reading “Allen Coral Atlas wrap-up”

Atlas of Legal Needs Surveys v2

I had a chance to go back to some web mapping work from a couple of years ago and improve it:

A screenshot of the Atlas: a world map with countries that have surveys (the majority) shaded while the others are pale grey.  There is a row of filter buttons with a few active, and a popup highlighting results for Canada.

Much of the improvement came from the client: updated data with more coverage & more fields to filter on, and a design refresh. But it’s always a pleasure to work through refinements, and it was a chance to clean up and simplify the code that runs it.

Water quality

Soon after moving to Victoria, I started volunteering with Friends of Bowker Creek. In fact, the first week after the 2-week COVID quarantine that was mandatory at the time, my partner and I joined one of their habitat restoration work parties. It’s fair to say that I caught the bug.

The group’s vision is to restore this very culverted creek and its very paved urban/suburban watershed to a condition that can support salmon and trout again, as it apparently has done in living memory, albeit not for some decades. We’re under no illusions about being able to fully undo 150 years of careless development, and are well aware that the state of the creek before that was not the “perfect Eden” that settlers thought they were seeing, but rather carefully managed by the lək̓ʷəŋən & W̱SÁNEĆ people to serve their needs. But we take inspiration from that management, and in that find hope that it can support many people and fish at the same time.

An important part of this is the quality of the water itself, which FoBC sends volunteers out to measure a couple of times a month. We need this data to track our own progress, to advocate for municipal water management changes, and to convince the Federal Department of Fisheries & Oceans to provide the allowance of chum salmon eggs which we’ve started placing in the stream. After about a year, the person who had been leading that effort had to step down, and I took over coordinating it. I have some big ideas about ways to integrate the manually collected data with a couple of continuous loggers we also maintain, and the quite comprehensive water quality data that our regional government publishes. But my first priority was to update our system from using paper data sheets and entering them into a database that was hard to access.

Water Rangers came to the rescue on both counts. We now enter data on our phones at the creek, so there are no more piles of forms on my desk waiting to be transcribed. And they host a site where anyone can see our data and learn about the state of the creek for themselves.

A screenshot of the data for one monitoring site, with charts showing the air temperature, water temperature, and dissolved oxygen since August 2020.

Of course it means nothing if it doesn’t spur change, and the thing that I’m proudest of is that we have convinced one of the municipalities this creek flows through to make some changes in how their own Public Works depot handles wastewater. More of next winter’s chum eggs will manage to hatch because of that. It’s just one baby step, but each brings us a little closer to seeing salmon return to spawn here again.

Atlas of Legal Needs Surveys

This summer I had the pleasure of working with CORE GIS to build a web map for the World Justice Project. One of their ongoing programs is to aggregate surveys of unmet justice needs from all over the world, and we made them an overview map to present the data:

Screenshot of a world map with countries for which surveys are available in blue, and a popup highlighting Colombia's surveys as an example

The map and filters are automatically populated from a file that WJP maintains, to give them a straightforward way to update data without having to engage a consultant each time. The underlying data is more impressive than anything we built, though: the screenshot really is highlighting a 129,000 person face-to-face survey conducted the year before COVID.

Explore the map, or read WJP’s intro to the project.

Gaining elevation

A/B Street is both a game and a very powerful tool that allows you to download a detailed street map of an area and test out changes to the configuration of roads:

It uses OpenStreetMap as a data source. OSM has impressively rich data on things like the number of lanes a street has, where bike lanes and turn restrictions go, and so on, but one thing it lacks is detailed elevation data. The developers noticed that it was suggesting absurd routes for cyclists in Seattle, including routes that no-one who’s actually tried cycling would ever repeat because of the hills involved. So they brought me in to figure out how to add elevation data.

I wrote a simple Python tool that reads in paths as plain lists of coordinates, and writes out statistics for each one: the start and elevations, and cumulative elevation gain and loss along each path. A/B Street incorporates this into a data load by exporting each road segment as a series of points every metre along the way, getting as fine-grained a picture of a route’s hilliness as the source data allows.

By default, elevation_lookups uses data from the Shuttle Radar Topography Mission, because that source provides fairly high quality data for most of the world’s land. I learned about SRTM while making this tool, and I’m still sort of star-struck that we have a global dataset like this, freely available to anyone who has a use for it. But it is also relatively low resolution, so I built in the ability to override the data source with higher resolution sources where known. It comes preconfigured with examples of both raster (LIDAR source) and vector (contour source) datasets for the Seattle area.

This is an open-source project. I hope it can be useful for other applications, and I have more ideas for it then I have time to implement. I’d love contributions from anyone this appeals to, and have some suggested starting points (not all requiring programming skills!).

I also ran into some technical surprises, which are below the fold in case the information is useful to anyone else

Staying relevant when the ground shifts

Before the pandemic,Crisis map legend, showing emergency services, which businesses were open, where to get sanitiser and places to volunteer I was working on a major update for Washington Hometown’s recreation mapping work. They’ve long been a major provider of outdoor recreation data, but wanted to put more of that data into public-facing maps that they host. They partnered with TOTAGO for mobile maps, and I built a map generator for their desktop maps so that they would be able to quickly publish new thematic maps by just updating some configuration files rather than having to write code each time.

This flexibility turned out to be more important than any of us had anticipated, because before the project wrapped up the pandemic hit. In the first months of Washington State’s lockdown, a lot of public land was either entirely closed to the public or had very limited services. Suddenly being able to publish a spring hiking map just didn’t seem relevant or even appropriate any more. But WHT’s speciality is keeping data current as things change, and they applied the same mindset to the map themes themselves. At the height of public confusion about where to find COVID tests, sanitiser supplies, and so on, they released a “crisis” map with that information updated daily.

As things calmed down, they quickly pivoted away from the crisis map (quickly enough that I didn’t even get a screenshot of the working map!), and started focusing on the ever-changing list of which public lands were open, closed, or somewhere in between. Now that we all know that outdoor activities are relatively safe, there are far fewer closures, but still enough that it’s valuable to have someone keeping track.

I was impressed with my client’s ability to keep this project relevant when I was afraid that the pandemic would sink it. And in the end it’s been a great validation of the map generator itself, which has helped them to stay agile.

A map of central Washington State, showing mostly open public land with a few closures

Fitting more housing into the city

Seattle is suffering from a deep housing affordability crisis, with more and more people being priced out of living there. At the same time, it’s been deeply resistant to changes in zoning that would allow enough new housing to be built. One of the examples of this is that it has a program called “Encouraging Backyard Cottages”, and has gone through at least two rounds of legal reforms to support that, but figuring out whether one can be built on any given lot still involves going through a long checklist about the exact dimensions of the site and intricacies of zoning.

In theory, DADUs (Detached Accessory Dwelling Units, the much less appealing legal term for “backyard cottages”) allow a lot of small, affordable housing to be added to single-family zoned neighbourhoods and spread out enough to not feel like a radical change in the streetscape. In practice, the complicatedness of the process adds enough of a barrier that relatively few have been built so far. Hatchback Cottages has a plan to solve this with a set of ready-to-build designs and a package of support to help people through the process.

Even with their expertise, assessing a site under the arcane rules is a time consuming process. But computers are good at applying lots of rules and calculating all the measurements, so Hatchback contracted me to run a GIS analysis assessing every residential lot in Seattle for suitability.

A map of one city block with individual lots shaded green if they could have a DADU and red if they couldn't.  Existing building outlines and the area in which a DADU might fit are also shown.

Fortunately for us, Seattle and King County publish very comprehensive and regularly updated open data about zoning and development, so I had a lot to work with. The analysis takes into account existing building footprints, lot characteristics and potential complicating factors like steep slopes and landslide hazard areas. It will never be a complete replacement for a knowledgeable human looking at the site, but by ruling out all the sites that definitely won’t work it saves my client a lot of time. Now the experts can solely focus on sites that have a relatively good chance of working out.

Britain’s footpaths

I grew up in Britain.  I rarely feel like moving back, but there are some genuinely wonderful things about the place.  One of them is the incredibly comprehensive network of public rights of way, especially in rural areas.  The basic principle is that any path that’s been in common use, stays in common use, even if the “path” is nothing more than a customary route across the middle of a field.  Landowners are not allowed to obstruct public access on foot, and in turn walkers are supposed to respect farmland by sticking tightly to the established path, keeping dogs under control, and so on.  And because most of the British Isles have been relatively densely populated for a long time, there are customary routes all over the place.

Although there are sometimes conflicts, the system mostly works.  It’s helped along by strong social norms, and a healthy dose of fierce and nerdy advocacy.  Landowners aren’t generally obliged to do trail maintenance, so sometimes it’s done by local governments, and more often by volunteers.  Farmers do tend to maintain stiles to allow access from one field to another without letting livestock out, and in the more populated parts of the country there’s usually someone providing stream crossings.

a stile and wooden bridge on a footpath
Continue reading “Britain’s footpaths”

Pacific Northwest climate trends

The University of Washington Climate Impacts Group has built a new visualization tool for the state climatologist, which makes it easier than before to explore the whole climate record for Washington and some data for neighboring US states. The data itself is nothing new,  but being able to explore it can help to get a handle on what’s going on.  I rather arbitrarily picked my life to date as the range to compare, and got the sobering result that every single monitoring station has registered an increase in temperature since I was born; most statistically significant.

A map of Washington, Oregon, Idaho and western Montana, showing temperature increases at every station, and line charts for each state showing the overall trend

Of course, there’s no scientific basis for picking that particular range, but I wasn’t cherry-picking either (I’d have picked 1985-2015 if that were my goal). I just wanted dates that felt personally meaningful, and even as someone who considers myself relatively well-informed about climate change the sheer scale of the trend was breathtaking.