DOI: 10.5061/dryad.gmsbcc2wg
title: Using motion-detection cameras to monitor foraging behaviour of individual butterflies

description: The activity of many animals follows recurrent patterns and foraging is
 one of the most important processes in their daily activity. Determining
 movement in the search for resources and understanding temporal and
 spatial patterns in foraging has therefore long been central in
 behavioural ecology. However, identifying and monitoring animal movements
 is often challenging. In this study we assess the use of camera traps to
 track a very specific and small-scale interactions focused on the foraging
 behaviour of Heliconiini butterflies. Data on floral visitation was
 recorded using marked individuals of three pollen-feeding species of
 Heliconius (H. erato, H. melpomene and H. sara), and two closely related,
 non-pollen feeding species (Dryas iulia and Dryadula phaetusa) in a large
 outdoor insectary. We demonstrate that camera traps efficiently capture
 individual flower visitation over multiple times and locations and use our
 experiments to describe some features of their spatial and temporal
 foraging patterns. Heliconiini butterflies showed higher activity in the
 morning with strong temporal niche overlap. Differences in foraging
 activity between males and females was observed with females foraging
 earlier than males, mirroring published field studies. Some flowers were
 more explored than others, which may be explained by butterflies foraging
 simultaneously affecting each other’s flower choices. Feeding was grouped
 in short periods of intense visits to the same flower, which we refer to
 as feeding bouts. Heliconius also consistently visits the same flower,
 while non-Heliconius visited a greater number of flowers per day and their
 feeding bouts were shorter compared with Heliconius. This is consistent
 with Heliconius having more stable long-term spatial memory and foraging
 preferences than outgroup genera. More broadly, our study demonstrates
 that camera traps can provide a powerful tool to gather information about
 foraging behaviour in small insects such as butterflies.
description: <em>Experimental cage</em> The
 experimental cage consisted of a circular dome of approximately 12 m in
 diameter and 10 m in height covered with black mesh and located outdoors
 (Figure 1A). Inside the dome, motion-activated cameras (Mini Wildlife
 Trail Camera Version 18022, K&F Concept ©, Shenzhen, China) were
 positioned 30 cm away from a floral resource to be able to detect the
 small body of a butterfly (Figure 1B). To permit adequate focus at close
 proximity, extra external lens (half frame of +3.00 glasses, Figure 1B and
 Supp Figure 1) were added in front of the camera lenses, an adjustment
 which provided a clear image of a marked butterfly (Figure 1C and Video
 1). Cameras were set to have a 0.2 sec trigger time, maximum motion
 sensitivity, and to record 20 sec videos between 8 am and 4 pm, the period
 of highest activity for <em>Heliconius</em>.
 Each camera was pointed towards one flower in each plant cluster,
 created by tightly clumping a group of potted plants inside the dome using
 <em>Palicourea tomentosa</em> (synonyms: <em>Psychotria
 poeppigiana</em> and <em>Cephaelis tomentosa</em>),
 which has terminal inflorescences that are capitate with red bracts and
 yellow flowers (Figure 1C and 2). The pollen of this flower is documented
 to be highly consumed by <em>Heliconius</em> (Estrada and
 Jiggins, 2002) and visited by other Heliconinii species that exploit it as
 a nectar resource (<em>personal observations</em>). This
 permitted comparable data collection across both pollen and non-pollen
 feeding species. <em>Palicourea tomentosa</em> blooms are
 stable and produce new flowers each day at the same spot providing a
 temporally reliable resource (Coelho and Barbosa, 2004; Valois-Cuesta,
 López-Perea and Quinto-Valoyes, 2009). During the experiment, a few
 terminal inflorescences stopped blooming, and the camera position was
 therefore adjusted to capture another flower in the same cluster. Plant
 clusters were created to space out the cameras around the dome (Figure
 2). <em>Experimental
 procedure</em> At the beginning of each
 experiment adults were moved to the experimental cage, where butterflies
 could fly freely, with access to floral and hostplant resources in
 semi-natural conditions. We performed two experimental trials: i) In the
 first trial, performed from November to December of 2022, five plant
 clusters (with ~ 5 available flowers) were created inside the dome in a
 pentagon shape, 2.8 m between the clusters, each with one camera trap
 adjacent to a flower (Figure 2). In total, 15 days of data were collected
 with 58 individuals released inside the dome (16 <em>H.
 erato,</em> 16 <em>H. melpomene, </em>14 <em>H.
 sara</em> and 12 <em>D. iulia</em>). ii) In the second
 trial, we aimed to reduce competition that was observed during the first
 trial by arranging fewer flower clusters more distantly from one another,
 with four plant clusters organized in a rectangle, with 5 to 7 m between
 clusters (Figure 2). In this trial, butterflies were divided into five
 groups of two species (total of 19 <em>H. erato</em>, 13
 <em>H. melpomene</em>, 11 <em>D. iulia</em> and 11
 <em>D. phaetusa</em>), always pairing one
 <em>Heliconius</em> species with a
 non-<em>Heliconius</em> species with the same number of
 individuals. Each group was held in the dome for 10 days, and cameras were
 active during the last 5 days. Groups were run consecutively between March
 and May of 2023. <em>Video and data
 analysis</em> During the trials, each feeding
 event detection by the camera trap produced one video. These videos were
 reviewed and annotated using the image analysis software
 <em>Timelapse 2</em> (Greenberg, Godin and Whittington, 2019).
 For each video, the individual identity and species of the butterfly
 present were recorded. The videos also contained information about date,
 time of the day and temperature. Therefore, datasets of spatial and
 temporal foraging patterns were obtained by counting video appearances and
 grouping visits for each individual by date, time and flower cluster
 (Figure 2). Individuals with less than two recorded visits were removed
 from the dataset. Activity pattern graphs were made using
 <em>density</em> in ‘ggplot2’ package (Wickham, 2016) in R (R
 Core Team, 2023), and consist of a representation of the distribution
 (using kernel density estimate, a smoothed version of a histogram) of
 videos recordings for each species and/or sex during time.
 Differences in visitation rates/patterns between sex and species
 were calculated using linear mixed-effect models (‘lmer’) implemented with
 the ‘lme4’ package in R (Bates <em>et al.</em>, 2015) using a
 <em>poisson</em> distribution for raw data or
 <em>binomial </em>distribution for proportion data. We
 included “individual” as random factor when response variable was per
 individual and “week” as random factor for trial 2 (as stated above, trial
 2 was divided in 5 groups, each on a different week), followed by analysis
 of deviance (ANOVA Type II) and Tukey’s post hoc tests with the packages
 ‘car’ and ‘emmeans’ in R (Fox and Weisberg, 2019; Lenth, 2023). In
 addition, Chi-squared tests (R built-in package ‘stats’) were used to
 compare the absolute number of visits observed to each flower against the
 expected number assuming random foraging (presumed random probability of
 0.2 for trial 1 and 0.25 for trial 2 for each flower) for each individual.
 Individuals with less then 3 flower visits were removed from the
 analysis. Finally, the level of sequence repetition in
 flower visits was explored to assess whether there was any evidence of
 potential trap line foraging in this experimental set up. Using individual
 visit sequence data, we used determinism analysis, a statistical metric to
 quantify the predictability of sequential behaviours (Ayers, Armsworth and
 Brosi, 2015). The denominator of the determinism (DET) varies between 0,
 indicating that the individual never repeats the same sequence, and 1,
 indicating that the individual always repeats the same sequence. For each
 individual the DET was calculated using the minimal sequence length of
 recurrent visits of 3 different flowers (Ayers, Armsworth and Brosi,
 2015).
description: # Using motion-detection cameras to monitor foraging behaviour of
 individual butterflies
 [https://doi.org/10.5061/dryad.gmsbcc2wg](https://doi.org/10.5061/dryad.gmsbcc2wg) ## Description of the data and file structure Software used: R. Files description: *Script_Camera_traps.R* This file contains all the packages, statistical models and graphs used in the manuscript. It is divided per analysis in the same order as the published article. To use the script, you need to add the .txt files: *camera_1trial_03AUG2023.txt* This file contains data from camera traps in the 1st trial. Head: "RootFolder" (name of the folder with camera trap files), "File" (name of the video file), "RelativePath" (name of the sub folder with camera trap files), "Date" (date of the videos), "Time" (time of the videos), "TimeT" (time transformed in number), "DeleteFlag" (if true, video has no animal detection and should be deleted, if false video has butterfly detection, in this case all of it is false), "Rain" (if it was raining during the animal detection), "Camera" (number of the camera / flower cluster), "CameraID" (number of the camera / flower cluster), "NInd" (number of individuals in the video), "Species" (name of the observed species), "Ind" (specific wing marking), "Ind_ID" (individual identification), "Sex" (male or female), "TempC" (temperature shown in the video, in Celsius). *camera_2trial_09SET2023.txt* This file contains data from camera traps in the 2nd trial. Head: "week" (which group / week the experiment was performed), "RootFolder" (name of the folder with camera trap files), "File" (name of the video file), "RelativePath" (name of the sub folder with camera trap files), "Date" (date of the videos), "Time" (time of the videos), "TimeT" (time transformed in number), "DeleteFlag" (if true, video has no animal detection and should be deleted, if false video has butterfly detection, in this case all of it is false), "Rain" (if it was raining during the animal detection), "Camera" (number of the camera / flower cluster), "CameraID" (number of the camera / flower cluster), "NInd" (number of individuals in the video), "Species" (name of the observed species), "Ind" (specific wing marking), "Ind_ID" (individual identification), "Sex" (male or female), "TempC" (temperature shown in the video, in Celsius). *feedb_data_trial1_06dec2023.txt* This file contains data of the feeding bouts detected during the 1st trial. Head: "Species" (name of the observed species), "Ind_ID" (individual identification), "Sex" (male or female), "feed_b" (order of the feeding bout, ex: first, second, etc), "duration" (total duration of the feeding bout in hours), "n_feed_b" (how many times the individual came back to the same flower), "intervals" (average of the intervals between feedings), "camera" (which camera the feeding bout was detected). *feedb_data_trial2_06dec2023.txt* This file contains data of the feeding bouts detected during the 2nd trial. Head: "Species" (name of the observed species), "Ind_ID" (individual identification), "Sex" (male or female), "week" (which group / week the experiment was performed), "feed_b" (order of the feeding bout, ex: first, second, etc), "duration" (total duration of the feeding bout in hours), "n_feed_b" (how many times the individual came back to the same flower), "intervals" (average of the intervals between feedings), "camera" (which camera the feeding bout was detected). "NA" values: individuals that did not perform feeding bouts. *trials_table_July2024.txt* This file contains raw data of how many times each individual was detected in each camera / flower cluster, both trials included. Head: "Trial" (which trial, 1 or 2), "Species" (name of the observed species), "Ind_ID" (individual identification), "Sex" (male or female), "camera1" (number of detections on camera 1), "camera2" (number of detections on camera 2), "camera3" (number of detections on camera 3), "camera4" (number of detections on camera 4), "camera5" (number of detections on camera 5). *x2_data_July2024.txt* This file contains data from the Chi Square analysis. Head: "Trial" (which trial, 1 or 2), "Species" (name of the observed species), "Ind_ID" (individual identification), "X2" (Chi Square result), "df" (degrees of freedom), "p_value" (p value resulted from the Chi Square), "signf" (if 1, p &lt; 0.05; if 0, p &gt; 0.05), "total_act" (total number of activity detected). *Video_1.avi* Video as an example. Data was extracted from videos like this one.