Published August 26, 2025 | Version v4
Dataset Open

Moonlight as a missing piece in primate sleeping ecology

Description

README

Moonlight as a missing piece in primate sleeping ecology

(Zenodo deposit)

This dataset and code accompany the Ecology Letters manuscript. They document how we built used versus available sleeping-site datasets, generated multiple availability designs, and fitted Resource Selection Function (RSF) models to test the influence of moonlight and canopy structure on primate sleeping ecology. The deposit contains both the final dataset used in the main RSF analysis and HTML notebooks that illustrate the complete workflow step by step. Some steps require large external rasters (canopy height, Sentinel-2 NDVI) that are not distributed here, but the main model can be reproduced directly with the provided CSV.

Contents of this deposit

review_sleep_moon.csv
Dataset containing the complete details of all articles included in the review. Each entry lists metadata such as citation, species studied, geographic region, and whether moonlight or sleeping behavior variables were reported. This file supports transparency and reproducibility of the literature synthesis.

n10_b300_rsf.csv
Final dataset selected for the RSF analysis (10 available points per used point; 300 m buffer). This is the file used to reproduce the main statistical model.

covariates.html
Documents how the dataset of sleeping sites (used points) and the control points (available points) were created. Describes how available points were generated around each used point, how nightly identifiers were assigned, and how unsuitable areas were masked out.

buffers_points.html
Documents the generation of all combinations of available-point numbers and buffer sizes (for example: n1_b100, n10_b300, etc.). Each combination is saved as a dataframe with covariates attached (canopy, NDVI, moonlight, weather). The outputs are stored together in an R list.

rsf.html
Documents the modeling step. It loads the list of datasets, selects the chosen design (n10_b300), fits mixed-effects logistic RSF models, performs diagnostics, and produces figures and tables. This HTML shows the full workflow even though large external raster files are not included.

Workflow summary

  • Sleeping-site dataset preparation (covariates.html)
    • Define observed (used) sites and generate matched available points.
    • Apply spatial mask to exclude unsuitable areas.
    • Assign nightly identifiers and bind used/available into one table.
  • Availability design alternatives (buffers_points.html)
    • Iterate across different numbers of available points and buffer sizes.
    • Attach environmental covariates from rasters and weather data.
    • Save all designs into a named list (all_dfs_proc.rds).
  • RSF modeling (rsf.html)
    • Load all designs from the RDS.
    • Select the chosen design (n10_b300).
    • Fit RSF models with lunar × canopy interaction and environmental covariates.
    • Evaluate models, run diagnostics, and produce final figures.
  • Final dataset for reproducibility
    • The CSV file n10_b300_rsf.csv contains exactly the dataset used in the final RSF.
    • With this single file, the main model can be reproduced without needing the heavy raster inputs.
  • External data not included
    • The workflow shown in the HTMLs requires external geospatial datasets that are not part of this deposit due to size and licensing restrictions:
    • ETH Global Canopy Height (10 m) raster, used for canopy metrics.
    • Sentinel-2 imagery, used to calculate NDVI.
    • Mask shapefile to exclude unsuitable areas.
    • Daily weather data (precipitation and temperature).

These resources are openly available from their original providers. The included CSV already contains the extracted values needed for the RSF.

Files

n10_b300_rsf.csv

Files (17.2 MB)

Name Size Download all
md5:e72f2ae90aed2ce8205edd0dd6665521
5.4 MB Download
md5:b0414f55cc0c532d517b36aad6ac6eeb
6.3 MB Download
md5:52541a4948ae01ca239d94a9142b01d4
1.1 MB Preview Download
md5:f95dce60d5490ea2e5cc5a1037e3e9cb
1.6 MB Download
md5:f59edcc28e30210cd92e927c83d90c82
162.3 kB Download
md5:8ed3d8f242d914dfca1ac90fdccdb676
2.6 MB Download