James-Thorson / FishData

Compile and harmonize catch rates from fishery-independent surveys of fish populations
15 stars 10 forks source link

Error on WCGHL query with hour and minute columns missing #26

Open seananderson opened 1 year ago

seananderson commented 1 year ago

Regarding the Google doc, I can't remember what issue I was facing at the time, but I tried running the readme examples and ran into the following issue:

Database = FishData::download_catch_rates( survey="WCGHL", species_set="Sebastes paucispinis" )
Error in `[.data.frame`(WCGHL_data, , "sampling_end_time_dim$military_hour") : 
  undefined columns selected
traceback()
...
6: `[.data.frame`(WCGHL_data, , "sampling_end_time_dim$military_hour")
5: WCGHL_data[, "sampling_end_time_dim$military_hour"]
...
2: cbind(WCGHL_data, soak_time = WCGHL_data[, "sampling_end_time_dim$military_hour"] * 
       60 + WCGHL_data[, "sampling_end_time_dim$minute"] - (WCGHL_data[, 
    ...
1: FishData::download_catch_rates(survey = "WCGHL", species_set = "Sebastes paucispinis")

I.e., related to this line where military_hour and minute are missing: https://github.com/James-Thorson/FishData/blob/c444040590d6bf44a5310b78e56cdf1e1f8f70b9/R/download_catch_rates.R#L220

I assume the input data format has changed.

James-Thorson-NOAA commented 1 year ago

Thanks for flagging this! It's super helpful to keep a record of these issues as you know :)

I think this is a good example of the importance of either: