Habitat trimmed maps
We needed to filter out habitat. This step is key, and likely will introduce errors, as whilst widely advocated, most landuse maps misrepresent actual landcover by delineating landcover types in a fairly arbitrary way. This will over-emphasize the importance of more sampled habitats, and may miss undersampled and smaller habitats; thus the choice of this layer is key. Here we used the IUCN ecosystem typology (published in 2022) because it provides overlapping classes of ecologically relevant landcover and thus provides the most nuanced mechanism to map landcover for regions where accurate national maps of landuse may not be available. National maps are generally better calibrated for a given region than global maps, which must necessarily simplify land-cover categories, and may not be sufficiently tested at a local level. Furthermore, the IUCN ecosystem typology is recognised by the UN System of Environmental Economic Accounting (SEEA) and is therefore already a global standard. An alternative here if the region of interest is predominantly forested is to use tree density or height as the delimiter for habitats, however, in a region with diverse habitats, more nuance may be needed given that trimming in this way cannot account for climate differences across the recorded maximum bounds of species distribution. Notably urban areas were not included as biases in sample collection to more populated areas can skew results (Hughes et al., 2021a).
After removing duplicate species points we then extracted the landcover types based on the typology under all locality points. We then used the summary statistics tool to calculate the total number of points per species in each landcover category as well as overall, then used this to calculate the percentage of locality points for each species within each category. We then filtered out habitat with at least 10% of locality points within each landcover category which fell within the polygon for the species. To do this we masked all habitat types suitable for the species with their individual MCP then mosaiced all parts of the species range together using the mosaic to new raster tool, all suitable habitats were given a value of one. Because of errors in the mosaic to new raster tool if applied to stack richness for large numbers of species we then mosaiced all species range maps onto a mask of the African region, then used the raster calculator to sum richness for groups of 40 species, numbered these sequentially, then added the numbered MCP filtered outputs to sum overall MCP filtered richness.
In addition we used the same filtered habitat requirements and repeated the process using the IUCN polygons rather than the MCPs. This has the advantage of better representing overall species range (MCPs will necessarily not include the edges of species ranges as they can only delimit the maximum bounds of recorded range), but we know from former work IUCN maps include pervasive biases and also artificially under-estimate many parts of species ranges (Hughes et al., 2021, Li et al., 2020). Furthermore, IUCN maps are not available for most plants and invertebrates, as well as being notably incomplete in some small bodied vertebrate taxa. Filtered IUCN maps were then stacked and richness calculated in the same way as MCP filtered richness using the raster calculator.