krsp_progress: Display seasonal data collection progress

Description Usage Arguments Details Value Examples

View source: R/krsp-progress.r

Description

Display an interactive visualization of data collection progress for the season. All adult females caught in the given year are inlcuded provided their most recent trapping record has fate 1-3.

Usage

1
krsp_progress(con, grid, year, data)

Arguments

con

Connection to KRSP database

grid

character; a single grid to map

year

integer; defaults to current year

data

logical; if TRUE return data frame instead of plotting

Details

The status of a female is based on the most recent trapping record and the litter table. If the most recent trapping record is dated prior to the date the litter table was updated it is ignored, and only the litter table is used. If nipple condition is 5, the status is LL (Lost Litter). Otherwise, status is Parturition, N1, or Completed if fieldBDate, date1, or tagDt fields in litter table are filled in, respectively. Finally, if litter table dates are empty, rep_con field in trapping record is used and status is P0, P1, P2, or P3 is assigned for rep_con = 1, 2, 3, 4, respectively.

Value

Displays and returns a ggvis plot of seasonal workflow progress for all females, unless data is TRUE, in which case a data frame is returned and nothing is plotted.

Examples

1
2
3
4
con <- krsp_connect()
krsp_progress(con, "JO", 2015, data = TRUE) %>%
  head()
krsp_progress(con, "KL", 2011)

mstrimas/krsp documentation built on May 23, 2019, 8:16 a.m.