These metrics describe frequency of recording in weeks in which the recorder made observations.

weeklyDevotedDays(recorder_name, data, recorder_col = "recorders",
  date_col = "date_start")

Arguments

recorder_name

the name of the recorder for whom you want to calculate the metrics

data

the data.frame of recording information

recorder_col

the name of the column that contains the recorder names

date_col

the name of the column that contains the date. This must be formatted as a date

Value

  • recorder - The name of the recorder, as given in the recorder_name argument

  • median_weekly_devoted_days - The median number of days this person recorders in a weeks where they make at least one observation

  • n_weeks - The total number of weeks in which this recorder has made at least one observation

  • n_days - The total number of days on which this recorder has made observations

Examples

# NOT RUN {
# load example data
head(cit_sci_data)


WDD <- weeklyDevotedDays(recorder_name = 3007,
                         data = cit_sci_data,
                         recorder_col = 'recorder',
                         date_col = 'date')

head(WDD)

# Run for more than one recorder, this can be slow 
WDD_all <- lapply(unique(cit_sci_data$recorder),
                  FUN = weeklyDevotedDays,
                  data = cit_sci_data,
                  recorder_col = 'recorder',
                  date_col = 'date')

# summarise as one table
WDD_all_sum <- do.call(rbind, WDD_all)

hist(WDD_all_sum$median_weekly_devoted_days)

# }