Weeknotes: 22nd September 2025

Last week

Habitat maps

I did some more work with the hybrid habitat maps I talked about in my last weeknotes and the week before, looking into the impacts of combining the high resolution but known limited habitat map we've used in the past with course grained but more accurate data on agricultural land usage. From those previous notes:

However, whilst useful in the Food context, that new map is not ideal as it exhibits artefacts due to the low resolution of the original agriculture data (which is at 10km rather than the original Jung map which is at 100m). Whilst we've tried to do the best we can with that, there's no getting away from aliasing effects due to the resolution mismatch. What we need to do now is work out how significant those are in the LIFE context, as we know that the original map significantly under-represent agriculture habitats: which is worse, the under-representation or the aliasing due to course grain data?

I did run a full LIFE metric run using the new maps, and whilst at a macroscopic scale they make sense and look like an improvement based on what we know, at the finer resolution we usually work at the incorporation of the courser agricultural data is very obvious, as you can see in this before/after looking at northern Madagascar:

For a bunch of work that can be enabled by the LIFE maps, just making maps at a courser resolution that matches in inputs is fine, which is what was done in the food impacts paper we published last week, but there are other uses of LIFE that benefit from a more detailed map, and so I'm still interested in working out how to either do a better integration of the datasets or how to be comfortable with the statistical impacts of the artefacts.

In terms of doing better integration, I came across this paper by Woodman et al at the University of Edinburgh who have a method (and an R package) for trying to solve this particular problem, and so I need to work out how I might integrate that into the hybrid pipeline for these maps and then see what it generates for us.

Regardless of what we do, we do need ways to assess the impacts of these changes, so onto the next item...

Validation of AOHs

I didn't make huge progress on trying to round out my implementation of the Dahal et al method of validating Area Of Habitat (AOH) maps, but I did find time to finish off the fetching of point data from GBIF, which is a key stage in the process.

The Dahal et al method has two parts two it, a statistical model validation process, which is implemented, and second check using species occurrence point data, which we get from GBIF. I implemented the first part a good while ago and it's that second stage I'm slowly working my way through now. Once that is complete, then we can use the validation method to compare the AOH runs using different habitat maps and try to work out what impact that's having on outlier species.

AOH code refactoring

Part of why I didn't make more progress on the validation implementation, other than looking at habitat maps which everyone is pushing for results on, is because I wanted to do a little bit of shoring up the foundations of the AOH code in general. There's a bunch of strands of work around the AOH code that has sat relatively untouched for a while that are bubbling up: the edge-effects work I mentioned in the past, updating it for newer versions of the Yirgacheffe API, integrating some of Daniele's methodology into it also so it's compatible with his work at the KBA Secretariat. All this means change, and whilst in the past I've relied on Yirgacheffe's extensive unit tests to give us confidence in the output of the AOH code, I do think we need some higher level testing if we're expanding the AOH methodology code itself rather than the detailed number crunching part.

Thus I spent a couple of days moving the code into a a more proper layout for Python projects, adding test cases to start to get coverage up, and so forth. I hate all this project plumbing stuff, particularly in Python for some reason, but it's not alone in this, but I waded through it and now I'm happier that I have a better place to start making all these changes from.

This week

Try applying the Woodman et al process to the hybrid habitat maps I made and seeing if that improves things.

There is a edge-effects meeting this week that I'm woefully unprepared for having instead been working on these habitat maps. However, there is a link between the two, so I'll try prep something to explain to the edge-effects folk why this might be of interest to them.

There's an active travel hackday happening at DoES Liverpool this coming weekend, and I hope to use it as an excuse to do a little playing with 3D-printed city maps. I know I said this last week, but the event date was moved!