Data and scripts underlying the publication: Quantifying the Spatial Scales of Animal Clusters Using Density Surfaces
DOI: 10.4121/61be5dd9-7880-48dc-bacf-36afbc3033ee
Datacite citation style
Dataset
Supplementary scripts to the publication "Quantifying the spatial scales of animal clustering using Density Surfaces"
We implement a method to quantify the degree of clustering of point location data at different spatial scales,
which uses Kernel Density Estimation to construct a density function from the underlying point-location data.
We build upon this method to automatically detect cluster diameters using smoothing kernels that better represent the perception neighbourhood of animals.
More details can be found in the manuscript.
These scripts construct the artificial data sets and results in the figures in the main text of the manuscript.
data_generator.py
This file contains the functions to construct the artificial data sets, as well as visualization tools to plot the point sets.
Running the main() function:
1. constructs all artificial data sets
2. creates visualizations of all generated and real-life datasets, saves them as .pdf files, and shows them on-screen
metric_calculator.py
This file contains the functions to calculate the metric described in the manuscript, as well as to compute Ripley's K function
and the Radial Distribution Function.
Running the main() function:
1. generates the metric functions for all artificial and real-life data sets
2. creates visualizations of all generated metric functions, saves them as .pdf files, and shows them on-screen
3. prints the found relevant spatial scales, and their metric values, in the terminal
elephant.pickle
This file contains the real-world dataset of elephant locations to be used in metric_calculator.py
The original data was collected in March 2014 in the Tsavo National Parks, Kenya.
We use a subset of the original data set, consisting of location data of 24 elephants obtained from an aerial image that were manually taken by human observers upon spotting the animals.
The aerial image was manually processed into spatial data by placing a point on the approximate centre point of each animal in the image, and projected onto a 100x100 xy-plane.
The data is serialized and de-serialized using the native Python package "pickle". The data format used by pickle is Python-specific.
To perform the experiments:
1. Ensure you have a functioning Python3 installation.
2. Install the required packages using pip:
- numpy
- matplotlib
- scipy
- scikit-learn
3. Run the main() function in data_generator.py to generate the artificial datasets
4. Run the main() function in metric_calculator.py to generate the metric functions and figures
History
- 2025-05-28 first online, published, posted
Publisher
4TU.ResearchDataFormat
py, pickleOrganizations
TU Eindhoven, Algorithms Cluster;Wildlife Ecology and Conservation Group, Wageningen University and Research;
Laboratory of Geo-information Science and Remote Sensing, Wageningen University and Research
DATA
Files (4)
- 2,606 bytesMD5:
b1ef7cdd96f08f7cd3b50e66b712b9fd
README.txt - 9,551 bytesMD5:
6979c9efdff2eb9d911173a2aac846eb
data_generator.py - 464 bytesMD5:
cd89e86a3ad8c7cba9025a0d7e6e3e68
elephant.pickle - 15,082 bytesMD5:
512306a6e2c90ce48591c3a2434776a9
metric_calculator.py -
download all files (zip)
27,703 bytes unzipped