Data from: Fruit abundance and moonlight shape sex-specific nocturnal activity and movement in kinkajous (Potos flavus)
Data files
Sep 17, 2026 version files 114.29 KB
-
activity_hourly.csv
55.31 KB
-
data_dictionary.md
9.61 KB
-
fruit_abundance_biweekly.csv
1.64 KB
-
kinkajou_analysis_pipeline.R
26.37 KB
-
README.md
14.10 KB
-
travel_distance_nightly.csv
7.26 KB
Abstract
Animals face a fundamental trade-off between food-related competition and predation risk in how they allocate time and behavior. Nocturnal mammals offer a particularly tractable system for testing this trade-off because moonlight creates a natural, quantifiable gradient in both predation risk and the visibility needed for safe movement. We used minute-by-minute focal observations of nine kinkajous (Potos flavus; 4 female, 5 male) in Panama to test how fruit abundance and moonlight predicted nocturnal activity budgets (percent time traveling, feeding, resting) and nightly travel distance. Beta-family generalized linear mixed models and a linear mixed model of log travel distance showed that fruit abundance was positively associated with percent time traveling and with nightly travel distance, and negatively associated with percent time feeding: kinkajous traveled more and fed less per hour when fruit was abundant, consistent with movement between many nearby productive trees rather than prolonged feeding at a few. Males traveled less as moonlight increased, while females traveled more. Rainfall had no independent effect. We interpret the sex-reversed moonlight response as evidence that moonlight elevates predation risk for males while facilitating movement for the more food-limited females of this frugivorous carnivore.
Dataset DOI: 10.5061/dryad.x3ffbg82w
Description of the data and file structure
Kinkajou (Potos flavus) nocturnal activity, movement, and fruit availability, Panama 1996
Dataset title
Nocturnal activity budgets, travel distances, and fruit availability for kinkajous (Potos flavus) in Parque Nacional Soberania, Panama, 1996
Author
Roland W. Kays: North Carolina Museum of Natural Sciences, Raleigh, NC, USA Department of Forestry and Environmental Resources; North Carolina State University, Raleigh, NC, USA; ORCID: 0000-0002-2947-6665
Associated publication
Fruit abundance and moonlight shape sex-specific nocturnal activity and movement in kinkajous (Potos flavus). bioRxiv 2026
Date of data collection
7 February 1996 - 11 December 1996
Geographic location
Limbo Plot (approximately 104 ha), Pipeline Road, Parque Nacional Soberania, Republic of Panama. Approximately 9 deg 09’ N, 79 deg 44’ W.
Funding
Science Alliance and Department of Ecology and Evolutionary Biology at the University of Tennessee, the National Geographic Society, a National Science Foundation Graduate Student Fellowship, Eagle Creek, the American Museum of Natural History, and the Smithsonian Tropical Research Institute.
License
CC0 1.0 Universal (Public Domain Dedication), as required for Dryad deposits.
1. Overview
This package contains the complete data and analysis code needed to reproduce every figure and statistical result in the associated manuscript, which examines how fruit availability and moonlight predict nocturnal activity budgets and travel distances in kinkajous, and whether those relationships differ between the sexes.
The behavioral data derive from continuous, minute-by-minute focal-animal observations of nine individually marked kinkajous (5 males, 4 females; adults and subadults) followed on foot at night over a ten-month period. Radio-collared animals were located and followed using telemetry, with behavior scored visually using binoculars with a red-filtered headlamp in the understory and a spotlight in the canopy.
Three levels of temporal resolution are provided as separate files:
| Level | File | Rows |
|---|---|---|
| Individual x half-night x observation hour | activity_hourly.csv | 380 |
| Individual x half-night | travel_distance_nightly.csv | 63 |
| Fruit census date | fruit_abundance_biweekly.csv | 65 |
Total behavioral observation effort represented here is 380 individual-hours across 65 observation sessions. Observation sessions were normally half-nights (dusk to midnight or midnight to dawn); one session was a full night.
Environmental covariates (moonlight geometry and intensity, cloud cover, precipitation, temperature) were derived retrospectively for the exact date, clock hour, and site coordinates of each observation. See Section 4 for provenance.
2. File manifest
| file | spreadsheet size | description |
|---|---|---|
| activity_hourly.csv | 380 rows x 29 columns | 54 KB |
| travel_distance_nightly.csv | 63 rows x 19 columns | 7 KB |
| fruit_abundance_biweekly.csv | 65 rows x 5 columns | 2 KB |
| data_dictionary.md | documentation | |
| kinkajou_analysis_pipeline.R | analysis code | |
| README.md | this file |
data_dictionary.md is the authoritative column-by-column reference for all three data files, giving the type, units, coding, and definition of every variable. Consult it before using any column. The summary below is orientation only.
activity_hourly.csv — primary behavioral data
One row per individual per observation session per clock hour of observation.
- Identifiers: individual_id, sex, age_class, session_id, session_date, hour_of_night, clock_hour
- Behavioral response variables: travel_pct, eat_pct, rest_pct, social_pct, unk_pct (percent of the observation hour), and the corresponding raw minute counts travel_min, eat_min, rest_min, social_min, unk_min
- Environmental covariates: fruit_abundance_index, fruit_distance_index, moonlight_relative, illumination_lux, moon_phase_frac, cloud_frac, realized_moonlight, precip_mm, temperature_c
- Design variables: breeding_season, breeding_season_label, is_elvis_12hr_session
Behavior categories are mutually exclusive within a minute, so the five minute columns sum to the observation hour. Note the important caveat in Section 5 regarding partially observed hours.
travel_distance_nightly.csv — movement data
One row per individual per half-night. distance_m is the total distance traveled during the session (range 74–2,447 m), with hours_tracked and speed_m_per_hr giving effort and rate. Environmental covariates are session means (mean_illumination_lux, mean_moonlight_relative, mean_moon_phase, mean_cloud_frac, mean_realized_moonlight, total_precip_mm, mean_temp_c) joined to the same fruit-census and breeding-season variables as above.
fruit_abundance_biweekly.csv — resource availability
The forest-wide fruit census time series that both behavioral files draw on. fruit_abundance_index (range 2–49) is a count-based index of fruiting-tree abundance along the census route; fruit_distance_index (range 154–1,485 m) is the mean distance between fruiting trees on the same date. These two variables are strongly inversely related (r = −0.48): high-abundance census dates are dates on which fruiting trees were closely spaced. This is important for interpreting the fruit effects, and is discussed in the associated manuscript.
3. Reproducing the analysis
Requirements
R (version 4.0 or later recommended) and the following packages:
glmmTMB, DHARMa, ggplot2, patchwork, dplyr, tidyr, purrr, readr, viridis
Install with:
install.packages(c("glmmTMB", "DHARMa", "ggplot2", "patchwork", "dplyr", "tidyr", "purrr", "readr", "viridis"))
Running
Place the three CSV files in a subfolder named data/, put kinkajou_analysis_pipeline.R alongside it, and run the script from that directory:
project/
├── kinkajou_analysis_pipeline.R
└── data/
├── activity_hourly.csv
├── travel_distance_nightly.csv
└── fruit_abundance_biweekly.csv
source("kinkajou_analysis_pipeline.R")
Two configuration variables at the top of the script control paths: DATA_DIR (default "data") and OUTPUT_DIR (default "."). Adjust these if your layout differs. The script sets a random seed so that the simulation-based residual diagnostics are reproducible.
The script requires no internet connection and no files other than the three CSVs. All environmental covariates are pre-computed and stored in the data files; nothing is fetched at run time.
Outputs
Running the script writes five figures and five summary tables:
Figures
- fig1_activity_vs_fruit.png — predicted activity budget vs. fruit abundance, by sex
- fig2_activity_vs_moonlight.png — predicted activity budget vs. moonlight, by sex
- fig3_effect_sizes_forest.png — standardized fixed-effect coefficients with 95% confidence interval across all models
- fig4_travel_distance_moonlight.png — predicted nightly travel distance vs. moonlight, by sex
- diagnostics_travel_model.png — simulation-based residual diagnostics for the primary model
Tables
- model_summary_table.csv — standardized coefficients for the focal covariates
- full_fixed_effects_table.csv — all fixed effects for every fitted model, including sex main effects and interactions
- model_aic_table.csv — AIC for every fitted model
- interaction_effects_summary.csv — sex-by-moonlight interaction tests and predicted ranges
- social_behavior_summary.csv — exploratory analysis of social behavior
Figures are written without embedded titles, so that captions live in the manuscript rather than in the image files.
Statistical approach
Activity-budget proportions are modeled with beta-family generalized linear mixed models; log travel distance with a linear mixed model. Because behavior was recorded continuously, consecutive hours within a session are not independent; models therefore include a first-order autoregressive correlation structure on the within-session residuals alongside random intercepts for individual identity. Moonlight is fitted in two parallel versions of each model — a clear-sky index and a cloud-adjusted index (see Section 4) — which is why the coefficient tables and the forest plot report two estimates per covariate.
4. Environmental covariate provenance
Moonlight. moonlight_relative and illumination_lux were computed from the position and phase of the moon for the exact site coordinates, date, and clock hour of each observation, using the modeling approach of Smielak (2023, Behavioral Ecology and Sociobiology 77:21), which estimates ground-level illumination rather than using lunar phase as a proxy. moonlight_relative is scaled relative to an average full moon at zenith.
An important scaling note: because the observation hours in this study never coincided with the moon being simultaneously at full phase and at zenith, the observed maximum of moonlight_relative is 0.673 rather than 1.0, and the observed maximum of realized_moonlight (the cloud-adjusted index) is 0.178. Neither index reaching 1.0 is a data error; it reflects the observation schedule. Figures 2 and 4 carry a note to this effect.
Cloud cover, precipitation, temperature. Retrieved from the Open-Meteo Historical Weather API (Zippenfenig 2023, Zenodo, doi:10.5281/zenodo.7970649), which serves ERA5 reanalysis data (Hersbach et al. 2020, Quarterly Journal of the Royal Meteorological Society 146:1999–2049), extracted at hourly resolution for the site coordinates.
Cloud-adjusted moonlight. realized_moonlight = moonlight_relative x (1 − cloud_frac), an estimate of moonlight actually reaching the forest after attenuation by cloud. This is a simple multiplicative approximation, not a radiative transfer model, and reanalysis cloud fraction is a coarse-grid product; it should be read as an improvement over clear-sky illumination rather than as a measurement of light at the animal.
Fruit availability. Field-censused along the established trail grid of the Limbo plot at approximately biweekly intervals through the study period, counting all fallen fruit meeting the census threshold (not only species kinkajous are known to eat). Full census methodology is given in Kays (1999, Journal of Mammalogy 80:589–599).
Travel distance. Reconstructed by observer pace-counting from mapped trail-marker landmarks with compass bearings, transcribed onto a plot map — not by telemetry triangulation or GPS.
5. Known limitations and caveats
Users should be aware of the following before reanalyzing these data.
Partially observed hours are rescaled. Where a clock hour was only partially observed — a session beginning mid-hour, or a temporary loss of visual contact — the recorded behavioral proportions were scaled to a full 60-minute-equivalent hour rather than retained as the true observed duration. Consequently the minute columns sum to a full hour in every row, and summing minutes across a session will overestimate actual observation time (by approximately 18% on average relative to independently recorded session totals). The percentage columns are internally consistent within each hour and are the appropriate response variables; absolute minute totals should not be summed across rows to estimate observation effort. All analyses in the associated manuscript use the within-hour percentages for this reason.
Small and unbalanced sample of individuals. Nine individuals contribute 65 sessions, and effort is uneven across them. Random-slope models are unlikely to be well identified for the sparsest animals. Individual identity is retained in the data so that this structure can be modeled explicitly, and it should be.
One full-night session. One session (flagged by is_elvis_12hr_session) ran a full night rather than a half-night. It is genuine and is retained in all analyses; the flag is provided so users can test its influence if they wish.
Sex is confounded with individual. With nine animals, any sex effect rests on between-individual contrasts among a small number of animals, and cannot be fully separated from individual idiosyncrasy. This applies to the sex-by-moonlight interactions in particular.
Fruit abundance and fruit spacing covary. As noted in Section 2, the abundance and inter-tree-distance indices are strongly inversely related. A model containing both should be interpreted with that collinearity in mind, and the direction of any fruit effect is best interpreted jointly rather than attributed to abundance alone.
Behavioral categories. unk_pct records time in which behavior could not be determined (typically loss of visual contact in dense canopy) and is not a behavior. social_pct is sparse and zero-inflated; analyses using it in the associated manuscript are labeled exploratory.
6. Citation
If you use these data or code, please cite both the data package and the associated publication:
Kays, R. 2026. Data and code from: Fruit abundance and moonlight shape sex-specific nocturnal activity and movement in kinkajous (Potos flavus). bioRxiv 2026
Dryad Digital Repository. https://doi.org/10.5061/dryad.x3ffbg82w
7## . Contact
Roland W. Kays, North Carolina Museum of Natural Sciences / North Carolina State University.
