Data and code from: Beyond thermoregulation: Active behavioural regulation of ultraviolet light exposure by a free-ranging lizard
Data files
Jul 17, 2026 version files 1.26 MB
-
dev_resampler.R
2.68 KB
-
Lattanzio_2026_RawData.xlsx
1.24 MB
-
README.md
16.81 KB
-
spr_resampler.R
4.91 KB
Abstract
Reptile behavioural ecology and regulatory behaviours have long been interpreted primarily through the lens of thermoregulation. However, basking and shuttling also expose animals to ultraviolet (UV) radiation necessary for vitamin D3 synthesis and other fitness-relevant processes. Here, I adapt a standard thermoregulation framework to UV data to test whether lizards actively regulate UV exposure in nature. Using field observations, operative models, laboratory preference trials, and custom-built UV data loggers, I quantified the effectiveness of UV regulation and thermoregulation by ornate tree lizards (Urosaurus ornatus) across contrasting microhabitats (trees vs. snags). Lizards consistently preferred low UV exposures despite high environmental variation, particularly on snags. While U. ornatus thermoregulated equally well in both microhabitats, lizards were far more effective at UV regulation in trees than in snags. This difference likely reflects structural contrasts, as trees offer finer mosaics of sun and shade, whereas snags often impose unavoidable full-sun exposure during basking. My results provide field evidence that wild lizards actively regulate their UV exposure. They further suggest that, for U. ornatus at least, the physiological consequences of microhabitat selection depend more strongly on UV conditions than on thermal conditions. Recognizing UV regulation as a fundamental component of reptile homeostasis alongside thermoregulation, together with the trade-offs between these regulatory demands, will broaden our understanding of reptile physiology and ecology and provide a stronger basis for predicting their ecological and evolutionary responses to environmental change.
Data and R code for Lattanzio (2026, Journal of Animal Ecology [ID: JAE-2025-00901])
This Dryad archive contains the data and R helper functions associated with Lattanzio (2026), a study of ultraviolet (UV) regulation, thermoregulation, and microhabitat use by ornate tree lizards (Urosaurus ornatus).
Files included:
Excel workbook containing the raw and processed data used for analyses, figures, and supporting information. The workbook includes the following sheets:
| Sheet | Description |
|---|---|
| Lizard_data | Main individual-level dataset for captured lizards. Includes lizard_ID [lizard identifier], cohort [capture cohort, first three letters of month and numeric day], capture_hour [hour during which lizard was captured], sex [male or female], snout-vent length [body size, in mm], microhabitat [perch use, tree or snag], tbody [body temperature at capture, in Celsius], tpref_avg [mean preferred body temperature, Celsius], ind_tset_lwr [individual lizard's lower thermal set point in gradient, Celsius], ind_tset_upr [individual lizard's upper thermal set point in gradient, Ceslius], tset_lwr [pooled lower thermal set point], tset_upr [pooled upper thermal set point], t_db [thermal deviation from the set-point range, Celsius], uvbody [UV exposure at capture, in UV index], ind_uvset_lwr [individual lizard's lower set point range in gradient, UV index], ind_uvset_upr [individual lizard's upper set point range in gradient, UV index], uv_db [UV deviation from the set-point range, UV index], uv_pref_avg [mean UV preference in gradient, UV index]. |
| UV_E calculations | Bootstrap/resampling outputs used to calculate UV regulatory effectiveness. Includes resampled operative (de) and body (db) deviations from the pooled UV set-point range, Hertz et al. (1993) effectiveness values (E_Hertz), and Blouin-Demers & Weatherhead (2001) effectiveness values (E_Blouin-Demers) for snag and tree microhabitats, and means of those values across all 1000 replicates. CI, lwr, and upr [95% confidence intervals] are included as well. |
| Temp_E calculations | Bootstrap/resampling outputs used to calculate thermoregulatory effectiveness. Includes resampled operative (de) and body (db) from the pooled thermal set-point range, Hertz et al. (1993) effectiveness values (E_Hertz), and Blouin-Demers & Weatherhead (2001) effectiveness values (E_Blouin-Demers) for snag and tree microhabitats, and means of those values across all 1000 replicates. CI, lwr, and upr [95% confidence intervals] are included as well. |
| ReptisunBulb_Calibration | Calibration data comparing Solarmeter_UVI [Solarmeter UVI values] to GUVA-S12SD_Volts [UV sensor voltage output] for the ReptiSun UV bulb used in laboratory trials. The GUVA-S12SD_convertedUVI values represent the conversion of raw volts to UV index via the best-fit equation [Equation 2] provided in Methods. |
| Figure2 | Data used to generate Figure 2, a boxplot comparing body temperature and UV exposure at capture. Variables include microhabitat [perch used, tree or snag], tbody [body temperature at capture, in Celsius], and uvbody [UV exposure at capture, in UV Index]. |
| Figure3 | Data used to generate Figure 3, which depicts variation in data logger and lizard values throughout the day with respect to set-point range values for both temperature and UV exposure. Variables include logger_hour [hour of the day], logger-uv_avg [mean UV index reading of loggers at that hour], logger-uv_max [maximum UV index value recorded across all loggers during that hour], logger-tavg [mean temperature reading of loggers at that hour], logger-tmax [maximum temperature reading of loggers during that hour], capture_hour [hour lizard was captured within], tbody [body temperature at capture], and uvbody [UV exposure at capture]. All temperatures are in Celsius and UV values in UV index. |
| Figure4 | Data used to generate Figure 4, an illustration of the change in regulatory effectiveness by microhabitat for both temperature and UV regulation. Variables include Microhabitat [tree or snag], Temperature-Effectiveness [mean effectiveness value for that given microhabitat type], and UV-Effectiveness [mean effectiveness value for that given microhabitat type]. Effectiveness values are calculated via the Hertz et al. (1993, American Naturalist) index, and generally scale between 0 and 1. |
| FigureS1 | Data used to generate Figure S1, which depicts the deviation from the respective set point range of data loggers and lizards for both temperature and UV. Variables include uv_db [deviation of lizard UV exposures at capture from their pooled set-point range], uv_de [deviation of data logger UV readings from the lizard's pooled set-point range], temperature_db [deviation of lizard body temperatures at capture from their pooled set-point range], temperature_de [deviation of data logger temperature readings from the lizard's pooled set-point range]. All temperatures are in Celsius and UV values in UV index. |
| FigureS2 | Data used to generate Figure S2, which depicts box plots of operative data logger temperature and UV values across sunlit and shaded portions of the two microhabitat types used in this study. Variables include, for temperature and UV [respectively], placement [shade or sun], microhabitat [tree or snag], and either temp_value [raw temperature readings by all data loggers] or uv_value [raw UV readings by all data loggers]. All temperatures are in Celsius and UV values in UV index. |
| FigureS3 | Data used to generate Figure S3, which depicts a stacked bar graph showing variation in behavior (basking versus other behaviors) in tree lizards at different years of study at this locality. Variables include Year [numerical], Behavior [Basking or Other Behaviors], Tree [counts of lizards observed doing a given behavior on a tree for that year], Snag [same, but for snags], Tree_proportion [proportion of total sample for that year engaging in that behavior on trees], Snag_proportion [same, but for snags]. |
| TextS1 | Data used for the supporting analysis of capture cohort/trial order effects. Includes lizard_id [lizard identifier], cohort [capture cohort, listed as first three letters of month and numeric day], tpref_avg [mean thermal preference, in Celsius], uv_pref_avg [mean UV preference, in UV Index], tbody [body temperature at capture, Celsius], and uvbody [UV exposure at capture, in UV Index] |
| TextS2 | Data used for main paper and supporting analyses comparing observed set-point ranges to alternative null distributions. Variables include Uniform, Gaussian, and Bimodal null set-point range distributions for UV [Uniform_randUVset, Gaussian_randUVset, Bimodal_randUVset] and temperature [Uniform_randTset, Gaussian_randTset, Bimodal_randTset], and observed set-point ranges for UV [Lizards_UVset[upper-lower] and temperature [Lizards_Tset[upper-lower]. |
This R script includes dev_sampler(), a base-R helper function for bootstrap resampling of numerical vectors. In my study, it was used to resample deviations of lizard body conditions (db) and operative environmental conditions (de) from preferred values. These resampled values were then used to estimate regulatory effectiveness (E) for temperature and UV exposure. Details on usage and inputs in the script itself.
This R script includes two functions:
- bimodalDist(): Helper function for generating bimodal random distributions.
- null_ranger(): Function for generating null distributions of set-point range widths from simulated environmental preference data.
In my study, null_ranger() was used to test whether observed temperature and UV set-point ranges from laboratory preference trials were narrower than expected by chance. The uniform distribution is used in the main paper; Gaussian and bimodal alternatives are discussed in the supporting information. Details and inputs in the script itself.
README.md
Information on data and scripts contained in this repository.
Software notes
No external R packages are required for the R functions as written. Users should set their R working directory to the desired output location before running the functions.
