DOI: 10.5061/dryad.9w0vt4bn5
title: Data from: Rural selection drives the evolution of an urban-rural cline in coat color in gray squirrels

description: Phenotypic differences between urban and rural populations are
 well-documented, but the evolutionary processes driving trait variation
 along urbanization gradients are often unclear. We combined spatial data
 on abundance, trait variation, and measurements of fitness to understand
 cline structure and test for natural selection on heritable coat color
 morphs (melanic, gray) of eastern gray squirrels (Sciurus carolinensis)
 along an urbanization gradient. Population surveys using remote cameras
 and visual counts at 76 sites along the urbanization gradient revealed a
 significant cline in melanism, decreasing from 48% in the city center to
 &lt;5% in rural woodlands. Among 76 squirrels translocated to test for
 phenotypic selection, survival was lower for the melanic than gray morph
 in rural woodlands, whereas there was no difference in survival between
 color morphs in the city. These results suggest the urban-rural cline in
 melanism is explained by natural selection favoring the gray morph in
 rural woodlands combined with relaxed selection in the city. Our study
 illustrates how trait variation between urban and rural populations can
 emerge from selection primarily in rural populations rather than
 adaptation to novel features of the urban environment. This reposotory
 contains a) occupancy data, point count data, and R code used to estimate
 the urban-rural cline in melanism, and b) radiotelemetry data and R code
 used to estimate differential survival between color morphs in urban and
 rural environments.
description: # Data for "Rural selection drives the evolution of an urban-rural
 cline in coat color in gray squirrels"
 [https://doi.org/10.5061/dryad.9w0vt4bn5](https://doi.org/10.5061/dryad.9w0vt4bn5) ## Description of the data and file structure **This repository contains data and code for the following manuscript:** Cosentino, B.J., Vanek, J.P., and J.P. Gibbs. Rural selection drives the evolution of an urban-rural cline in coat color in gray squirrels. Ecology and Evolution. The following files are included: **cline.Rdata** Data used to fit the cline in melanism using all data. NA values represent days when trail cameras were not active and point counts were not conducted at a given site. **cline.R** R code used to fit the cline in melanism using all data. The script was run with R version 4.0.2, and it uses the *jagsUI* package (version 1.5.2). **cline\_subsetModel.Rdata** Data used to fit the cline in melanism with a subset of data. Variable definitions are as follows: * y.occ.g = gray detections * y.occ.m = melanic detections * y.ct.g = gray counts * y.ct.m = melanic counts * nsites = number of sites * nsurveys.occ = total number of survey days for occupancy data * nsurveys.ct = total number of surveys for count data * distance = distance from city center in km * dist.city.s = standardized distance from city center * temp.avg = mean daily temp (Celcius) for survey period inclusive of camera & count surveys (9/16/21-10/18/22) * temp.avg.occ = standardized mean daily temperature covariate for occupancy surveys * temp.avg.ct = standardized mean daily temperature covariate for count surveys * Xdist = sequence of distances for prediction * Xtemp = sequence of mean daily temps for prediction **cline\_subsetModel.R** R code used to fit the cline in melanism with a subset of data. **survival.Rdata** Radiotelemetry data used for survival analysis. NA values represent missing data. Variable definitions are as follows: * id = unique squirrel id * CAPTURE\_DATE = date of capture and translocation * END\_DATE = date of final status * MORPH = color morph * SEX = sex * MASS = mass in grams * CSIZE = collar size (14 or 21 g) * LANDSCAPE = urban or rural environment * DAYS.ACTIVE = number of days between translocation and final status recorded * STATUS = final status (confirmed mortality, probable mortality, possible mortality, missing, active) * tmp.start = daily mean temperature averaged for the first week post.translocation (Celcius) **survival.R** R code used for survival analysis. The script was run with R version 4.0.2, and it uses the *tidyverse* (version 2.0.0), *survival* (3.5.3) and *survminer* (0.4.9) packages.