Summer Week 1: Hedgehogs - data & models
Categories:EnvironmentAI/MLš¦
Brief Introduction
Hedgehogs are having a bit of a hard time in the UK. Once a common sight in gardens and parks, their numbers have plummeted in recent decades - in some regions by nearly 75%. Urban sprawl, fenced-in gardens, busy roads, and pesticide use have all made hedgehogs life more difficult. But understanding exactly how they move, migrate, and interact with their environments could be key to turning things around.
Thatās what this project is about. This summer, Iām building a high-resolution map of hedgehog habitats across the UK as part of an internship at University of Cambridge, and with the Energy and Environment Group and the Cambridge Conservation Initiative. It will be a data-heavy effort to track and visualize hedgehog movements with as much spatial detail as possible. Once weāve nailed down the habitat mapping, weāll apply spatially explicit models to start making real predictions about where hedgehogs go, and why.
Why does this matter? Well, if we can model where hedgehogs prefer to roam (and whatās blocking them), we can help design more hedgehog-friendly spaces, both in rural and urban settings. Better-connected green corridors, more wildlife-friendly gardens, and (most importantly) smarter conservation planning.
An interesting analysis of the hedgehog decline can be found in the Hedgehogs in Britain threat analysis report from April 2023. Urban populations are showing some signs of recovery, but rural hedgehogs are still in sharp decline. And Peopleās Trust for Endangered Species continues to lead the charge in data collection and public awareness.
Some useful notes about hedgehogs
- Thereās only one native hedgehog specie in the UK - Erinaceus europaeus.
- Theyāre crepuscular/nocturnal, roaving at night in search for food.
- Generally they prefer habitats with dense covers and abundant invertebrates.
- In the UK, theyāre found in almost all counties, except for a few islands.
- Urban hedgehogs:
- Prefer gardens/backyards where people provide supplementary food (cat/dog food), leave out compost or decaying vegetation (insects).
- Avoid backyards where foxes and badgers are common.
- Rural hedgehogs:
- Prefer pasture, meadows, mixed grassland.
- Avoid large expanses of bare arable or dense woodland, intensely farmed landscapes.
- In proximity to farm buildings, hedgehogs nightly range shrinks (because of food supply).
- Key micro-habitats:
- Hedgerows, scrubs, bramble thickets.
- Most nests (both resting and hibernation nests) are built under thorny or dense plants ā bramble, hawthorn, holly or nettles are common nesting sites. They also use woodpiles, compost heaps, thick ivy or abandoned mammal burrows as daytime refuges.
- Diet:
- Invertebrates.
- Occasionally: bird eggs, small vertebrates (frogs, lizards, baby rodents), carrion, and even fruit.
- Travel patterns:
- About of 1-2 km per night.
- 110-220 yards per hourā¦
- Males typically larger home ranges then females and roam more during the mating season (May to September).
- Proficient swimmer and climbers, can cross streams or low fences.
- Hibernation: November to March in the UK. Fattening up beforehand is important, skinny hedgehogs die.
- Seasonal breeding.
- Threats:
- Habitat loss and fragmentation - buildings and agriculture.
- Predation and competition by badgers (also potentially foxes, owls, dogs, snakes).
- Road traffic: heavy casualties (10-20% deaths are road kills).
- Poisons (pesticides - probably only one that can be mapped in this context), parasites, diseases, inpropper diet.
There has also been a (surprisingly) high number of hedgehog habitat research, often conducted in the UK, but generally focused on urban environments (and not much on rural). For instance, Fineāscale habitat selection of a small mammalian urban adapter: the West European hedgehog (Gazzard et. al.) find a) subtle differences between malesā and femalesā behavior (e.g. in relation to house type, front vs. back gardens/yards), b) hedgehogs spent āsignificantly more time in gardens where artificial food was provided, where a compost heap was present, if foxes (Vulpes vulpes) were infrequent visitors, if it rained overnight and as daylength increased (i.e., shorter nights); garden use was not significantly associated with variables potentially likely to reflect invertebrate prey abundanceā, or c) hedgehogs visit many gardens over the span of one night (12-14).
Gazzard et al. (2022) ā Fineāscale habitat selection of a small mammalian urban adapter
Similar kind of analysis is provided in a few other papers, such as Using citizen science to understand and map habitat suitability for a synurbic mammal in an urban landscape: the hedgehog Erinaceus europaeus (Turner et. al. 2021).
- Connectivity is important (juvenile Danish hedgehogs traverse a minimum of 10 gardens per day (!)).
- Negative factors: foxes, badgers, connectivity barriers (rivers, streams - generally lower presence around water).
Turner et. al. (2021) ā Using citizen science to understand and map habitat suitability for a synurbic mammal in an urban landscape: the hedgehog Erinaceus europaeus
Current state of data sources
GPS Traces & Sightings
Lauren Moore
So far, I have spent most my time looking at GPS traces of nearly 80 hedgehogs provided by Lauren Moore. These were collected in the summers (or early autumns) of 2020 and 2021, across and nearby a few villages north east of Nottingham, spanning up to three weeks for some individuals.
Few interesting observations:
- These hedgehogs demonstrated a strong aversion towards certain agricultural fields, while relished other. I assume there could be a variety of factors behind this, particularly pesticides or the height/density of the crops during the given time of year and agriculture-related traffic. Nonetheless, confirming the general notions, they generally sticked around villages much more.
- Hedgehogs sleep a lot (over 16 hours on average), usually go to bed early in the morning (4 am), and mostly stick around one location. There were, HOWEVER, a few restless wanderers (all male), who always slept in different, fairly remote, locations. Those are quite distinct.
- Other than those few, hedgehogs seemed to stick around similar regions, particularly those living in the urban areas. How does it happen that some hedgehogs stayed in urban areas while others remained in rural? Was it because the villages became too full?
There are, however, some complications/questions stemming from this dataset. Primarily: a) how will we account for seasonal changes?, b) need to clarify how the tracked hedgehogs were selected, and adjust for any biases.
Sleep locations connected by lines of male (white) and female (blue) individuals
Hedgehog Street
Not sure how this would fit in, but the Hedgehog Street initiative keeps tracks of a) hedgehog sightings, b) man-made hedgehog tunnels in fences. If they were so kind as to provide this data, perhaps it could be used for some validation. Working on getting the data from the organisation.
Additional: NBN Atlas
The NBN Atlas also provides a few datasets of hedgehog sightings. These vary in locations (entire UK, parts of Scotland) and time spans (some include sightings from 1830s⦠haha). This is probably not very useful, at most for some very approximate verification or something.
Hedgerows, stonewalls, woodlands
Another interesting data source is a mapping of hedgerows, stonewalls and woodlands compiled by Drew Purves and Google Deepmind. This dataset provides a super high resolution of geospatial features that could be, potentially, useful for this project. Iām worried the hedgerows and stonewalls may encompass a bit too much variability perhaps, but the woodlands will definitely be useful (I believe hedgehogs donāt like woodlands).
Openstreetmap
My favorite Openstreetmap (OSM) could also be useful, although the obvious limitation in this case is the coverage and temporal accuracy in remote areas. Conceivably interesting geospatial features that could have significant impact on hedgehogs behavior will probably not be captured in rural regions, and so the impact of Openstreetmap will probably not be as significant as it was for, for example, urban walkability. In reality, (eg. in the proximity of the Nottingham hedgehogs), OSM features tend to be extremely outdated, and mostly just contribute mapping of roads and buildings.
LIDAR
The UK has national LIDAR datasets, which provide high resolution surface data, and can be segmented and features (e.g. brambles, bushes, etc.) inferred (I have used this in my walkability project keep track of trees). However, as Prof Coomes has recently pointed out, these LIDARs are frequently collected in the winter, as the āhardā surfaces are of more importance to the collectors than plants.
Currently have a bit older data (2012), working to get more recent ones.
Department for Environment, Food & Rural Affairs (DEFRA)
LIDAR datasets are not the only relevant geospatial datasets provided by the UK government. DEFRA collects and sometimes publishes a wide variety of maps documenting features and land uses.
For instance, Living England maps 16 different habitats. While the specificity of the different habitats is not amazing, it could definitely be used to eliminate obviously ineligible areas.
Similarly, DEFRA should keep track of the āstewardship schemeā, which provides funding to farmers and land managers for environmental land management practices. Iām not quite certain how popular this scheme is, and how big of an impact it could potentially have on my project.
Another interesting source could be Provisional Agricultural Land Classification (ALC), classifying landās quality, based on climate, soil, and site factors. Maybe, as an underlying map, could contribute to better classification of habitats. Need to inquire with Natural England to obtain this.
Similarly, there should be some datasets with accurate agricultural land-use (which seems extremely relevant). Need to inquire further about that.
Data conclusion
To summarize, currently my compiled data collection consists of: a) the GPS traces from Lauren Moore (+ dump of recent and historical hedgehog occurrences), b) Hedgerows, stonewalls, woodlands from Google Deepmind - highly accurate, highly useful c) OSM data - mostly buildings and segments in rural contexts (where our GPS traces are also situated), d) Unsegmented LIDAR point cloud, e) Living England land-use dataset - accurate, maintained, somewhat coarse.
There really is a lot, interested to see how this will evolve.
Models
Another area of work this week was researching existing approaches to modelling animal movement.
There is a few long-standing candidates:
- circuit theory - using landscape as an electrical circuit where resistance = inverse habitat permeability. Seems useful for identifying pinch-points, but lacks more complex mechanisms/objectives.
- Step-Selection and Resource-Selection (SSF/RSF) - relate animal locations or steps to habitat covariates. For example, SSFs compare used vs available steps (movement segments) in relation to vegetation and barriers. Resource-selection functions (RSFs) compare used points to random points.
- Spatially-Explicit Population Models (SEPMs) - integrate movement with demography (births, deaths) across a landscape. They simulate population dynamics in space (often as meta-populations or dynamic ABMs). Reviews note SEPMs sit at the high-complexity end, linking population processes to landscape structure.
Spatial Absorbing Markov Chains (SAMC) - Model used in Towards a uniļ¬ed framework for connectivity that disentangles movement and mortality in space and time Fletcher et. al. (2019).
- step up from circuit theory - probability: risk & resistance
- short/long-term predictions for connectivity in landscapes
- absorption = e.g. mortality ā key addition (how necessary is it for hedgehogs and this project? shouldnāt the model be geared primarily towards habitat preferences?)
- all: a) short-/long-term predictions of connectivity; b) incorporate population distribution and abundance into predictions of connectivity; c) quantify demographic parameters related to connectivity
- missing directional preferences; not sure how well attraction towards features/shelter/food/layer would work
This R package implements spatial absorbing markov chains. I started getting familiar with it (and with R..), but should probably figure the data better out before sinking hours in implementing stuff.
However, besides SAMC, and some data-hungry DL models (e.g. recurrent nerual networks for GPS time series, used e.g. in Rew et. al. (2019)), there generally seem to be three other options:
- Other hidden markov model-based approaches: for instance, moveHMM seems to have been quite popular, particularly for its ability to model behavioural states.
- step selection functions (SSFs): estimates selection of resources available at each observed step or location based on habitat covariates and movement constraints. There are many versions of SSFs, but this generally seems like a good direction. A more comprehensive and comparative overview is in Florko et. al.
Other, non-obvious solutions? Some path-finding algorithms?
Next week
Hopefully itās not premature, but perhaps next week I shall start experimenting with some of the models on the data Iāve gathered. Also want to slightly rewrite and hopefully publish at some point my walkability thesis on arxiv.