Skip to contents

Hatch Date data, like first lay date is important for investigating changes in nesting phenology and success over time. These data in the NestWatch dataset are provided by participants, and the input of these dates may be overlooked by the participants. If not explicitly provided by the participant, hatch date may be estimated based off first lay date or fledge Date. This function checks, in order, if the Young.Total were recorded or if the nest fledged (positive indication of hatching), then if a hatch date is available, and finally if a known (non-estimated) fledge date is available. If these requirements are met, the function uses user-input nest phenology timeframes to estimate hatch date date. Estimated dates are denoted with a 1 in data$Hatch.Date.Estimated.

Usage

nw.esthatch(data, phenology, output = NULL)

Arguments

data

dataframe; A dataframe containing merged NestWatch attempts and visits data.

phenology

dataframe; A dataframe one row of phenological data for each species to be estimated. Data columns as follows:

  • Species: Species Codes for each species to be estimated.

  • Clutch.Size: Average clutch size for each species.

  • Eggs.per.Day: Average number of eggs laid per day by each species.

  • Incubation: Average number of days spent in incubation (days between clutch complete and hatch).

  • Nestling: Average number of days spent in nestling period (days between hatch and fledge).

output

character; An optional character string to custom name the output dataframe

Value

dataframe

Details

Precision of the hatch date estimates depend on what data is used to estimate the values from (and if those values are estimated). Users should consider if they want to estimate hatch dates based on estimated lay dates. The function estimates based off of first lay date if available, and calculates the number of egg-laying-days based on clutch size (if available, or user-provided average clutch size) and eggs-per-day of the species. If lay dates are not available, the function estimates hatch from known fledge dates (Fledge.Date.Estimated == 0) by subtracting the user-provided nestling period length. Due to the uncertainly of sighting and aging fledged young, this function does not estimate hatch date from estimated fledge dates.

Examples

# Simplified NestWatch data with missing data
# All hatch dates should be 2024-05-20
data <- data.frame(Attempt.ID = c("1", "2", "3"),
                   Species.Code = rep("carwre", 3),
                   First.Lay.Date = as.Date(c("2024-05-01", "2024-05-02", NA)),
                   Hatch.Date = as.Date(rep(NA, 3)),
                   Fledge.Date = as.Date(c(NA, NA, "2024-06-02")),
                   Fledge.Date.Estimated = c(NA, NA, 0),
                   Clutch.Size = c(NA, 3, NA),
                   Young.Total = c(4, 3, 4),
                   Outcome = c("s1", "s1", "s1"))

# Create phenology dataframe
phenology <- data.frame(Species = c("carwre"),
                        Clutch.Size  = c(4),
                        Eggs.per.Day = c(1),
                        Incubation   = c(16),
                        Nestling     = c(13))

# Run function
nw.esthatch(data = data, phenology = phenology)
#> ... Estimating hatch dates, this may take some time ...