ocean-tracking-network / glatos

9 stars 4 forks source link

summarize_detections produces incorrect values in num_locs and locations columns #182

Closed trbinder closed 7 months ago

trbinder commented 1 year ago
Screen Shot 2023-09-12 at 13 19 42 PM

There appears to be a bug in the code that cause the location_col argument character string to be displayed in the locations column rather than a summary of locations that each fish was detected. This occurs when summ_type = "location" or "animal".

chrisholbrook commented 9 months ago

Fixed in glatos 0.7.2 (commit 3f0a2ee366d8c9447bf4b0bff0a1f8dbfd3819a6 ).

chrisholbrook commented 7 months ago

New but related issue, likely side effect of commit https://github.com/ocean-tracking-network/glatos/commit/3f0a2ee366d8c9447bf4b0bff0a1f8dbfd3819a6 ):

e.g., example code (from help("summarize_detections")), produces incorrect results:

# get path to example detection file
det_file <- system.file("extdata", "walleye_detections.csv",
                                    package = "glatos")

det <- read_glatos_detections(det_file)

# Basic summary by animal
ds <- summarize_detections(det, summ_type = "animal")

ds

image

Should look like this:

image

chrisholbrook commented 7 months ago

Fixed in glatos 0.7.3 (commit https://github.com/ocean-tracking-network/glatos/commit/f455938a81dc095863f5394b99e3623a387878fe).

Reiterates #220.