'data.frame': 81868 obs. of 30 variables:
$ project_id : int 2003809 2003809 2003809 2003809 2003809 2003809 2003809 2003809 2003809 2003809 ...
$ deployment_id : chr "WM10.2 Ground" "WM10.2 Ground" "WM10.2 Ground" "WM10.2 Ground" ...
$ image_id : chr "0ebd72b9-ac23-4aa2-a59a-6994090772a3" "cfc1aa92-ec3c-4e23-b098-bfe384bac369" "354a921b-efdc-4ba4-bf64-f839e691af6c" "2c6a8ce1-f5fb-4319-a8be-db5a7bd0956d" ...
$ sequence_id : int 1121312 1121312 1121312 1121312 1121312 1121312 1121312 1121312 1121312 1121312 ...
$ filename : chr "IMG_0526.JPG" "IMG_0524.JPG" "IMG_0529.JPG" "IMG_0525.JPG" ...
$ location : chr "https://app.wildlifeinsights.org/download/2018087/project/2003809/data-files/0ebd72b9-ac23-4aa2-a59a-6994090772a3" "https://app.wildlifeinsights.org/download/2018087/project/2003809/data-files/cfc1aa92-ec3c-4e23-b098-bfe384bac369" "https://app.wildlifeinsights.org/download/2018087/project/2003809/data-files/354a921b-efdc-4ba4-bf64-f839e691af6c" "https://app.wildlifeinsights.org/download/2018087/project/2003809/data-files/2c6a8ce1-f5fb-4319-a8be-db5a7bd0956d" ...
$ is_blank : logi NA NA NA NA NA NA ...
$ identified_by : chr "Kayla Dreher" "Kayla Dreher" "Kayla Dreher" "Kayla Dreher" ...
$ wi_taxon_id : chr "febff896-db40-4ac8-bcfe-5bb99a600950" "febff896-db40-4ac8-bcfe-5bb99a600950" "febff896-db40-4ac8-bcfe-5bb99a600950" "febff896-db40-4ac8-bcfe-5bb99a600950" ...
$ class : chr "Mammalia" "Mammalia" "Mammalia" "Mammalia" ...
$ order : chr "Cetartiodactyla" "Cetartiodactyla" "Cetartiodactyla" "Cetartiodactyla" ...
$ family : chr "Cervidae" "Cervidae" "Cervidae" "Cervidae" ...
$ genus : chr "Odocoileus" "Odocoileus" "Odocoileus" "Odocoileus" ...
$ species : chr "hemionus" "hemionus" "hemionus" "hemionus" ...
$ common_name : chr "Mule Deer" "Mule Deer" "Mule Deer" "Mule Deer" ...
$ uncertainty : logi NA NA NA NA NA NA ...
$ timestamp : chr "2021-06-14 06:13:52" "2021-06-14 06:13:50" "2021-06-14 06:14:08" "2021-06-14 06:13:51" ...
$ age : logi NA NA NA NA NA NA ...
$ sex : logi NA NA NA NA NA NA ...
$ animal_recognizable : logi NA NA NA NA NA NA ...
$ individual_id : logi NA NA NA NA NA NA ...
$ number_of_objects : int 1 1 1 1 1 1 1 1 1 1 ...
$ individual_animal_notes: logi NA NA NA NA NA NA ...
$ behavior : logi NA NA NA NA NA NA ...
$ highlighted : chr "false" "false" "false" "false" ...
$ markings : logi NA NA NA NA NA NA ...
$ cv_confidence : logi NA NA NA NA NA NA ...
$ license : chr "CC-BY" "CC-BY" "CC-BY" "CC-BY" ...
$ fuzzed : chr "false" "false" "false" "false" ...
$ deployment_fuzzed : chr "false" "false" "false" "false" ...
As with the deployment data, this needs a slight modification
number <-nrow(camtraps) # number of rows in the datasetprint(paste("Number of photographs:", number))
[1] "Number of photographs: 81868"
Other inital dataset information
# Count how many times the genus has not been identified, and therefor the photograph does not contain relevant speciesempty_genus <-sum(camtraps$genus =="")# Proportion of datasetproportion <- (empty_genus/nrow(camtraps))*100print(paste("Photos with no Genus ID:",empty_genus))
[1] "Photos with no Genus ID: 12853"
print(paste("Percentage of photographs without animal captures:",proportion))
[1] "Percentage of photographs without animal captures: 15.6996628719402"
Number of species:
# Combine genus and species into a full species namecamtraps$full_species <-paste(camtraps$genus, camtraps$species, sep =" ")# Extract unique speciesunique_species <-unique(camtraps$full_species)# Count the number of unique speciesprint(paste("Number of unique species:",length(unique_species)))
This is the total number of photos but we need to filter out those that are incorrectly or incompletely identified
# only Homo species are sapiens, so we can add that datacamtraps <- camtraps %>%mutate(species =ifelse(genus =="Homo"& species =="", "sapiens", species))# a similar argument could be made for the Tamias genus as this only has one extant species under current taxonomy, but this is less certain and is not a species of interest, so no adjustment will be made to this# Clean trailing/leading spacescamtraps$deployment_id <-trimws(camtraps$deployment_id)
Remove incomplete identifications
# Check for missing values in genus missing_genus <-sum(is.na(camtraps$genus) | camtraps$genus =="")# Check for missing values in species missing_species <-sum(is.na(camtraps$species) | camtraps$species =="")missing_genus
[1] 12853
missing_species
[1] 12873
There are missing data fields, so lets remove them.
# Filter out rows with missing or empty genuscamtraps <- camtraps %>%filter(!is.na(genus) & genus !="")camtraps <- camtraps %>%filter(!is.na(species) & species !="")# Combine 'genus' and 'species' into a new 'full_species' column in the camtraps datasetcamtraps <- camtraps %>%mutate(full_species =paste(genus, species, sep =" "), # Combine genus and speciesfull_species =trimws(full_species) # Remove any leading/trailing whitespace )
Check the dataset again to ensure removal completed as expected.
# Extract unique speciesunique_species <-unique(camtraps$full_species)# Count the number of unique speciesprint(paste("Number of unique species:",length(unique_species)))
#count number of deploymentsunique_deployments <-unique(deployment$deployment_id)num_all_deployments <-length(unique_deployments)#count number of successful deploymentssuccessful_deployments<-unique(camtraps$deployment_id)num_successful_deployments <-length(successful_deployments)#how many were not successful?total<-num_all_deployments - num_successful_deploymentsprint(paste("Number of deployments with no captures:", total))
[1] "Number of deployments with no captures: 0"
So there were no failed deployments in the dataset - yay!
Sampling Period information
# checking for time NAsprint(sum(is.na(deployment$start_date)))
[1] 0
print(sum(is.na(deployment$end_date)))
[1] 0
No dates missing either - yay!
# Find the earliest start dateearliest_start_date <-min(deployment$start_date, na.rm =TRUE)# Find the latest end datelatest_end_date <-max(deployment$end_date, na.rm =TRUE)# View the resultsprint(paste("Earliest start date:", earliest_start_date))
[1] "Earliest start date: 2020-10-08"
print(paste("Latest end date:", latest_end_date))
[1] "Latest end date: 2021-10-31"
# Calculate the interval for each deploymentdeployment$interval <-interval(deployment$start_date, deployment$end_date)# If you want to calculate the duration in days, hours, etc.deployment$duration_days <-as.numeric(deployment$interval) / (60*60*24) # Convert to days# Check the resultsprint(head(deployment[, c("start_date", "end_date", "duration_days")],5))
Min. 1st Qu. Median Mean 3rd Qu. Max.
348.0 352.0 367.0 364.3 375.5 376.0
This data is quite evenly spread with only a small range between the minimum and maximum.
An important metric for reporting is survey effor so lets calculate that too.
# Sum the duration_days to calculate total camera days (sampling effort)total_camera_days <-sum(deployment$duration_days, na.rm =TRUE)# Round the result to NO decimal placestotal_camera_days_rounded <-round(total_camera_days, 0)# View the rounded resultprint(paste("Total camera days (sampling effort):", total_camera_days_rounded))
[1] "Total camera days (sampling effort): 6921"
Camera trap locations
An important part of describing the data is the geographical context. lets make some!
Map creation
library(leaflet)m <-leaflet() %>%# call leafletaddTiles() %>%# add the default basemapaddMarkers( # Add circles for stationslng=deployment$longitude, lat=deployment$latitude) m # return the map
Relative Abundance Index
To compare the relative abundance of animals in the sample we can calculate a relative index
event.sp <-function(camtraps, total_camera_days_rounded, time_threshold =NULL) {# A) No threshold → raw countsif (is.null(time_threshold)) { trapping_events <- camtraps %>%group_by(full_species, deployment_id) %>%summarise(trapping_event_count =n(), .groups ="drop") } else {# B) Threshold → independent events trapping_events <- camtraps %>%group_by(full_species, deployment_id) %>%arrange(timestamp, .by_group =TRUE) %>%mutate(time_diff = timestamp -lag(timestamp),new_event =if_else(is.na(time_diff) | time_diff > time_threshold, 1, 0) ) %>%summarise(trapping_event_count =sum(new_event), .groups ="drop") }# Add RAIif (length(total_camera_days_rounded) ==1) { trapping_events <- trapping_events %>%mutate(RIA = trapping_event_count / total_camera_days_rounded) } elseif (is.data.frame(total_camera_days_rounded)) { trapping_events <- trapping_events %>%left_join(total_camera_days_rounded, by ="deployment_id") %>%mutate(RIA = trapping_event_count / total_camera_days_rounded) } else {stop("total_camera_days_rounded must be a single number or a data frame keyed by deployment_id.") }return(trapping_events)}
# With a 30-minute threshold (in seconds)trapping_events_with_threshold <-event.sp( camtraps, total_camera_days_rounded,time_threshold =30*60)# Summarize results across all deploymentsspecies_summary <- trapping_events_with_threshold %>%group_by(full_species) %>%summarise(total_trapping_event_count =sum(trapping_event_count, na.rm =TRUE),total_RAI =sum(RIA, na.rm =TRUE),.groups ='drop' ) %>%arrange(desc(total_trapping_event_count))# Print a nicely formatted tablekable( species_summary,format ="html",col.names =c("Species", "Total Trapping Events", "Total RAI"),caption ="Summary of Trapping Events and RAI by Species")
Summary of Trapping Events and RAI by Species
Species
Total Trapping Events
Total RAI
Martes caurina
1513
0.2186100
Tamiasciurus hudsonicus
139
0.0200838
Homo sapiens
104
0.0150267
Gulo gulo
91
0.0131484
Vulpes vulpes
72
0.0104031
Odocoileus hemionus
61
0.0088138
Cervus canadensis
54
0.0078023
Ursus americanus
49
0.0070799
Cervus elaphus
36
0.0052016
Perisoreus canadensis
32
0.0046236
Cyanocitta stelleri
31
0.0044791
Canis latrans
7
0.0010114
Poecile gambeli
6
0.0008669
Puma concolor
5
0.0007224
Canis familiaris
4
0.0005780
Glaucomys sabrinus
3
0.0004335
Lepus americanus
3
0.0004335
Picoides arcticus
3
0.0004335
Callospermophilus lateralis
2
0.0002890
Canis lupus
2
0.0002890
# Save and export this tablelibrary(gt)gt_table <- species_summary %>%rename(Species = full_species,`Total Trapping Events`= total_trapping_event_count,`Total RAI`= total_RAI ) %>%gt() %>%tab_header(title ="Summary of Trapping Events and RAI by Species" ) %>%cols_align(align ="center",columns =everything() ) %>%fmt_number(columns =`Total RAI`,decimals =3 )gtsave(gt_table, "RAI.png")
This has given us an overview of the presence of species in the samples. Note that this is naive so no co-variates are utalised and no difference in detection is assessed. This is a good starting point as it shows the frequency of different species detections, helping to guide as we can see if there is sufficent data on the species of interest to continue.
We can map this data too:
library(dplyr)library(ggplot2)library(patchwork)# 1. Filter to target speciescamtraps_filtered <- camtraps %>%filter(full_species %in% target_species)# 2. Count detections per species per deploymentcounts <- camtraps_filtered %>%count(full_species, deployment_id, name ="n_detections") %>%left_join( deployment %>%select(deployment_id, longitude, latitude),by ="deployment_id" )# 3. Extract species listspecies_list <-unique(counts$full_species)# 4. Create list to store plotsplot_list <-list()# 5. Loop through species and build weighted mapsfor (sp in species_list) { df <- counts %>%filter(full_species == sp) p <-ggplot(df, aes(longitude, latitude)) +geom_point(aes(size = n_detections),colour ="black",alpha =0.7 ) +scale_size(range =c(2, 12), guide ="none") +# dot size = weightingcoord_equal() +theme_minimal(base_size =14) +labs(title = sp, x =NULL,y =NULL ) +theme(plot.title =element_text(face ="bold", size =16),axis.text =element_blank(),axis.ticks =element_blank() ) plot_list[[sp]] <- p}# 6. Combine into a matrix layout (3 columns) with a global titlematrix_plot <-wrap_plots(plot_list, ncol =3) +plot_annotation(title ="Detection Maps by Species",theme =theme(plot.title =element_text(size =22, face ="bold", hjust =0.5) ) )# 7. Export as a high‑resolution PNGggsave(filename ="species_detection_matrix_weighted.png",plot = matrix_plot,width =14,height =10,dpi =300)matrix_plot
and as a combined map:
library(ggplot2)# Extract species list directly from your RAI tablespecies_list <- comparison %>%distinct(full_species) %>%filter(full_species %in% target_species) %>%pull(full_species)# Loop through each speciesfor (sp in species_list) {# Join detections for this species with total counts df <- camtraps %>%filter(full_species == sp) %>%left_join( comparison %>%select( full_species,total_count =`total_trapping_event_count_30‑min threshold` ),by ="full_species" ) %>%left_join( deployment %>%select(deployment_id, longitude, latitude),by ="deployment_id" ) %>%distinct(deployment_id, longitude, latitude, total_count)# Plot heatmap for this species p <-ggplot(df, aes(longitude, latitude)) +stat_density_2d(aes(weight = total_count, fill =after_stat(level)),geom ="polygon",contour =TRUE,alpha =0.7 ) +scale_fill_viridis_c(option ="magma", guide ="none") +geom_jitter(aes(size = total_count),width =0.002,height =0.002,alpha =0.6,colour ="white",show.legend =FALSE ) +coord_equal() +theme_minimal(base_size =14) +labs(title =paste("Count Heatmap —", sp),x =NULL,y =NULL ) +theme(plot.title =element_text(face ="bold", size =18),axis.text =element_blank(),axis.ticks =element_blank() )print(p)}
Warning in stat_density_2d(aes(weight = total_count, fill = after_stat(level)),
: Ignoring unknown aesthetics: weight
Warning: Computation failed in `stat_density2d()`.
Caused by error in `precompute_2d_bw()`:
! The bandwidth argument `h` must contain numbers larger than 0.
ℹ Please set the `h` argument to stricly positive numbers manually.
Warning in stat_density_2d(aes(weight = total_count, fill = after_stat(level)),
: Ignoring unknown aesthetics: weight
Warning in stat_density_2d(aes(weight = total_count, fill = after_stat(level)), : Ignoring unknown aesthetics: weight
Computation failed in `stat_density2d()`.
Warning in stat_density_2d(aes(weight = total_count, fill = after_stat(level)),
: Ignoring unknown aesthetics: weight
Warning in stat_density_2d(aes(weight = total_count, fill = after_stat(level)),
: Ignoring unknown aesthetics: weight
Warning in stat_density_2d(aes(weight = total_count, fill = after_stat(level)),
: Ignoring unknown aesthetics: weight
Warning in stat_density_2d(aes(weight = total_count, fill = after_stat(level)),
: Ignoring unknown aesthetics: weight
These are a nice selection of visuals showing that not all the species appear in all the sample sites. They are not that clear though so lets move on.
Occupancy Modeling Data Preparation
Adding Covariates
Elevation
library(elevatr)
elevatr v0.99.0 NOTE: Version 0.99.0 of 'elevatr' uses 'sf' and 'terra'. Use
of the 'sp', 'raster', and underlying 'rgdal' packages by 'elevatr' is being
deprecated; however, get_elev_raster continues to return a RasterLayer. This
will be dropped in future versions, so please plan accordingly.
# Assuming deployment dataset contains 'longitude' and 'latitude' columnscoordinates <-data.frame(x = deployment$longitude, y = deployment$latitude)# Get elevation dataelevation_data <-get_elev_point(coordinates, prj ="EPSG:4326", #coordinate system Idaho Trans Merc, src ="aws")# data source used for elevation
Mosaicing & Projecting
Note: Elevation units are in meters
# Add the elevation (in meters) as a new column to the deployment datasetdeployment$elevation <- elevation_data$elevation
Topographic Position Index
library(raster)# to use rasters
Loading required package: sp
Attaching package: 'raster'
The following object is masked from 'package:dplyr':
select
library(sp) # to manage spatial datalibrary(gstat) # for geostatistical modelling#Set correct CRSidtm_crs <-CRS("+proj=tmerc +lat_0=42.5 +lon_0=-114 +k=0.9996 +x_0=2500000 +y_0=1200000 +datum=NAD83 +units=m +no_defs")# Step 1: Create a SpatialPointsDataFrame, which combines# point coordinates and elevation in a single spatial objectcoordinates_spdf <-SpatialPointsDataFrame(coords = coordinates,data =data.frame(elevation = elevation_data$elevation),proj4string = idtm_crs)# Step 2: Define a finer grid for interpolation to avoid gaps (adjust resolution)# if the grid is too coarse, there will be gaps or strange patternsgrid_extent <-extent(coordinates_spdf)grid <-expand.grid(x =seq(from = grid_extent@xmin, to = grid_extent@xmax, by =0.005), # Finer resolutiony =seq(from = grid_extent@ymin, to = grid_extent@ymax, by =0.005))# and now creates a spatial objectcoordinates_grid <-SpatialPoints(grid, proj4string = idtm_crs)# Step 3: Perform kriging interpolation with more nearby points (nmax = 100)kriging_model <-gstat(formula = elevation ~1, locations = coordinates_spdf, nmax =100)elevation_kriged <-predict(kriging_model, newdata = coordinates_grid)
[inverse distance weighted interpolation]
# Step 4: Convert the kriged result into a rasterelevation_raster <-rasterFromXYZ(as.data.frame(elevation_kriged)[, c("x", "y", "var1.pred")])# Step 5: Calculate ruggedness using terrain function with 'tpi'ruggedness <-terrain(elevation_raster, opt ="tpi", unit ="degrees")# Step 6: Handle NA values: Interpolate use focal interpolation for missing valuesruggedness_filled <-focal(ruggedness, w =matrix(1, 3, 3), fun = mean, na.rm =TRUE, pad =TRUE)# Step 7: Extract ruggedness values for each pointdeployment$ruggedness <-extract(ruggedness_filled, coordinates_spdf)# Replace NAs with median ruggednessmedian_ruggedness <-median(deployment$ruggedness, na.rm =TRUE)deployment$ruggedness[is.na(deployment$ruggedness)] <- median_ruggedness
'data.frame': 10108 obs. of 23 variables:
$ STATION : chr "USR0000OFLA" "USR0000OFLA" "USR0000OFLA" "USR0000OFLA" ...
$ NAME : chr "FLAGSTAFF HILL OREGON, OR US" "FLAGSTAFF HILL OREGON, OR US" "FLAGSTAFF HILL OREGON, OR US" "FLAGSTAFF HILL OREGON, OR US" ...
$ LATITUDE : num 44.8 44.8 44.8 44.8 44.8 ...
$ LONGITUDE: num -118 -118 -118 -118 -118 ...
$ ELEVATION: num 1202 1202 1202 1202 1202 ...
$ DATE : chr "2020-10-08" "2020-10-09" "2020-10-10" "2020-10-11" ...
$ DAPR : int NA NA NA NA NA NA NA NA NA NA ...
$ MDPR : num NA NA NA NA NA NA NA NA NA NA ...
$ PRCP : num NA NA NA NA NA NA NA NA NA NA ...
$ SNOW : num NA NA NA NA NA NA NA NA NA NA ...
$ SNWD : num NA NA NA NA NA NA NA NA NA NA ...
$ TAVG : int 62 62 51 47 53 52 45 44 53 55 ...
$ TMAX : int 76 75 61 56 63 62 53 54 66 64 ...
$ TMIN : int 52 52 40 38 47 45 39 35 37 50 ...
$ TOBS : int NA NA NA NA NA NA NA NA NA NA ...
$ WT01 : int NA NA NA NA NA NA NA NA NA NA ...
$ WT02 : int NA NA NA NA NA NA NA NA NA NA ...
$ WT03 : int NA NA NA NA NA NA NA NA NA NA ...
$ WT04 : int NA NA NA NA NA NA NA NA NA NA ...
$ WT05 : logi NA NA NA NA NA NA ...
$ WT06 : logi NA NA NA NA NA NA ...
$ WT08 : int NA NA NA NA NA NA NA NA NA NA ...
$ WT09 : logi NA NA NA NA NA NA ...
Data collected from the National Centers for Environmental Information. Lets see how the sample sites compare to weather station locations:
There are a number of NAs in this data which could cause issues wiuth later processing. It will be important to be midful of this.
Time Covariates
Rather than building a relative datasaet like we have above, we only need the relative time of capture where we have captures, not the data for all deployments.
Workflow - add sunrise time, sunset time and relative time to both to the captraps data
library(suncalc)library(activity)# 1) Get local date per capture (no conversion needed)camtraps_dates <- camtraps %>%mutate(date =as.Date(timestamp)) %>% dplyr::select(deployment_id, date) %>%distinct()# 2) Bring lat/lon per deployment_idsite_coords <- deployment %>% dplyr::select(deployment_id, latitude, longitude) %>%rename(lat = latitude, lon = longitude)coords <- camtraps_dates %>%left_join(site_coords, by ="deployment_id")# 3) Compute sunrise/sunset for capture dates onlysun_times <-getSunlightTimes(data = coords %>% dplyr::select(lat, lon, date),keep =c("sunrise", "sunset"),tz ="America/Los_Angeles")# Add deployment_id back in from coordssun_times <-bind_cols(coords %>% dplyr::select(deployment_id), sun_times)# 4) Join sunrise/sunset AND lat/lon back to camtrapscamtraps_with_sun <- camtraps %>%mutate(date =as.Date(timestamp)) %>%left_join(sun_times %>% dplyr::select(deployment_id, date, sunrise, sunset),by =c("deployment_id", "date")) %>%left_join(site_coords, by ="deployment_id") # ensures lat/lon per capture# 5) Compute corrected solar time (radians)tmp <-solartime( camtraps_with_sun$timestamp, camtraps_with_sun$lat, camtraps_with_sun$lon,tz =0# use 0 since timestamps are already local)# 6) Add solar time in hours and clock time in hourscamtraps_with_sun <- camtraps_with_sun %>%mutate(solar = tmp$solar,solar_hours = solar *24/ (2* pi),clock_hours =as.numeric(format(timestamp, "%H")) +as.numeric(format(timestamp, "%M")) /60+as.numeric(format(timestamp, "%S")) /3600 )# 7) Normalise differences to [-12, +12]normalize_diff <-function(x) { x <-ifelse(x >12, x -24, x) x <-ifelse(x <-12, x +24, x)return(x)}camtraps_with_sun <- camtraps_with_sun %>%mutate(diff =normalize_diff(clock_hours - solar_hours))
Export and save files
This now brings us to the completed datasets for analysis, lets slim and save
Warning: 'sp' namespace cannot be unloaded:
namespace 'sp' is imported by 'spacetime', 'raster' so cannot be unloaded
Warning: 'knitr' namespace cannot be unloaded:
namespace 'knitr' is imported by 'rmarkdown' so cannot be unloaded
Warning: 'dplyr' namespace cannot be unloaded:
namespace 'dplyr' is imported by 'tidyr' so cannot be unloaded
Occupancy Model of the Pacfic Marten (winter only)
Now this has been done, we can start to investigate and prepare for occupancy modeling. I am going to look at the Pacific marten due to a high number of sampling events and a wide range of co variate availability.
library(readr)library(lubridate)
Attaching package: 'lubridate'
The following objects are masked from 'package:base':
date, intersect, setdiff, union
library(dplyr)
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
library(knitr)library(kableExtra)
Attaching package: 'kableExtra'
The following object is masked from 'package:dplyr':
group_rows
library(tidyr)#| label: Calling the marten Datadeployments<-read.csv("deployment+covariates.csv")marten_img<-read.csv("images+covariates.csv")%>%filter(genus =="Martes")
In this data, effort is constant so it is not needed as a co variate (all deployments were the same)
# Step 1: Convert start_date and end_date to Date formatdeployments$start_date <-as.Date(deployments$start_date, format ="%Y-%m-%d")deployments$end_date <-as.Date(deployments$end_date, format ="%Y-%m-%d")# Step 2: Expand deployments into daily recordsdeployments_days <- deployments %>%rowwise() %>%mutate(day_seq =list(seq.Date(start_date, end_date, by ="day"))) %>%ungroup() %>% dplyr::select(deployment_id, day_seq) %>% tidyr::unnest(day_seq)# Step 3: Assign each day to a biologically relevant seasondeployment_subset <- deployments_days %>%mutate(month =month(day_seq),season =case_when( month %in%7:8~"Breeding", # Jul–Aug month %in%3:6~"Birthing/raising young", # Mar–Jun month %in%9:10~"Dispersal", # Sep–Oct month %in%c(11,12,1,2) ~"Winter survival", # Nov–FebTRUE~NA_character_ ))# Step 4: Filter daily records for Winter survival season (Nov–Feb)winter_days <- deployment_subset %>%filter(season =="Winter survival")# Step 5: Collapse back to deployments (Winter only)deployment_data <- winter_days %>%group_by(deployment_id) %>%summarise(start_date =min(day_seq),end_date =max(day_seq),.groups ="drop")# Step 6: Define global study period and partition lengthoverall_start_date <-min(deployment_data$start_date)overall_end_date <-max(deployment_data$end_date)period_length <-5total_periods <-ceiling(as.numeric(difftime(overall_end_date, overall_start_date, units ="days")) / period_length)# Step 7: Create dynamic SO columnsso_columns <-paste0("SO", 1:total_periods)so_df <-data.frame(deployment_id =character(),matrix(NA, nrow =0, ncol = total_periods),start_date =as.Date(character()),end_date =as.Date(character()),stringsAsFactors =FALSE)colnames(so_df)[2:(total_periods+1)] <- so_columns# Step 8: Loop through deployments and mark periods (1 if overlaps, 0 otherwise)for (index in1:nrow(deployment_data)) { deployment_id <- deployment_data$deployment_id[index] start_date <- deployment_data$start_date[index] end_date <- deployment_data$end_date[index] period_flags <-rep(0, total_periods)for (period in0:(total_periods-1)) { period_start <- overall_start_date +days(period * period_length) period_end <- period_start +days(period_length -1)if (period_end >= start_date && period_start <= end_date) { period_flags[period +1] <-1 } }# Name the flags with SO column names period_flags <-setNames(as.list(period_flags), so_columns)# Append row with proper names so_df <-rbind(so_df,data.frame(deployment_id = deployment_id,start_date = start_date,end_date = end_date, period_flags,stringsAsFactors =FALSE))}so_df <- so_df %>%arrange(start_date)# Step 9: Inspect first few rowshead(so_df, 10)
This has generated some NAs in the deployments WM13, so lets remove these
# Remove the WM13 rowdetection_matrix_new <- detection_matrix[!grepl("WM13", rownames(detection_matrix)), ]# Replace all NAs with 0detection_matrix_new[is.na(detection_matrix_new)] <-0
ok and add the deployment covariates
Add Deployment Covariates
# Step 1: Select the covariates you want from deploymentsdeployment_covariates <- deployments %>% dplyr::select(deployment_id, sensor_height, elevation, ruggedness)# Step 2: Join them into your detection_matrixdetection_matrix <- detection_matrix %>%left_join(deployment_covariates, by ="deployment_id")# Step 3: Recode sensor_height: Other = 0, Chest Height = 1, NA treated as Chest Height (1)detection_matrix$sensor_height_num <-ifelse(is.na(detection_matrix$sensor_height), 1,ifelse(detection_matrix$sensor_height =="Other", 0, 1))# Step 4: Inspect the first few rowshead(detection_matrix, 10)
adding sample specific covariats and changing data for model
Add Sample Covariates
There were a lot of NAs in the weather data, to help with this snowdepth is going to be changed to a presence/absence binary variable.
# Step 1: Pivot detection_matrix into long format (deployment × SO occasion)detection_long <- detection_matrix %>%pivot_longer(cols =starts_with("SO"),names_to ="SO",values_to ="detection" )# Step 2: Assign each timestamp to an SO blockmarten_img <- marten_img %>%mutate(SO =paste0("SO",floor(as.numeric(difftime(timestamp, min(detection_matrix$start_date), units ="days")) /5) +1 ) )# Step 3: Aggregate covariates by deployment × SO (mean values per block)sample_covariates <- marten_img %>%group_by(deployment_id, SO) %>%summarise(PRCP =mean(PRCP, na.rm =TRUE),SNOW =mean(SNOW, na.rm =TRUE),SNWD =mean(SNWD, na.rm =TRUE),TAVG =mean(TAVG, na.rm =TRUE),TMAX =mean(TMAX, na.rm =TRUE),TMIN =mean(TMIN, na.rm =TRUE),.groups ="drop" )# Step 4: Join sample-level covariates into detection_longdetection_long <- detection_long %>%left_join(sample_covariates, by =c("deployment_id", "SO"))# convert SNWD to binary presence/absence (treat NA as 0 = no snow)detection_long$SNWD <-ifelse(is.na(detection_long$SNWD), 0,ifelse(detection_long$SNWD >0, 1, 0))# Step 5: Inspecthead(detection_long, 10)
# A tibble: 10 × 15
deployment_id start_date end_date sensor_height elevation ruggedness
<chr> <date> <date> <chr> <int> <dbl>
1 WM01.2 2020-11-01 2021-02-28 Other 2311 -2.08
2 WM01.2 2020-11-01 2021-02-28 Other 2311 -2.08
3 WM01.2 2020-11-01 2021-02-28 Other 2311 -2.08
4 WM01.2 2020-11-01 2021-02-28 Other 2311 -2.08
5 WM01.2 2020-11-01 2021-02-28 Other 2311 -2.08
6 WM01.2 2020-11-01 2021-02-28 Other 2311 -2.08
7 WM01.2 2020-11-01 2021-02-28 Other 2311 -2.08
8 WM01.2 2020-11-01 2021-02-28 Other 2311 -2.08
9 WM01.2 2020-11-01 2021-02-28 Other 2311 -2.08
10 WM01.2 2020-11-01 2021-02-28 Other 2311 -2.08
# ℹ 9 more variables: sensor_height_num <dbl>, SO <chr>, detection <int>,
# PRCP <dbl>, SNOW <dbl>, SNWD <dbl>, TAVG <dbl>, TMAX <dbl>, TMIN <dbl>
This gives us the fully integrated data set! Yay!
# Extract detection history (matrix of 1/0)y <- detection_matrix %>%select(starts_with("SO")) %>%as.matrix()
# Use the same overall_start_date and total_periods you defined earlieroverall_start_date <-min(detection_matrix$start_date)period_length <-5total_periods <-ncol(y) # should be 25print(ncol(y))
[1] 25
# Assign SO blocks consistentlymarten_img <- marten_img %>%mutate(SO =paste0("SO",floor(as.numeric(difftime(timestamp, overall_start_date, units ="days")) / period_length) +1 ))# Summarise covariates per deployment × SOobs_covs_long <- marten_img %>%group_by(deployment_id, SO) %>%summarise(PRCP =mean(PRCP, na.rm =TRUE),SNOW =mean(SNOW, na.rm =TRUE),SNWD =mean(SNWD, na.rm =TRUE),TAVG =mean(TAVG, na.rm =TRUE),TMAX =mean(TMAX, na.rm =TRUE),TMIN =mean(TMIN, na.rm =TRUE),.groups ="drop" )# Build complete grid of deployment × SOso_cols <-colnames(y)dep_order <- detection_matrix$deployment_idcomplete_grid <-expand.grid(deployment_id = dep_order,SO = so_cols,stringsAsFactors =FALSE)obs_covs_complete <- complete_grid %>%left_join(obs_covs_long, by =c("deployment_id", "SO"))# Convert SNWD to binary presence/absence (treat NA as 0)obs_covs_complete$SNWD <-ifelse(is.na(obs_covs_complete$SNWD), 0,ifelse(obs_covs_complete$SNWD >0, 1, 0))# Convert PRCP to binary presence/absence (treat NA as 0)obs_covs_complete$PRCP <-ifelse(is.na(obs_covs_complete$PRCP), 0,ifelse(obs_covs_complete$PRCP >0, 1, 0))# Convert SNOW to binary presence/absence (treat NA as 0)obs_covs_complete$SNOW <-ifelse(is.na(obs_covs_complete$SNOW), 0,ifelse(obs_covs_complete$SNOW >0, 1, 0))# Interpolate TAVG, TMAX, TMIN within each deploymentobs_covs_complete <- obs_covs_complete %>%group_by(deployment_id) %>%mutate(TAVG = zoo::na.approx(TAVG, na.rm =FALSE, rule =2),TMAX = zoo::na.approx(TMAX, na.rm =FALSE, rule =2),TMIN = zoo::na.approx(TMIN, na.rm =FALSE, rule =2) ) %>%ungroup()# Pivot each covariate into a 19 × 25 matrixmake_obs_matrix <-function(df, value_col) { wide <- df %>%select(deployment_id, SO, !!sym(value_col)) %>%pivot_wider(names_from = SO, values_from =!!sym(value_col)) wide <- wide %>%slice(match(dep_order, deployment_id))as.matrix(wide[, so_cols])}obs_covs_list <-list(PRCP =make_obs_matrix(obs_covs_complete, "PRCP"),SNOW =make_obs_matrix(obs_covs_complete, "SNOW"),SNWD =make_obs_matrix(obs_covs_complete, "SNWD"),TAVG =make_obs_matrix(obs_covs_complete, "TAVG"),TMAX =make_obs_matrix(obs_covs_complete, "TMAX"),TMIN =make_obs_matrix(obs_covs_complete, "TMIN"))dim(y)
Within this chunk I have interpolated the missing temperature data and changed SNOW and PRCP to binary values. This is to help the model running and to increase he biological validity of our results.
Correlation between site covariates
site_covs <- deployment_covariates[, c("elevation", "ruggedness", "sensor_height")]# Recode sensor_height: Other = 0, Chest Height = 1, NA treated as Chest Height (1)site_covs$sensor_height <-ifelse(is.na(site_covs$sensor_height), 1,ifelse(site_covs$sensor_height =="Other", 0, 1))# Now everything is numericcor(site_covs, use ="pairwise.complete.obs")
PRCP SNOW SNWD TAVG TMAX TMIN
PRCP 1.00000000 0.29666381 0.72870708 0.01622703 -0.05207178 0.1389199
SNOW 0.29666381 1.00000000 0.09833121 NA NA NA
SNWD 0.72870708 0.09833121 1.00000000 -0.03284606 -0.01294908 0.0826881
TAVG 0.01622703 NA -0.03284606 1.00000000 0.86827845 0.8978266
TMAX -0.05207178 NA -0.01294908 0.86827845 1.00000000 0.6981778
TMIN 0.13891986 NA 0.08268810 0.89782655 0.69817785 1.0000000
res$P
PRCP SNOW SNWD TAVG TMAX TMIN
PRCP NA 4.175682e-11 0.00000000 0.7884084 0.3888306 0.02096351
SNOW 4.175682e-11 NA 0.03214303 NA NA NA
SNWD 0.000000e+00 3.214303e-02 NA 0.5868890 0.8304231 0.17073992
TAVG 7.884084e-01 NA 0.58688898 NA 0.0000000 0.00000000
TMAX 3.888306e-01 NA 0.83042312 0.0000000 NA 0.00000000
TMIN 2.096351e-02 NA 0.17073992 0.0000000 0.0000000 NA
Warning: siteCovs contains characters. Converting them to factors.
# Inspectmarten
Data frame representation of unmarkedFrame object.
y.1 y.2 y.3 y.4 y.5 y.6 y.7 y.8 y.9 y.10 y.11 y.12 y.13 y.14 y.15 y.16 y.17
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 1 0 0 1 1 1 1 0 1 1 1 1 0 0 0 0 0
6 0 0 0 1 1 1 1 0 0 0 1 0 0 0 0 0 0
7 1 1 0 1 1 1 0 1 0 1 0 1 0 0 1 0 0
8 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 0 1
9 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1
10 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 0 0 0 1 1 1 1 1 1 0 1 1 1 1 0 0 0
12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
13 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1
14 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1
15 1 1 1 1 1 1 1 0 0 0 1 0 0 0 1 1 0
16 0 0 1 1 1 1 1 1 0 0 1 0 0 0 0 1 0
17 1 1 1 1 1 1 1 1 NA 1 1 NA NA NA NA 1 1
18 1 1 1 1 1 1 1 1 NA 1 1 1 NA NA NA 1 1
19 0 0 1 1 1 0 0 1 0 1 1 0 0 0 1 0 1
y.18 y.19 y.20 y.21 y.22 y.23 y.24 y.25 deployment_id sensor_height
1 0 0 0 0 0 0 0 1 WM08.2 Other
2 0 0 0 0 0 0 0 0 WM01.2 Ground Chest height
3 0 0 0 0 0 0 0 0 WM12.1 Other
4 0 0 0 0 0 0 0 0 WM08.2 Ground Other
5 0 0 0 0 0 0 0 0 WM13.1 Ground Chest height
6 0 0 0 0 0 0 0 0 WM09 Ground 10/29/2020 Chest height
7 0 0 0 0 0 0 0 0 WM09 10/29/2020 Other
8 0 0 1 0 0 0 0 0 WM04.2 Other
9 0 1 1 1 0 1 0 1 WM13 Other
10 0 0 0 0 0 0 0 0 WM12.1 Ground Chest height
11 1 0 0 0 0 0 0 1 WM10.2 Other
12 0 0 0 0 0 0 0 0 WM10.2 Ground Chest height
13 1 0 0 0 0 0 0 0 WM01.2 Other
14 1 0 0 0 0 0 0 0 WM03.2 Other
15 0 0 0 0 0 0 0 0 WM03.2 Ground Chest height
16 1 0 0 0 0 0 0 0 WM04.2 Ground Chest height
17 1 NA 1 1 1 NA NA NA WM06.2 Ground Chest height
18 1 1 1 1 1 NA NA NA WM06.2 Other
19 0 0 0 0 0 0 0 1 WM14 10/12/2020 Other
elevation ruggedness PRCP.1 PRCP.2 PRCP.3 PRCP.4 PRCP.5 PRCP.6 PRCP.7
1 2459 3.0991125 0 0 0 0 0 0 0
2 2311 -2.0824588 0 0 0 0 0 0 0
3 2375 1.7593043 0 1 1 0 0 0 0
4 2459 3.0991125 0 0 0 0 0 0 0
5 2255 -1.1037417 0 0 0 0 1 0 0
6 2173 -0.8553052 0 0 0 0 1 0 0
7 2173 -0.8553052 0 1 0 1 1 0 0
8 2209 -2.6273567 0 1 1 1 0 0 0
9 2255 -1.1037417 0 1 1 1 1 0 0
10 2375 1.7593043 0 0 0 0 0 0 0
11 2173 -2.2429066 0 0 0 1 1 1 1
12 2173 -2.2429066 0 0 0 0 0 0 0
13 2311 -2.0824588 0 1 1 1 0 0 0
14 2402 2.8648094 0 1 1 0 0 0 0
15 2402 2.8648094 0 1 1 1 1 1 0
16 2209 -2.6273567 0 0 1 0 1 1 1
17 2459 4.0513298 0 1 1 1 0 0 1
18 2459 4.0513298 0 1 1 1 0 1 1
19 1923 -13.0963227 0 0 1 1 1 0 0
PRCP.8 PRCP.9 PRCP.10 PRCP.11 PRCP.12 PRCP.13 PRCP.14 PRCP.15 PRCP.16
1 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0
5 0 0 1 1 1 0 0 0 0
6 0 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0 0
9 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 0 0 0 0
11 0 0 0 0 1 1 1 0 0
12 0 0 0 0 0 0 0 0 0
13 0 0 0 0 0 0 0 0 0
14 0 0 0 0 0 0 0 0 0
15 0 0 0 0 0 0 0 1 1
16 0 0 0 1 0 0 0 0 0
17 0 0 1 1 0 0 0 0 1
18 0 0 1 1 1 0 0 0 1
19 0 0 0 0 0 0 0 0 0
PRCP.17 PRCP.18 PRCP.19 PRCP.20 PRCP.21 PRCP.22 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0 0 0 0 0 0 0 0 1
9 0 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 0 0 0 0 0
11 0 0 0 0 0 0 1 1 1 1
12 0 0 0 0 0 0 0 0 0 0
13 0 0 0 0 0 0 0 0 0 0
14 0 0 0 0 0 0 0 0 0 0
15 1 1 1 0 0 0 1 0 0 0
16 1 1 1 1 0 0 1 0 0 0
17 1 1 1 1 0 1 1 0 0 0
18 1 1 1 1 0 1 1 1 0 0
19 0 0 0 0 0 0 0 0 0 0
SNWD.15 SNWD.16 SNWD.17 SNWD.18 SNWD.19 SNWD.20 SNWD.21 SNWD.22 SNWD.23
1 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0 0
9 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 0 0 0 0
11 0 0 0 0 0 0 0 0 0
12 0 0 0 0 0 0 0 0 0
13 0 0 0 0 0 0 0 0 0
14 0 0 0 0 0 0 0 0 0
15 1 1 0 0 0 0 0 0 0
16 0 1 0 1 0 0 0 0 0
17 0 1 1 1 0 1 1 1 0
18 0 1 1 1 1 1 1 1 0
19 0 0 0 0 0 0 0 0 0
SNWD.24 SNWD.25 TAVG.1 TAVG.2 TAVG.3 TAVG.4 TAVG.5 TAVG.6
1 0 0 NA NA NA NA NA NA
2 0 0 NA NA NA NA NA NA
3 0 0 44.00000 19.00000 14.00000 14.00000 14.00000 14.00000
4 0 0 NA NA NA NA NA NA
5 0 0 NA NA NA NA NA NA
6 0 0 NA NA NA NA NA NA
7 0 0 46.12222 27.54839 29.98848 32.42857 19.00000 25.00000
8 0 0 45.00000 29.50000 20.00000 19.00000 22.50000 26.00000
9 0 0 44.36000 10.00000 18.00000 32.81818 23.94118 21.33333
10 0 0 44.00000 NA NA NA NA NA
11 0 1 NA NA NA NA NA NA
12 0 0 NA NA NA NA NA NA
13 0 0 47.54624 30.00000 19.80000 36.00000 36.00000 36.00000
14 0 0 49.87500 35.00000 22.00000 22.00000 22.00000 22.00000
15 0 0 39.37931 26.00000 30.70000 27.99598 24.59450 23.06667
16 0 0 28.00000 28.00000 28.00000 26.66667 24.91304 23.05556
17 0 0 40.66667 38.03448 26.56452 32.29787 23.60000 22.13580
18 0 0 40.72727 32.14286 26.00000 31.47826 23.00000 22.13333
19 0 0 14.00000 14.00000 14.00000 34.20000 27.00000 27.00000
TAVG.7 TAVG.8 TAVG.9 TAVG.10 TAVG.11 TAVG.12 TAVG.13 TAVG.14
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 14.00000 14.00000 14.00000 14.00000 14.00000 14.00000 14.00000 14.00000
4 NA NA NA NA NA NA NA NA
5 NA NA NA NA NA NA NA NA
6 NA NA NA NA NA NA NA NA
7 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000
8 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000
9 21.33333 21.33333 21.33333 21.33333 21.33333 21.33333 21.33333 21.33333
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 NA NA NA NA NA NA NA NA
13 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000
14 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000
15 21.00000 20.50000 20.00000 19.50000 19.00000 21.75000 24.50000 27.25000
16 24.14286 31.00000 28.16667 25.33333 22.50000 23.80000 25.10000 26.40000
17 26.00000 27.10526 28.45263 29.80000 25.00000 25.16621 25.33242 25.49862
18 24.00000 26.63636 28.31818 30.00000 35.00000 28.00000 27.21311 26.42623
19 27.00000 27.00000 27.00000 27.00000 27.00000 27.00000 27.00000 27.00000
TAVG.15 TAVG.16 TAVG.17 TAVG.18 TAVG.19 TAVG.20 TAVG.21 TAVG.22
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 14.00000 14.00000 14.00000 14.00000 14.00000 14.00000 14.00000 14.00000
4 NA NA NA NA NA NA NA NA
5 NA NA NA NA NA NA NA NA
6 NA NA NA NA NA NA NA NA
7 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000
8 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000
9 21.33333 21.33333 21.33333 21.33333 21.33333 21.33333 21.33333 21.33333
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 NA NA NA NA NA NA NA NA
13 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000
14 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000
15 30.00000 27.00000 27.00000 27.00000 27.00000 27.00000 27.00000 27.00000
16 27.70000 29.00000 25.50000 22.00000 22.00000 22.00000 22.00000 22.00000
17 25.66483 25.83104 24.26531 21.75000 22.87500 24.00000 23.00000 22.00000
18 25.63934 24.85246 24.94595 22.00000 27.00000 23.07143 23.00000 22.00000
19 27.00000 27.00000 27.00000 27.00000 27.00000 27.00000 27.00000 27.00000
TAVG.23 TAVG.24 TAVG.25 TMAX.1 TMAX.2 TMAX.3 TMAX.4 TMAX.5
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 14.00000 14.00000 14.00000 60.00000 24.00000 19.00000 19.00000 19.00000
4 NA NA NA NA NA NA NA NA
5 NA NA NA NA NA NA NA NA
6 NA NA NA NA NA NA NA NA
7 25.00000 25.00000 25.00000 53.40000 34.38710 35.87212 37.35714 32.00000
8 26.00000 26.00000 26.00000 56.50000 36.50000 25.20000 24.00000 30.00000
9 21.33333 21.33333 21.33333 59.46000 21.00000 24.00000 39.09091 35.94118
10 NA NA NA 60.00000 NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 NA NA NA NA NA NA NA NA
13 36.00000 36.00000 36.00000 54.32370 36.93750 24.60000 43.00000 43.00000
14 22.00000 22.00000 22.00000 58.62500 42.00000 26.50000 26.50000 26.50000
15 27.00000 27.00000 27.00000 56.72414 29.00000 34.80000 39.89135 37.63574
16 22.00000 22.00000 22.00000 33.00000 33.00000 33.00000 38.33333 37.82609
17 22.00000 22.00000 22.00000 58.26667 45.48276 31.93548 40.44681 37.40000
18 22.00000 22.00000 22.00000 58.27273 37.14286 32.50000 39.43478 37.50000
19 27.00000 27.00000 27.00000 19.00000 19.00000 19.00000 39.20000 34.00000
TMAX.6 TMAX.7 TMAX.8 TMAX.9 TMAX.10 TMAX.11 TMAX.12 TMAX.13
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000
4 NA NA NA NA NA NA NA NA
5 NA NA NA NA NA NA NA NA
6 NA NA NA NA NA NA NA NA
7 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000
8 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000
9 35.66667 35.66667 35.66667 35.66667 35.66667 35.66667 35.66667 35.66667
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 NA NA NA NA NA NA NA NA
13 43.00000 43.00000 43.00000 43.00000 43.00000 43.00000 43.00000 43.00000
14 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000
15 33.86667 38.00000 37.75000 37.50000 37.25000 37.00000 37.25000 37.50000
16 34.94444 40.28571 45.00000 42.08333 39.16667 36.25000 37.20000 38.15000
17 37.23457 42.00000 42.73684 38.56842 34.40000 38.00000 38.13045 38.26090
18 36.93333 42.76923 42.79545 38.64773 34.50000 43.00000 32.00000 33.47541
19 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000
TMAX.14 TMAX.15 TMAX.16 TMAX.17 TMAX.18 TMAX.19 TMAX.20 TMAX.21
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000
4 NA NA NA NA NA NA NA NA
5 NA NA NA NA NA NA NA NA
6 NA NA NA NA NA NA NA NA
7 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000
8 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000
9 35.66667 35.66667 35.66667 35.66667 35.66667 35.66667 35.66667 35.66667
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 NA NA NA NA NA NA NA NA
13 43.00000 43.00000 43.00000 43.00000 43.00000 43.00000 43.00000 43.00000
14 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000
15 37.75000 38.00000 41.00000 41.00000 41.00000 41.00000 41.00000 41.00000
16 39.10000 40.05000 41.00000 35.00000 29.00000 29.00000 29.00000 29.00000
17 38.39136 38.52181 38.65226 33.24490 28.25000 32.12500 36.00000 32.00000
18 34.95082 36.42623 37.90164 34.13514 29.00000 32.00000 35.00000 32.00000
19 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000
TMAX.22 TMAX.23 TMAX.24 TMAX.25 TMIN.1 TMIN.2 TMIN.3 TMIN.4
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 19.00000 19.00000 19.00000 19.00000 32.00000 17.00000 2.00000 2.00000
4 NA NA NA NA NA NA NA NA
5 NA NA NA NA NA NA NA NA
6 NA NA NA NA NA NA NA NA
7 40.00000 40.00000 40.00000 40.00000 33.55556 20.41935 22.13825 23.85714
8 36.00000 36.00000 36.00000 36.00000 32.50000 23.00000 13.20000 10.00000
9 35.66667 35.66667 35.66667 35.66667 32.70000 0.00000 16.00000 22.72727
10 NA NA NA NA 32.00000 NA NA NA
11 NA NA NA NA NA NA NA NA
12 NA NA NA NA NA NA NA NA
13 43.00000 43.00000 43.00000 43.00000 38.94798 24.56250 13.20000 25.00000
14 26.50000 26.50000 26.50000 26.50000 39.75000 31.00000 19.50000 19.50000
15 41.00000 41.00000 41.00000 41.00000 29.72414 22.00000 27.80000 21.09457
16 29.00000 29.00000 29.00000 29.00000 26.00000 26.00000 26.00000 15.00000
17 29.00000 29.00000 29.00000 29.00000 31.37778 31.62069 17.33871 27.48936
18 29.00000 29.00000 29.00000 29.00000 31.45455 26.71429 15.00000 25.00000
19 34.00000 34.00000 34.00000 34.00000 2.00000 2.00000 2.00000 25.20000
TMIN.5 TMIN.6 TMIN.7 TMIN.8 TMIN.9 TMIN.10 TMIN.11 TMIN.12
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 2.00000 2.00000 2.00000 2.00000 2.00000 2.00000 2.0 2.00000
4 NA NA NA NA NA NA NA NA
5 NA NA NA NA NA NA NA NA
6 NA NA NA NA NA NA NA NA
7 10.33333 12.00000 12.00000 12.00000 12.00000 12.00000 12.0 12.00000
8 11.50000 13.00000 13.00000 13.00000 13.00000 13.00000 13.0 13.00000
9 11.23529 10.00000 10.00000 10.00000 10.00000 10.00000 10.0 10.00000
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 NA NA NA NA NA NA NA NA
13 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.0 25.00000
14 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.5 19.50000
15 13.26117 14.20000 12.00000 11.00000 10.00000 9.00000 8.0 10.00000
16 14.00000 14.27778 14.00000 22.00000 19.83333 17.66667 15.5 16.80000
17 13.80000 12.93827 15.00000 18.94737 23.37368 27.80000 18.0 17.94067
18 12.75000 13.06667 14.76923 18.54545 23.27273 28.00000 32.0 18.00000
19 17.00000 17.00000 17.00000 17.00000 17.00000 17.00000 17.0 17.00000
TMIN.13 TMIN.14 TMIN.15 TMIN.16 TMIN.17 TMIN.18 TMIN.19 TMIN.20
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 2.00000 2.00000 2.00000 2.00000 2.00000 2.0 2.0 2.00000
4 NA NA NA NA NA NA NA NA
5 NA NA NA NA NA NA NA NA
6 NA NA NA NA NA NA NA NA
7 12.00000 12.00000 12.00000 12.00000 12.00000 12.0 12.0 12.00000
8 13.00000 13.00000 13.00000 13.00000 13.00000 13.0 13.0 13.00000
9 10.00000 10.00000 10.00000 10.00000 10.00000 10.0 10.0 10.00000
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 NA NA NA NA NA NA NA NA
13 25.00000 25.00000 25.00000 25.00000 25.00000 25.0 25.0 25.00000
14 19.50000 19.50000 19.50000 19.50000 19.50000 19.5 19.5 19.50000
15 12.00000 14.00000 16.00000 19.00000 19.00000 19.0 19.0 19.00000
16 18.10000 19.40000 20.70000 22.00000 16.50000 11.0 11.0 11.00000
17 17.88134 17.82200 17.76267 17.70334 16.69388 11.0 11.5 12.00000
18 17.61475 17.22951 16.84426 16.45902 17.72973 11.0 20.0 10.42857
19 17.00000 17.00000 17.00000 17.00000 17.00000 17.0 17.0 17.00000
TMIN.21 TMIN.22 TMIN.23 TMIN.24 TMIN.25
1 NA NA NA NA NA
2 NA NA NA NA NA
3 2.0 2.0 2.0 2.0 2.0
4 NA NA NA NA NA
5 NA NA NA NA NA
6 NA NA NA NA NA
7 12.0 12.0 12.0 12.0 12.0
8 13.0 13.0 13.0 13.0 13.0
9 10.0 10.0 10.0 10.0 10.0
10 NA NA NA NA NA
11 NA NA NA NA NA
12 NA NA NA NA NA
13 25.0 25.0 25.0 25.0 25.0
14 19.5 19.5 19.5 19.5 19.5
15 19.0 19.0 19.0 19.0 19.0
16 11.0 11.0 11.0 11.0 11.0
17 19.0 14.0 14.0 14.0 14.0
18 19.0 14.0 14.0 14.0 14.0
19 17.0 17.0 17.0 17.0 17.0
summary(marten)
unmarkedFrame Object
19 sites
Maximum number of observations per site: 25
Mean number of observations per site: 24.16
Sites with at least one detection: 17
Tabulation of y observations:
0 1 <NA>
311 148 16
Site-level covariates:
deployment_id sensor_height elevation ruggedness
WM01.2 : 1 Chest height: 8 Min. :1923 Min. :-13.0963
WM01.2 Ground: 1 Other :11 1st Qu.:2191 1st Qu.: -2.1627
WM03.2 : 1 Median :2311 Median : -0.8553
WM03.2 Ground: 1 Mean :2292 Mean : -0.3879
WM04.2 : 1 3rd Qu.:2402 3rd Qu.: 2.8648
WM04.2 Ground: 1 Max. :2459 Max. : 4.0513
(Other) :13
Observation-level covariates:
PRCP SNOW SNWD TAVG
Min. :0.0000 Min. :0.00000 Min. :0.0000 Min. :10.00
1st Qu.:0.0000 1st Qu.:0.00000 1st Qu.:0.0000 1st Qu.:22.00
Median :0.0000 Median :0.00000 Median :0.0000 Median :25.00
Mean :0.1453 Mean :0.01474 Mean :0.1453 Mean :25.36
3rd Qu.:0.0000 3rd Qu.:0.00000 3rd Qu.:0.0000 3rd Qu.:27.00
Max. :1.0000 Max. :1.00000 Max. :1.0000 Max. :49.88
NA's :199
TMAX TMIN
Min. :19.00 Min. : 0.00
1st Qu.:29.00 1st Qu.:12.00
Median :35.67 Median :16.23
Mean :34.82 Mean :15.91
3rd Qu.:40.00 3rd Qu.:19.50
Max. :60.00 Max. :39.75
NA's :199 NA's :199
plot(marten)
# run null model to get naive estimate of detection and occupancy# i.e. one without covariates of either detection or occupancy# note that the first ~1 is detection and the second ~1 is occupancyele_null <-occu(~1~1, marten)# backtransform to get estimates#detectionp_det <-backTransform(ele_null, "det")p_det
Backtransformed linear combination(s) of Detection estimate(s)
Estimate SE LinComb (Intercept)
0.362 0.0238 -0.567 1
Transformation: logistic
# detection probability = 0.362 (+/- SE 0.024)# confidence intervals for detectiondetCI <-confint(p_det)detCI
0.025 0.975
0.3166897 0.4095967
# CI 95% 0.317 - 0.410# occupancypsi <-backTransform(ele_null, "state")psi
Backtransformed linear combination(s) of Occupancy estimate(s)
Estimate SE LinComb (Intercept)
0.895 0.0704 2.14 1
Transformation: logistic
# naive occupancy = 0.895 (+/- SE 0.070) psiCI <-confint(psi)psiCI
0.025 0.975
0.6625918 0.9735455
# CI 95% 0.663 - 0.974
So these outputs mean that: Detection probability = 0.362 (+/- SE 0.024), CI 95% 0.317 - 0.410 Naive occupancy = 0.895 (+/- SE 0.070), CI 95% 0.663 - 0.974
Warning in sqrt(diag(vcov(x, altNames = TRUE))): NaNs produced
Warning in sqrt(diag(vcov(x, altNames = TRUE))): NaNs produced
Warning in sqrt(diag(vcov(x, altNames = TRUE))): NaNs produced
Warning in sqrt(diag(vcov(x, altNames = TRUE))): NaNs produced
Warning in sqrt(diag(vcov(x, altNames = TRUE))): NaNs produced
Warning in sqrt(diag(vcov(x, altNames = TRUE))): NaNs produced
Warning in sqrt(diag(vcov(x, altNames = TRUE))): NaNs produced
Warning in sqrt(diag(vcov(x, altNames = TRUE))): NaNs produced
Warning: 'knitr' namespace cannot be unloaded:
namespace 'knitr' is imported by 'htmlTable', 'rmarkdown' so cannot be unloaded
Occupany Model for full year Martens
Occupancy Model of the Pacfic Marten
Now this has been done, we can start to investigate and prepare for occupancy modeling. I am going to look at the Pacific marten due to a high number of sampling events and a wide range of co variate availability.
library(readr)library(lubridate)
Attaching package: 'lubridate'
The following objects are masked from 'package:base':
date, intersect, setdiff, union
library(dplyr)
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
library(knitr)library(kableExtra)
Attaching package: 'kableExtra'
The following object is masked from 'package:dplyr':
group_rows
library(tidyr)#| label: Calling the marten Datadeployments<-read.csv("deployment+covariates.csv")marten_img<-read.csv("images+covariates.csv")%>%filter(genus =="Martes")
In this data, effort is constant so it is not needed as a co variate (all deployments were the same)
# ------------------------------------------------------------# Step 1: Convert start_date and end_date to Date format# ------------------------------------------------------------deployments <- deployments %>%mutate(start_date =as.Date(start_date),end_date =as.Date(end_date) )# ------------------------------------------------------------# Step 2: Expand deployments into daily records# ------------------------------------------------------------deployments_days <- deployments %>%rowwise() %>%mutate(day_seq =list(seq.Date(start_date, end_date, by ="day"))) %>%ungroup() %>%select(deployment_id, day_seq) %>%unnest(day_seq)# ------------------------------------------------------------# Step 3: Define global study period and partition length# ------------------------------------------------------------overall_start_date <-min(deployments$start_date)overall_end_date <-max(deployments$end_date)period_length <-5# days per sampling occasiontotal_periods <-ceiling(as.numeric(overall_end_date - overall_start_date +1) / period_length)# ------------------------------------------------------------# Step 4: Create empty SO dataframe# ------------------------------------------------------------so_columns <-paste0("SO", 1:total_periods)so_df <-data.frame(deployment_id = deployments$deployment_id,start_date = deployments$start_date,end_date = deployments$end_date,matrix(0, nrow =nrow(deployments), ncol = total_periods))colnames(so_df)[4:(3+ total_periods)] <- so_columns# ------------------------------------------------------------# Step 5: Fill SO columns based on overlap# ------------------------------------------------------------for (i inseq_len(nrow(deployments))) { start_i <- deployments$start_date[i] end_i <- deployments$end_date[i]for (p inseq_len(total_periods)) { period_start <- overall_start_date +days((p -1) * period_length) period_end <- period_start +days(period_length -1)# Mark overlapif (period_end >= start_i && period_start <= end_i) { so_df[i, so_columns[p]] <-1 } }}# ------------------------------------------------------------# Step 6: Sort and inspect# ------------------------------------------------------------so_df <- so_df %>%arrange(start_date)head(so_df, 10)
This has generated some NAs in the deployments WM13, so lets remove these
# Remove the WM13 rowdetection_matrix_new <- detection_matrix[!grepl("WM13", rownames(detection_matrix)), ]# Replace all NAs with 0detection_matrix_new[is.na(detection_matrix_new)] <-0
ok and add the deployment covariates
Add Deployment Covariates
# Step 1: Select the covariates you want from deploymentsdeployment_covariates <- deployments %>% dplyr::select(deployment_id, sensor_height, elevation, ruggedness)# Step 2: Join them into your detection_matrixdetection_matrix <- detection_matrix %>%left_join(deployment_covariates, by ="deployment_id")# Step 3: Recode sensor_height: Other = 0, Chest Height = 1, NA treated as Chest Height (1)detection_matrix$sensor_height_num <-ifelse(is.na(detection_matrix$sensor_height), 1,ifelse(detection_matrix$sensor_height =="Other", 0, 1))# Step 4: Inspect the first few rowshead(detection_matrix, 10)
# Extract detection history (matrix of 1/0)y <- detection_matrix %>%select(starts_with("SO")) %>%as.matrix()
# Use the same overall_start_date and total_periods you defined earlieroverall_start_date <-min(detection_matrix$start_date)period_length <-5total_periods <-ncol(y) # should be 25print(ncol(y))
[1] 79
# Assign SO blocks consistentlymarten_img <- marten_img %>%mutate(SO =paste0("SO",floor(as.numeric(difftime(timestamp, overall_start_date, units ="days")) / period_length) +1 ))# Summarise covariates per deployment × SOobs_covs_long <- marten_img %>%group_by(deployment_id, SO) %>%summarise(PRCP =mean(PRCP, na.rm =TRUE),SNOW =mean(SNOW, na.rm =TRUE),SNWD =mean(SNWD, na.rm =TRUE),TAVG =mean(TAVG, na.rm =TRUE),TMAX =mean(TMAX, na.rm =TRUE),TMIN =mean(TMIN, na.rm =TRUE),.groups ="drop" )# Build complete grid of deployment × SOso_cols <-colnames(y)dep_order <- detection_matrix$deployment_idcomplete_grid <-expand.grid(deployment_id = dep_order,SO = so_cols,stringsAsFactors =FALSE)obs_covs_complete <- complete_grid %>%left_join(obs_covs_long, by =c("deployment_id", "SO"))# Convert SNWD to binary presence/absence (treat NA as 0)obs_covs_complete$SNWD <-ifelse(is.na(obs_covs_complete$SNWD), 0,ifelse(obs_covs_complete$SNWD >0, 1, 0))# Convert PRCP to binary presence/absence (treat NA as 0)obs_covs_complete$PRCP <-ifelse(is.na(obs_covs_complete$PRCP), 0,ifelse(obs_covs_complete$PRCP >0, 1, 0))# Convert SNOW to binary presence/absence (treat NA as 0)obs_covs_complete$SNOW <-ifelse(is.na(obs_covs_complete$SNOW), 0,ifelse(obs_covs_complete$SNOW >0, 1, 0))# Interpolate TAVG, TMAX, TMIN within each deploymentobs_covs_complete <- obs_covs_complete %>%group_by(deployment_id) %>%mutate(TAVG = zoo::na.approx(TAVG, na.rm =FALSE, rule =2),TMAX = zoo::na.approx(TMAX, na.rm =FALSE, rule =2),TMIN = zoo::na.approx(TMIN, na.rm =FALSE, rule =2) ) %>%ungroup()# Pivot each covariate into a 19 × 25 matrixmake_obs_matrix <-function(df, value_col) { wide <- df %>%select(deployment_id, SO, !!sym(value_col)) %>%pivot_wider(names_from = SO, values_from =!!sym(value_col)) wide <- wide %>%slice(match(dep_order, deployment_id))as.matrix(wide[, so_cols])}obs_covs_list <-list(PRCP =make_obs_matrix(obs_covs_complete, "PRCP"),SNOW =make_obs_matrix(obs_covs_complete, "SNOW"),SNWD =make_obs_matrix(obs_covs_complete, "SNWD"),TAVG =make_obs_matrix(obs_covs_complete, "TAVG"),TMAX =make_obs_matrix(obs_covs_complete, "TMAX"),TMIN =make_obs_matrix(obs_covs_complete, "TMIN"))dim(y)
Within this chunk I have interpolated the missing temperature data and changed SNOW and PRCP to binary values. This is to help the model running and to increase he biological validity of our results.
Correlation between site covariates
site_covs <- deployment_covariates[, c("elevation", "ruggedness", "sensor_height")]# Recode sensor_height: Other = 0, Chest Height = 1, NA treated as Chest Height (1)site_covs$sensor_height <-ifelse(is.na(site_covs$sensor_height), 1,ifelse(site_covs$sensor_height =="Other", 0, 1))# Now everything is numericcor(site_covs, use ="pairwise.complete.obs")
PRCP SNOW SNWD TAVG TMAX TMIN
PRCP 1.0000000 0.2508403 0.62961280 -0.1235066 -0.13170508 -0.1055726
SNOW 0.2508403 1.0000000 0.11663787 NA NA NA
SNWD 0.6296128 0.1166379 1.00000000 -0.1247655 -0.09835712 -0.1311682
TAVG -0.1235066 NA -0.12476549 1.0000000 0.97185636 0.9412014
TMAX -0.1317051 NA -0.09835712 0.9718564 1.00000000 0.8592234
TMIN -0.1055726 NA -0.13116818 0.9412014 0.85922336 1.0000000
res$P
PRCP SNOW SNWD TAVG TMAX
PRCP NA 0.000000e+00 0.000000e+00 0.0001376752 4.751442e-05
SNOW 0.000000e+00 NA 5.882267e-06 NA NA
SNWD 0.000000e+00 5.882267e-06 NA 0.0001174106 2.431522e-03
TAVG 1.376752e-04 NA 1.174106e-04 NA 0.000000e+00
TMAX 4.751442e-05 NA 2.431522e-03 0.0000000000 NA
TMIN 1.132520e-03 NA 5.104242e-05 0.0000000000 0.000000e+00
TMIN
PRCP 1.132520e-03
SNOW NA
SNWD 5.104242e-05
TAVG 0.000000e+00
TMAX 0.000000e+00
TMIN NA
Warning: siteCovs contains characters. Converting them to factors.
# Inspectmarten
Data frame representation of unmarkedFrame object.
y.1 y.2 y.3 y.4 y.5 y.6 y.7 y.8 y.9 y.10 y.11 y.12 y.13 y.14 y.15 y.16 y.17
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0
4 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
5 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 0 1 1 1 1 0 1 0 1 1 0 0 1 1 1 0 0
8 0 0 0 1 0 0 0 1 1 1 1 1 1 0 1 1 0
9 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0
10 0 0 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1
11 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 1 0
12 NA NA NA 1 1 1 1 1 1 1 1 1 1 NA 1 1 NA
13 NA NA NA NA 1 1 1 1 1 1 1 1 1 NA 1 1 NA
14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 1 0
16 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0
17 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0
18 0 0 0 0 1 1 1 1 1 0 1 0 0 0 0 0 1
19 0 0 0 0 1 1 1 1 1 1 1 0 1 1 0 0 1
y.18 y.19 y.20 y.21 y.22 y.23 y.24 y.25 y.26 y.27 y.28 y.29 y.30 y.31 y.32
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
3 1 0 1 1 0 0 1 1 0 1 0 1 1 0 1
4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 0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 0 0 0 0 0 0 0 0 0 0 0 0 0
7 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
13 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
y.78 y.79 deployment_id sensor_height elevation ruggedness PRCP.1
1 0 0 WM08.2 Other 2459 3.0991125 0
2 0 0 WM01.2 Ground Chest height 2311 -2.0824588 0
3 0 0 WM12.1 Other 2375 1.7593043 1
4 0 0 WM08.2 Ground Other 2459 3.0991125 0
5 0 0 WM13.1 Ground Chest height 2255 -1.1037417 0
6 0 0 WM09 Ground 10/29/2020 Chest height 2173 -0.8553052 0
7 0 0 WM09 10/29/2020 Other 2173 -0.8553052 0
8 0 0 WM04.2 Other 2209 -2.6273567 0
9 0 0 WM13 Other 2255 -1.1037417 0
10 0 0 WM12.1 Ground Chest height 2375 1.7593043 0
11 0 0 WM10.2 Other 2173 -2.2429066 0
12 NA NA WM10.2 Ground Chest height 2173 -2.2429066 0
13 NA NA WM01.2 Other 2311 -2.0824588 0
14 0 0 WM03.2 Other 2402 2.8648094 0
15 0 0 WM03.2 Ground Chest height 2402 2.8648094 0
16 0 0 WM04.2 Ground Chest height 2209 -2.6273567 0
17 0 0 WM06.2 Ground Chest height 2459 4.0513298 0
18 0 0 WM06.2 Other 2459 4.0513298 0
19 0 0 WM14 10/12/2020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 0 0 0
SNWD.73 SNWD.74 SNWD.75 SNWD.76 SNWD.77 SNWD.78 SNWD.79 TAVG.1 TAVG.2
1 0 0 0 0 0 0 0 NA NA
2 0 0 0 0 0 0 0 NA NA
3 0 0 0 0 0 0 0 36.00000 36.06949
4 0 0 0 0 0 0 0 44.00000 44.00000
5 0 0 0 0 0 0 0 34.61111 34.61111
6 0 0 0 0 0 0 0 NA NA
7 0 0 0 0 0 0 0 30.51810 30.51810
8 0 0 0 0 0 0 0 22.50000 22.50000
9 0 0 0 0 0 0 0 45.00000 45.00000
10 0 0 0 0 0 0 0 NA NA
11 0 0 0 0 0 0 0 NA NA
12 0 0 0 0 0 0 0 33.00000 33.00000
13 0 0 0 0 0 0 0 38.00000 38.00000
14 0 0 0 0 0 0 0 NA NA
15 0 0 0 0 0 0 0 NA NA
16 0 0 0 0 0 0 0 44.00000 44.00000
17 0 0 0 0 0 0 0 30.00000 30.00000
18 0 0 0 0 0 0 0 44.00000 44.00000
19 0 0 0 0 0 0 0 36.00000 36.00000
TAVG.3 TAVG.4 TAVG.5 TAVG.6 TAVG.7 TAVG.8 TAVG.9 TAVG.10
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 35.29808 23.03704 37.28448 47.60000 10.00000 34.00000 22.00000 23.88235
4 44.00000 44.00000 44.00000 44.06061 44.12121 44.18182 44.24242 44.30303
5 18.00000 19.00000 38.00000 27.92308 17.84615 17.84615 17.84615 17.84615
6 NA NA NA NA NA NA NA NA
7 38.96296 17.84615 41.87879 27.93939 14.00000 24.10000 34.20000 27.00000
8 22.50000 22.50000 23.87500 25.25000 26.62500 28.00000 26.66667 24.76000
9 45.00000 25.75622 37.82152 42.00000 26.00000 32.68000 26.92891 24.51634
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 33.00000 33.00000 38.27160 41.80000 27.50000 28.00000 30.56000 23.60000
13 38.00000 38.00000 38.00000 41.84906 26.84314 29.05634 31.53968 23.83333
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 44.00000 44.00000 44.00000 45.84848 18.16667 26.16667 26.16667 26.16667
17 30.00000 30.00000 30.00000 48.22222 35.11111 22.00000 22.00000 22.00000
18 44.00000 44.00000 44.00000 40.50000 24.00000 20.00000 19.00000 22.50000
19 36.00000 36.00000 36.00000 42.43511 23.45000 36.00000 29.42857 27.00000
TAVG.11 TAVG.12 TAVG.13 TAVG.14 TAVG.15 TAVG.16 TAVG.17 TAVG.18
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 25.00000 25.21538 25.43077 25.64615 25.86154 26.07692 26.29231 26.50769
4 44.36364 44.42424 44.48485 44.54545 44.60606 44.66667 44.72727 44.78788
5 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615
6 NA NA NA NA NA NA NA NA
7 27.31034 27.62069 27.93103 28.24138 28.55172 28.86207 29.17241 29.48276
8 22.83333 25.40000 31.00000 33.00000 35.00000 18.33333 20.46667 22.60000
9 22.92308 22.13846 21.35385 20.56923 19.78462 19.00000 21.75000 24.50000
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 21.92857 24.25000 26.63636 28.81818 31.00000 28.00000 27.50000 27.00000
13 21.92308 26.00000 27.10526 28.45263 29.80000 25.00000 25.25000 25.50000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667
17 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000
18 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000
19 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000
TAVG.19 TAVG.20 TAVG.21 TAVG.22 TAVG.23 TAVG.24 TAVG.25 TAVG.26
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 26.72308 26.93846 27.15385 27.36923 27.58462 27.80000 28.01538 28.23077
4 44.84848 44.90909 44.96970 45.03030 45.09091 45.15152 45.21212 45.27273
5 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615
6 NA NA NA NA NA NA NA NA
7 29.79310 30.10345 30.41379 30.72414 31.03448 31.34483 31.65517 31.96552
8 24.73333 26.86667 29.00000 22.00000 23.05000 24.10000 25.15000 26.20000
9 27.25000 30.00000 27.00000 27.51163 28.02326 28.53488 29.04651 29.55814
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 26.50000 26.00000 24.53448 25.15152 27.00000 23.00000 23.07692 22.50000
13 25.75000 26.00000 25.52371 24.17021 20.00000 22.00000 24.00000 22.50000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667
17 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000
18 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000
19 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000
TAVG.27 TAVG.28 TAVG.29 TAVG.30 TAVG.31 TAVG.32 TAVG.33 TAVG.34
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 28.44615 28.66154 28.87692 29.09231 29.30769 29.52308 29.73846 29.95385
4 45.33333 45.39394 45.45455 45.51515 45.57576 45.63636 45.69697 45.75758
5 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615
6 NA NA NA NA NA NA NA NA
7 32.27586 32.58621 32.89655 33.20690 33.51724 33.82759 34.13793 34.44828
8 27.25000 28.30000 29.35000 30.40000 31.45000 32.50000 33.55000 34.60000
9 30.06977 30.58140 31.09302 31.60465 32.11628 32.62791 33.13953 33.65116
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 24.75000 27.00000 29.25000 31.50000 33.75000 36.00000 31.28205 29.02326
13 23.76000 25.02000 26.28000 27.54000 28.80000 30.06000 31.32000 29.13115
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667
17 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000
18 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000
19 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000
TAVG.35 TAVG.36 TAVG.37 TAVG.38 TAVG.39 TAVG.40 TAVG.41 TAVG.42
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 30.16923 30.38462 30.60000 30.81538 31.03077 31.24615 31.46154 31.67692
4 45.81818 45.87879 45.93939 46.00000 46.06061 46.12121 46.18182 46.24242
5 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615
6 NA NA NA NA NA NA NA NA
7 34.75862 35.06897 35.37931 35.68966 36.00000 36.31034 36.62069 36.93103
8 35.65000 36.70000 37.75000 38.80000 39.85000 40.90000 41.95000 43.00000
9 34.16279 34.67442 35.18605 35.69767 36.20930 36.72093 37.23256 37.74419
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 33.51096 40.15789 34.00000 35.28571 38.00000 38.53883 43.94881 41.60825
13 33.32353 40.33333 31.00000 35.50000 35.50000 35.50000 35.50000 35.50000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667
17 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000
18 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000
19 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000
TAVG.43 TAVG.44 TAVG.45 TAVG.46 TAVG.47 TAVG.48 TAVG.49 TAVG.50
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 31.89231 32.10769 32.32308 32.53846 32.75385 32.96923 33.18462 33.40000
4 46.30303 46.36364 46.42424 46.48485 46.54545 46.60606 46.66667 46.72727
5 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615
6 NA NA NA NA NA NA NA NA
7 37.24138 37.55172 37.86207 38.17241 38.48276 38.79310 39.10345 39.41379
8 38.00000 46.00000 48.83333 51.66667 54.50000 57.33333 60.16667 63.00000
9 38.25581 38.76744 39.27907 39.79070 40.30233 40.81395 41.32558 41.83721
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 40.60000 46.30000 52.00000 48.00000 44.00000 44.00000 44.00000 44.00000
13 35.50000 35.50000 35.50000 35.50000 35.50000 35.50000 35.50000 35.50000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667
17 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000
18 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000
19 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000
TAVG.51 TAVG.52 TAVG.53 TAVG.54 TAVG.55 TAVG.56 TAVG.57 TAVG.58
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 33.61538 33.83077 34.04615 34.26154 34.47692 34.69231 34.90769 35.12308
4 46.78788 46.84848 46.90909 46.96970 47.03030 47.09091 47.15152 47.21212
5 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615
6 NA NA NA NA NA NA NA NA
7 39.72414 40.03448 40.34483 40.65517 40.96552 41.27586 41.58621 41.89655
8 63.00000 63.00000 63.00000 63.00000 63.00000 63.00000 63.00000 63.00000
9 42.34884 42.86047 43.37209 43.88372 44.39535 44.90698 45.41860 45.93023
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 44.00000 44.00000 44.00000 44.00000 44.00000 44.00000 44.00000 44.00000
13 35.50000 35.50000 35.50000 35.50000 35.50000 35.50000 35.50000 35.50000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667
17 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000
18 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000
19 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000
TAVG.59 TAVG.60 TAVG.61 TAVG.62 TAVG.63 TAVG.64 TAVG.65 TAVG.66
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 35.33846 35.55385 35.76923 35.98462 36.20000 36.41538 36.63077 36.84615
4 47.27273 47.33333 47.39394 47.45455 47.51515 47.57576 47.63636 47.69697
5 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615
6 NA NA NA NA NA NA NA NA
7 42.20690 42.51724 42.82759 43.13793 43.44828 43.75862 44.06897 44.37931
8 63.00000 63.00000 63.00000 63.00000 63.00000 63.00000 63.00000 63.00000
9 46.44186 46.95349 47.46512 47.97674 48.48837 49.00000 53.00000 57.00000
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 44.00000 44.00000 44.00000 44.00000 44.00000 44.00000 44.00000 44.00000
13 35.50000 35.50000 35.50000 35.50000 35.50000 35.50000 35.50000 35.50000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667
17 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000
18 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000
19 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000
TAVG.67 TAVG.68 TAVG.69 TAVG.70 TAVG.71 TAVG.72 TAVG.73 TAVG.74
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 37.06154 37.27692 37.49231 37.70769 37.92308 38.13846 38.35385 38.56923
4 47.75758 47.81818 47.87879 47.93939 48.00000 46.20000 44.40000 42.60000
5 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615 17.84615
6 NA NA NA NA NA NA NA NA
7 44.68966 45.00000 45.00000 45.00000 45.00000 45.00000 45.00000 45.00000
8 63.00000 63.00000 63.00000 63.00000 63.00000 63.00000 63.00000 63.00000
9 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 44.00000 44.00000 44.00000 44.00000 44.00000 44.00000 44.00000 44.00000
13 35.50000 35.50000 35.50000 35.50000 35.50000 35.50000 35.50000 35.50000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667 26.16667
17 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000 22.00000
18 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000 26.00000
19 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000 25.00000
TAVG.75 TAVG.76 TAVG.77 TAVG.78 TAVG.79 TMAX.1 TMAX.2 TMAX.3
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 38.78462 39.00000 39.00000 39.00000 39.00000 41.00000 44.00977 43.29808
4 40.80000 39.00000 39.00000 39.00000 39.00000 60.00000 60.00000 60.00000
5 17.84615 17.84615 17.84615 17.84615 17.84615 43.50000 43.50000 24.00000
6 NA NA NA NA NA NA NA NA
7 45.00000 45.00000 45.00000 45.00000 45.00000 39.18901 39.18901 46.65185
8 63.00000 63.00000 63.00000 63.00000 63.00000 38.50000 38.50000 38.50000
9 57.00000 57.00000 57.00000 57.00000 57.00000 55.00000 55.00000 55.00000
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 44.00000 44.00000 44.00000 44.00000 44.00000 55.00000 55.00000 55.00000
13 35.50000 35.50000 35.50000 35.50000 35.50000 55.00000 55.00000 55.00000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 26.16667 26.16667 26.16667 26.16667 26.16667 60.00000 60.00000 60.00000
17 22.00000 22.00000 22.00000 22.00000 22.00000 43.00000 43.00000 43.00000
18 26.00000 26.00000 26.00000 26.00000 26.00000 60.00000 60.00000 60.00000
19 25.00000 25.00000 25.00000 25.00000 25.00000 50.28571 50.28571 50.28571
TMAX.4 TMAX.5 TMAX.6 TMAX.7 TMAX.8 TMAX.9 TMAX.10 TMAX.11
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 34.61111 50.44397 54.60000 21.00000 40.88889 29.25000 35.70588 40.00000
4 60.00000 60.00000 60.04545 60.09091 60.13636 60.18182 60.22727 60.27273
5 29.00000 51.28571 37.06593 22.84615 22.84615 22.84615 22.84615 22.84615
6 NA NA NA NA NA NA NA NA
7 27.30769 52.45455 35.72727 19.00000 29.10000 39.20000 34.00000 34.39655
8 38.50000 37.12500 35.75000 34.37500 33.00000 38.33333 37.28000 35.72222
9 42.49655 56.37255 60.00000 29.00000 35.52000 40.58294 37.31046 34.84615
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 55.00000 56.95062 57.80000 31.83333 32.00000 39.40000 34.60000 37.85714
13 55.00000 55.00000 56.18868 31.43137 32.91549 41.09524 34.33333 38.76923
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 60.00000 60.00000 52.54040 24.66667 31.66667 31.66667 31.66667 31.66667
17 43.00000 43.00000 56.77778 41.63889 26.50000 26.50000 26.50000 26.50000
18 60.00000 60.00000 47.50000 31.00000 25.20000 24.00000 30.00000 36.00000
19 50.28571 50.28571 49.41985 30.20000 43.00000 35.64286 34.00000 40.00000
TMAX.12 TMAX.13 TMAX.14 TMAX.15 TMAX.16 TMAX.17 TMAX.18 TMAX.19
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 40.15385 40.30769 40.46154 40.61538 40.76923 40.92308 41.07692 41.23077
4 60.31818 60.36364 60.40909 60.45455 60.50000 60.54545 60.59091 60.63636
5 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615
6 NA NA NA NA NA NA NA NA
7 34.79310 35.18966 35.58621 35.98276 36.37931 36.77586 37.17241 37.56897
8 41.20000 45.00000 44.00000 43.00000 34.00000 35.40000 36.80000 38.20000
9 35.27692 35.70769 36.13846 36.56923 37.00000 37.25000 37.50000 37.75000
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 43.16667 42.79545 39.49773 36.20000 32.00000 33.00000 34.00000 35.00000
13 42.00000 42.73684 38.56842 34.40000 38.00000 37.50000 37.00000 36.50000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667
17 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000
18 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000
19 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000
TMAX.20 TMAX.21 TMAX.22 TMAX.23 TMAX.24 TMAX.25 TMAX.26 TMAX.27
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 41.38462 41.53846 41.69231 41.84615 42.00000 42.15385 42.30769 42.46154
4 60.68182 60.72727 60.77273 60.81818 60.86364 60.90909 60.95455 61.00000
5 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615
6 NA NA NA NA NA NA NA NA
7 37.96552 38.36207 38.75862 39.15517 39.55172 39.94828 40.34483 40.74138
8 39.60000 41.00000 29.00000 30.55000 32.10000 33.65000 35.20000 36.75000
9 38.00000 41.00000 41.39535 41.79070 42.18605 42.58140 42.97674 43.37209
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 36.00000 37.56897 34.45455 32.00000 30.00000 35.38462 30.50000 34.08333
13 36.00000 38.42457 33.04255 23.00000 29.50000 36.00000 30.50000 32.33714
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667
17 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000
18 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000
19 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000
TMAX.28 TMAX.29 TMAX.30 TMAX.31 TMAX.32 TMAX.33 TMAX.34 TMAX.35
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 42.61538 42.76923 42.92308 43.07692 43.23077 43.38462 43.53846 43.69231
4 61.04545 61.09091 61.13636 61.18182 61.22727 61.27273 61.31818 61.36364
5 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615
6 NA NA NA NA NA NA NA NA
7 41.13793 41.53448 41.93103 42.32759 42.72414 43.12069 43.51724 43.91379
8 38.30000 39.85000 41.40000 42.95000 44.50000 46.05000 47.60000 49.15000
9 43.76744 44.16279 44.55814 44.95349 45.34884 45.74419 46.13953 46.53488
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 37.66667 41.25000 44.83333 48.41667 52.00000 43.74359 39.86047 48.77193
13 34.17429 36.01143 37.84857 39.68571 41.52286 43.36000 39.93443 48.32353
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667
17 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000
18 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000
19 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000
TMAX.36 TMAX.37 TMAX.38 TMAX.39 TMAX.40 TMAX.41 TMAX.42 TMAX.43
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 43.84615 44.00000 44.15385 44.30769 44.46154 44.61538 44.76923 44.92308
4 61.40909 61.45455 61.50000 61.54545 61.59091 61.63636 61.68182 61.72727
5 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615
6 NA NA NA NA NA NA NA NA
7 44.31034 44.70690 45.10345 45.50000 45.89655 46.29310 46.68966 47.08621
8 50.70000 52.25000 53.80000 55.35000 56.90000 58.45000 60.00000 50.00000
9 46.93023 47.32558 47.72093 48.11628 48.51163 48.90698 49.30233 49.69767
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 57.21053 51.00000 45.85714 53.00000 51.01456 61.41638 52.86598 51.70000
13 57.47619 47.00000 45.75000 45.75000 45.75000 45.75000 45.75000 45.75000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667
17 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000
18 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000
19 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000
TMAX.44 TMAX.45 TMAX.46 TMAX.47 TMAX.48 TMAX.49 TMAX.50 TMAX.51
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 45.07692 45.23077 45.38462 45.53846 45.69231 45.84615 46.00000 46.15385
4 61.77273 61.81818 61.86364 61.90909 61.95455 62.00000 62.04545 62.09091
5 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615
6 NA NA NA NA NA NA NA NA
7 47.48276 47.87931 48.27586 48.67241 49.06897 49.46552 49.86207 50.25862
8 62.00000 65.16667 68.33333 71.50000 74.66667 77.83333 81.00000 81.00000
9 50.09302 50.48837 50.88372 51.27907 51.67442 52.06977 52.46512 52.86047
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 60.85000 70.00000 63.50000 57.00000 57.00000 57.00000 57.00000 57.00000
13 45.75000 45.75000 45.75000 45.75000 45.75000 45.75000 45.75000 45.75000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667
17 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000
18 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000
19 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000
TMAX.52 TMAX.53 TMAX.54 TMAX.55 TMAX.56 TMAX.57 TMAX.58 TMAX.59
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 46.30769 46.46154 46.61538 46.76923 46.92308 47.07692 47.23077 47.38462
4 62.13636 62.18182 62.22727 62.27273 62.31818 62.36364 62.40909 62.45455
5 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615
6 NA NA NA NA NA NA NA NA
7 50.65517 51.05172 51.44828 51.84483 52.24138 52.63793 53.03448 53.43103
8 81.00000 81.00000 81.00000 81.00000 81.00000 81.00000 81.00000 81.00000
9 53.25581 53.65116 54.04651 54.44186 54.83721 55.23256 55.62791 56.02326
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000
13 45.75000 45.75000 45.75000 45.75000 45.75000 45.75000 45.75000 45.75000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667
17 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000
18 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000
19 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000
TMAX.60 TMAX.61 TMAX.62 TMAX.63 TMAX.64 TMAX.65 TMAX.66 TMAX.67
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 47.53846 47.69231 47.84615 48.00000 48.15385 48.30769 48.46154 48.61538
4 62.50000 62.54545 62.59091 62.63636 62.68182 62.72727 62.77273 62.81818
5 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615
6 NA NA NA NA NA NA NA NA
7 53.82759 54.22414 54.62069 55.01724 55.41379 55.81034 56.20690 56.60345
8 81.00000 81.00000 81.00000 81.00000 81.00000 81.00000 81.00000 81.00000
9 56.41860 56.81395 57.20930 57.60465 58.00000 67.50000 77.00000 77.00000
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000
13 45.75000 45.75000 45.75000 45.75000 45.75000 45.75000 45.75000 45.75000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667
17 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000
18 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000
19 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000
TMAX.68 TMAX.69 TMAX.70 TMAX.71 TMAX.72 TMAX.73 TMAX.74 TMAX.75
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 48.76923 48.92308 49.07692 49.23077 49.38462 49.53846 49.69231 49.84615
4 62.86364 62.90909 62.95455 63.00000 60.40000 57.80000 55.20000 52.60000
5 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615 22.84615
6 NA NA NA NA NA NA NA NA
7 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000
8 81.00000 81.00000 81.00000 81.00000 81.00000 81.00000 81.00000 81.00000
9 77.00000 77.00000 77.00000 77.00000 77.00000 77.00000 77.00000 77.00000
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000 57.00000
13 45.75000 45.75000 45.75000 45.75000 45.75000 45.75000 45.75000 45.75000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667 31.66667
17 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000 26.50000
18 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000 36.00000
19 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000
TMAX.76 TMAX.77 TMAX.78 TMAX.79 TMIN.1 TMIN.2 TMIN.3 TMIN.4
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 50.00000 50.00000 50.00000 50.00000 33.00000 27.84691 28.09615 11.185185
4 50.00000 50.00000 50.00000 50.00000 32.00000 32.00000 32.00000 32.000000
5 22.84615 22.84615 22.84615 22.84615 25.16667 25.16667 11.00000 11.000000
6 NA NA NA NA NA NA NA NA
7 57.00000 57.00000 57.00000 57.00000 22.62064 22.62064 31.13333 7.846154
8 81.00000 81.00000 81.00000 81.00000 11.50000 11.50000 11.50000 11.500000
9 77.00000 77.00000 77.00000 77.00000 35.00000 35.00000 35.00000 13.372238
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 57.00000 57.00000 57.00000 57.00000 22.00000 22.00000 22.00000 22.000000
13 45.75000 45.75000 45.75000 45.75000 28.08451 28.08451 28.08451 28.084507
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 31.66667 31.66667 31.66667 31.66667 32.00000 32.00000 32.00000 32.000000
17 26.50000 26.50000 26.50000 26.50000 20.00000 20.00000 20.00000 20.000000
18 36.00000 36.00000 36.00000 36.00000 32.00000 32.00000 32.00000 32.000000
19 40.00000 40.00000 40.00000 40.00000 25.14286 25.14286 25.14286 25.142857
TMIN.5 TMIN.6 TMIN.7 TMIN.8 TMIN.9 TMIN.10 TMIN.11 TMIN.12
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 25.27586 39.00000 0.00000 24.00000 14.25000 11.17647 12.00000 12.26154
4 32.00000 32.03030 32.06061 32.09091 32.12121 32.15152 32.18182 32.21212
5 26.85714 20.19780 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846
6 NA NA NA NA NA NA NA NA
7 29.03030 15.51515 2.00000 13.60000 25.20000 17.00000 17.34483 17.68966
8 15.12500 18.75000 22.37500 26.00000 15.00000 13.92000 14.16667 14.80000
9 29.08547 33.00000 22.00000 29.72000 19.33412 13.24837 14.30769 13.04615
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 30.00000 33.20000 21.00000 21.00000 23.72000 13.60000 13.00000 15.00000
13 28.08451 33.64151 19.78431 22.47887 26.19841 14.11111 12.92308 15.00000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 32.00000 37.93182 9.00000 19.00000 19.00000 19.00000 19.00000 19.00000
17 20.00000 38.77778 29.13889 19.50000 19.50000 19.50000 19.50000 19.50000
18 32.00000 32.00000 15.00000 13.20000 10.00000 11.50000 13.00000 13.00000
19 25.14286 32.73282 14.60000 25.00000 21.28571 17.00000 12.00000 12.00000
TMIN.13 TMIN.14 TMIN.15 TMIN.16 TMIN.17 TMIN.18 TMIN.19 TMIN.20
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 12.52308 12.78462 13.046154 13.30769 13.56923 13.83077 14.09231 14.35385
4 32.24242 32.27273 32.303030 32.33333 32.36364 32.39394 32.42424 32.45455
5 13.53846 13.53846 13.538462 13.53846 13.53846 13.53846 13.53846 13.53846
6 NA NA NA NA NA NA NA NA
7 18.03448 18.37931 18.724138 19.06897 19.41379 19.75862 20.10345 20.44828
8 22.00000 27.00000 32.000000 10.00000 12.40000 14.80000 17.20000 19.60000
9 11.78462 10.52308 9.261538 8.00000 10.00000 12.00000 14.00000 16.00000
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 18.54545 23.67273 28.800000 18.00000 18.00000 18.00000 18.00000 18.00000
13 18.94737 23.37368 27.800000 18.00000 18.00000 18.00000 18.00000 18.00000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 19.00000 19.00000 19.000000 19.00000 19.00000 19.00000 19.00000 19.00000
17 19.50000 19.50000 19.500000 19.50000 19.50000 19.50000 19.50000 19.50000
18 13.00000 13.00000 13.000000 13.00000 13.00000 13.00000 13.00000 13.00000
19 12.00000 12.00000 12.000000 12.00000 12.00000 12.00000 12.00000 12.00000
TMIN.21 TMIN.22 TMIN.23 TMIN.24 TMIN.25 TMIN.26 TMIN.27 TMIN.28
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 14.61538 14.87692 15.13846 15.40000 15.66154 15.92308 16.18462 16.44615
4 32.48485 32.51515 32.54545 32.57576 32.60606 32.63636 32.66667 32.69697
5 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846
6 NA NA NA NA NA NA NA NA
7 20.79310 21.13793 21.48276 21.82759 22.17241 22.51724 22.86207 23.20690
8 22.00000 11.00000 11.90000 12.80000 13.70000 14.60000 15.50000 16.40000
9 19.00000 19.58140 20.16279 20.74419 21.32558 21.90698 22.48837 23.06977
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 15.94828 18.24242 20.00000 14.00000 10.15385 16.50000 17.58333 18.66667
13 17.18966 16.55319 11.00000 11.50000 12.00000 16.50000 17.18857 17.87714
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000
17 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000
18 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000
19 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000
TMIN.29 TMIN.30 TMIN.31 TMIN.32 TMIN.33 TMIN.34 TMIN.35 TMIN.36
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 16.70769 16.96923 17.23077 17.49231 17.75385 18.01538 18.27692 18.53846
4 32.72727 32.75758 32.78788 32.81818 32.84848 32.87879 32.90909 32.93939
5 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846
6 NA NA NA NA NA NA NA NA
7 23.55172 23.89655 24.24138 24.58621 24.93103 25.27586 25.62069 25.96552
8 17.30000 18.20000 19.10000 20.00000 20.90000 21.80000 22.70000 23.60000
9 23.65116 24.23256 24.81395 25.39535 25.97674 26.55814 27.13953 27.72093
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 19.75000 20.83333 21.91667 23.00000 21.23077 18.93023 20.02632 29.10526
13 18.56571 19.25429 19.94286 20.63143 21.32000 19.29508 20.05882 29.28571
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000
17 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000
18 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000
19 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000
TMIN.37 TMIN.38 TMIN.39 TMIN.40 TMIN.41 TMIN.42 TMIN.43 TMIN.44
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 18.80000 19.06154 19.32308 19.58462 19.84615 20.10769 20.36923 20.63077
4 32.96970 33.00000 33.03030 33.06061 33.09091 33.12121 33.15152 33.18182
5 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846
6 NA NA NA NA NA NA NA NA
7 26.31034 26.65517 27.00000 27.34483 27.68966 28.03448 28.37931 28.72414
8 24.50000 25.40000 26.30000 27.20000 28.10000 29.00000 25.00000 31.00000
9 28.30233 28.88372 29.46512 30.04651 30.62791 31.20930 31.79070 32.37209
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 20.00000 23.85714 25.00000 29.47087 31.84187 31.40722 29.25000 33.12500
13 16.00000 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000
17 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000
18 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000
19 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000
TMIN.45 TMIN.46 TMIN.47 TMIN.48 TMIN.49 TMIN.50 TMIN.51 TMIN.52
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 20.89231 21.15385 21.41538 21.67692 21.93846 22.20000 22.46154 22.72308
4 33.21212 33.24242 33.27273 33.30303 33.33333 33.36364 33.39394 33.42424
5 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846
6 NA NA NA NA NA NA NA NA
7 29.06897 29.41379 29.75862 30.10345 30.44828 30.79310 31.13793 31.48276
8 33.33333 35.66667 38.00000 40.33333 42.66667 45.00000 45.00000 45.00000
9 32.95349 33.53488 34.11628 34.69767 35.27907 35.86047 36.44186 37.02326
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 37.00000 35.50000 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000
13 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000
17 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000
18 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000
19 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000
TMIN.53 TMIN.54 TMIN.55 TMIN.56 TMIN.57 TMIN.58 TMIN.59 TMIN.60
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 22.98462 23.24615 23.50769 23.76923 24.03077 24.29231 24.55385 24.81538
4 33.45455 33.48485 33.51515 33.54545 33.57576 33.60606 33.63636 33.66667
5 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846
6 NA NA NA NA NA NA NA NA
7 31.82759 32.17241 32.51724 32.86207 33.20690 33.55172 33.89655 34.24138
8 45.00000 45.00000 45.00000 45.00000 45.00000 45.00000 45.00000 45.00000
9 37.60465 38.18605 38.76744 39.34884 39.93023 40.51163 41.09302 41.67442
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000
13 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000
17 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000
18 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000
19 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000
TMIN.61 TMIN.62 TMIN.63 TMIN.64 TMIN.65 TMIN.66 TMIN.67 TMIN.68
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 25.07692 25.33846 25.60000 25.86154 26.12308 26.38462 26.64615 26.90769
4 33.69697 33.72727 33.75758 33.78788 33.81818 33.84848 33.87879 33.90909
5 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846
6 NA NA NA NA NA NA NA NA
7 34.58621 34.93103 35.27586 35.62069 35.96552 36.31034 36.65517 37.00000
8 45.00000 45.00000 45.00000 45.00000 45.00000 45.00000 45.00000 45.00000
9 42.25581 42.83721 43.41860 44.00000 42.00000 40.00000 40.00000 40.00000
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000
13 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000
17 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000
18 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000
19 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000
TMIN.69 TMIN.70 TMIN.71 TMIN.72 TMIN.73 TMIN.74 TMIN.75 TMIN.76
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 27.16923 27.43077 27.69231 27.95385 28.21538 28.47692 28.73846 29.00000
4 33.93939 33.96970 34.00000 33.00000 32.00000 31.00000 30.00000 29.00000
5 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846 13.53846
6 NA NA NA NA NA NA NA NA
7 37.00000 37.00000 37.00000 37.00000 37.00000 37.00000 37.00000 37.00000
8 45.00000 45.00000 45.00000 45.00000 45.00000 45.00000 45.00000 45.00000
9 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000 40.00000
10 NA NA NA NA NA NA NA NA
11 NA NA NA NA NA NA NA NA
12 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000 34.00000
13 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000 24.50000
14 NA NA NA NA NA NA NA NA
15 NA NA NA NA NA NA NA NA
16 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000 19.00000
17 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000 19.50000
18 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000 13.00000
19 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000 12.00000
TMIN.77 TMIN.78 TMIN.79
1 NA NA NA
2 NA NA NA
3 29.00000 29.00000 29.00000
4 29.00000 29.00000 29.00000
5 13.53846 13.53846 13.53846
6 NA NA NA
7 37.00000 37.00000 37.00000
8 45.00000 45.00000 45.00000
9 40.00000 40.00000 40.00000
10 NA NA NA
11 NA NA NA
12 34.00000 34.00000 34.00000
13 24.50000 24.50000 24.50000
14 NA NA NA
15 NA NA NA
16 19.00000 19.00000 19.00000
17 19.50000 19.50000 19.50000
18 13.00000 13.00000 13.00000
19 12.00000 12.00000 12.00000
summary(marten)
unmarkedFrame Object
19 sites
Maximum number of observations per site: 79
Mean number of observations per site: 73.63
Sites with at least one detection: 19
Tabulation of y observations:
0 1 <NA>
1127 272 102
Site-level covariates:
deployment_id sensor_height elevation ruggedness
WM01.2 : 1 Chest height: 8 Min. :1923 Min. :-13.0963
WM01.2 Ground: 1 Other :11 1st Qu.:2191 1st Qu.: -2.1627
WM03.2 : 1 Median :2311 Median : -0.8553
WM03.2 Ground: 1 Mean :2292 Mean : -0.3879
WM04.2 : 1 3rd Qu.:2402 3rd Qu.: 2.8648
WM04.2 Ground: 1 Max. :2459 Max. : 4.0513
(Other) :13
Observation-level covariates:
PRCP SNOW SNWD TAVG
Min. :0.00000 Min. :0.000000 Min. :0.00000 Min. :10.00
1st Qu.:0.00000 1st Qu.:0.000000 1st Qu.:0.00000 1st Qu.:25.00
Median :0.00000 Median :0.000000 Median :0.00000 Median :28.45
Mean :0.05996 Mean :0.003997 Mean :0.06063 Mean :32.40
3rd Qu.:0.00000 3rd Qu.:0.000000 3rd Qu.:0.00000 3rd Qu.:40.07
Max. :1.00000 Max. :1.000000 Max. :1.00000 Max. :63.00
NA's :553
TMAX TMIN
Min. :19.00 Min. : 0.00
1st Qu.:31.67 1st Qu.:13.54
Median :40.00 Median :19.50
Mean :43.26 Mean :22.72
3rd Qu.:52.61 3rd Qu.:31.03
Max. :81.00 Max. :45.00
NA's :553 NA's :553
plot(marten)
# run null model to get naive estimate of detection and occupancy# i.e. one without covariates of either detection or occupancy# note that the first ~1 is detection and the second ~1 is occupancyele_null <-occu(~1~1, marten)# backtransform to get estimates#detectionp_det <-backTransform(ele_null, "det")p_det
Backtransformed linear combination(s) of Detection estimate(s)
Estimate SE LinComb (Intercept)
0.194 0.0106 -1.42 1
Transformation: logistic
# detection probability = 0.1944 (+/- SE 0.011)# confidence intervals for detectiondetCI <-confint(p_det)detCI
0.025 0.975
0.1745199 0.2160032
# CI 95% 0.317 - 0.410# occupancypsi <-backTransform(ele_null, "state")psi
Backtransformed linear combination(s) of Occupancy estimate(s)
Estimate SE LinComb (Intercept)
1 0.00198 9.51 1
Transformation: logistic
# naive occupancy = 0.895 (+/- SE 0.070) psiCI <-confint(psi)psiCI
0.025 0.975
2.928727e-19 1
# CI 95% 0.663 - 0.974
So these outputs mean that: The null model gives a detection probability of 0.194 (SE 0.0106, 95% CI 0.175–0.216). The naïve occupancy estimate was high at 0.9999 (SE 0.0020), but the 95% confidence interval ranged from almost zero to one. This interval suggests that the null model cannot reliably determine how many sites were truly occupied. ## Model Fitting
Call:
occu(formula = ~SNWD + PRCP ~ 1, data = marten)
Occupancy (logit-scale):
Estimate SE z P(>|z|)
12.2 101 0.12 0.904
Detection (logit-scale):
Estimate SE z P(>|z|)
(Intercept) -2.02 0.0869 -23.203 4.22e-119
SNWD 14.68 99.5545 0.147 8.83e-01
PRCP 14.92 113.6505 0.131 8.96e-01
AIC: 932.1377
Number of sites: 19
Warning: Large or missing SE values. Be very cautious using these results.
Conclusions so far
This tells us that snow on the ground and precipitation affects detection but not occupancy. This was true for both the winter only data and all the data for the Pacific Marten
This supports the null hypothesis that none of the co-variates are important in telling us where the martens are found, this was true for both full year and winter only data, however the confidence of the detection was far lower for all year data when compared to winter only. This makes sense as the detection of martens was higher when there was snow on the ground, however the uncertainty was so high that this conclusion is only weakly supported.
Lack of individual identification means that home range size or number of territories cannot be examined. As we are investigating the factors affecting distributions, rather than explicit numbers, the closed population assumption can be violated.
Wolverine Occupancy - single species, multiple season
# Join season info to detection matrix column namesso_season_map <- so_blocks %>%select(SO, season)# List of SO columns per seasonseason_SO_list <-split(so_season_map$SO, so_season_map$season)
As the sample periods are uneven, this will create an issue with the unmarked object.
This is the compressed chunk that achieves this
# Count SO blocks per seasonblocks_per_season <-sapply(season_SO_list, length)# Minimum number of blocks across seasonsmin_blocks <-min(blocks_per_season)# Number to drop from each end (symmetric)drop_each_side <-floor((blocks_per_season - min_blocks) /2)# Symmetric trimming + enforce exact lengthseason_SO_list_trimmed <-mapply(function(cols, drop_n) {# Step 1: symmetric trimmingif (drop_n >0) { cols <- cols[(drop_n +1):(length(cols) - drop_n)] }# Step 2: enforce exact min_blocks (drop from end)if (length(cols) > min_blocks) { cols <- cols[1:min_blocks] } cols }, season_SO_list, drop_each_side,SIMPLIFY =FALSE)
# Order seasonsseason_order <-c("Winter survival/caching","Denning/birth","Late kit rearing","Summer foraging","Autumn dispersal/caching")# Build y matrix by binding SO blocks in season ordery_multi <-do.call( cbind,lapply(season_order, function(s) { so_cols <- season_SO_list_trimmed[[s]] detection_matrix[, so_cols, drop =FALSE] }))
unmarkedFrame Object
19 sites
Maximum number of observations per site: 60
Mean number of observations per site: 60
Number of primary survey periods: 5
Number of secondary survey periods: 12
Sites with at least one detection: 13
Tabulation of y observations:
0 1
1092 48
Site-level covariates:
elevation ruggedness sensor_height_num
Min. :1923 Min. :-13.0963 Min. :0.0000
1st Qu.:2191 1st Qu.: -2.1627 1st Qu.:0.0000
Median :2311 Median : -0.8553 Median :0.0000
Mean :2292 Mean : -0.3879 Mean :0.4211
3rd Qu.:2402 3rd Qu.: 2.8648 3rd Qu.:1.0000
Max. :2459 Max. : 4.0513 Max. :1.0000
Observation-level covariates:
effort
Min. :0.0000
1st Qu.:1.0000
Median :1.0000
Mean :0.9991
3rd Qu.:1.0000
Max. :1.0000
plot(umf_wolv)
We can see now where and when our observations are.
lets check co-linearity between the variates:
# Extract numeric site covariatessiteCovs <- deployment_covariates# Define the pairspairs <-list(c("elevation", "ruggedness"),c("elevation", "sensor_height_num"),c("ruggedness", "sensor_height_num"))# Run cor.test() for each pair and extract resultscor_results <-lapply(pairs, function(vars) { x <- siteCovs[[vars[0+1]]] y <- siteCovs[[vars[1+1]]] test <-cor.test(x, y)data.frame(var1 = vars[0+1],var2 = vars[1+1],correlation =unname(test$estimate),p_value = test$p.value,conf_low = test$conf.int[1],conf_high = test$conf.int[2] )})# Combine into a single tablecor_table <-do.call(rbind, cor_results)cor_table
m0 <-colext(psiformula =~1,gammaformula =~1,epsilonformula =~1,pformula =~1,data = umf_wolv)# Extract parameter estimates occupancy_est <-backTransform(m0, type ="psi") # Occupancy probabilitycolonization_est <-backTransform(m0, type ="col") # Colonisation probabilityextinction_est <-backTransform(m0, type ="ext") # Extinction probabilitydetection_est <-backTransform(m0, type ="det") # Detection probability# Print the estimatescat("Occupancy probability (psi):", occupancy_est@estimate, "\n")
Occupancy probability (psi): 0.6036841
cat("Colonisation probability (gamma):", colonization_est@estimate, "\n")
Colonisation probability (gamma): 0.07561866
cat("Extinction probability (epsilon):", extinction_est@estimate, "\n")
Extinction probability (epsilon): 6.054347e-05
cat("Detection probability (p):", detection_est@estimate, "\n")
Detection probability (p): 0.0647397
Wolverine colcusions so far
Sites surveyed were roughly 60% occupied (psi) Colonisation is low (0.075) Extinction is >0.001 There is a low detection probability.
This all makes sense - Wolverines are solitary animals with large territories and so the whole survey site may only have included a single animal.There was only one identified by teh orginal study.
comparisions between Martens and Wolverines:
There is a larger proportion of sites occupied by Martens than Wolverines The probability of detecting Martens in higher than that of wolverines.
We cannot tell, without individual IDs,
To help with assessing the studies design, examining how the detection between cameras that were ground or higher mounted would be interesting.
m_p_height <-colext(psiformula =~1,gammaformula =~1,epsilonformula =~1,pformula =~ sensor_height_num,data = umf_wolv)# Extract detection coefficientsb0 <-coef(m_p_height, type ="det")[1] # interceptb1 <-coef(m_p_height, type ="det")[2] # effect of sensor height# Logistic functioninvlogit <-function(x) 1/ (1+exp(-x))# Detection for other height (0)p_other <-invlogit(b0)# Detection for standard height (1)p_standard <-invlogit(b0 + b1)cat("=== DETECTION ~ SENSOR HEIGHT MODEL ===\n")