Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
seananderson opened this issue Oct 12, 2022 · 1 comment
Open

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

seananderson opened this issue Oct 12, 2022 · 1 comment

Comments

@seananderson
Copy link

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:

WCGHL_data = cbind( WCGHL_data, "soak_time"=WCGHL_data[,'sampling_end_time_dim$military_hour']*60+WCGHL_data[,'sampling_end_time_dim$minute']-(WCGHL_data[,'sampling_start_time_dim$military_hour']*60+WCGHL_data[,'sampling_start_time_dim$minute']))

I assume the input data format has changed.

@James-Thorson-NOAA
Copy link
Collaborator

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:

  • getting buy-in (and in-kind labor contributions) from regional collaborators to keep pace with regional database changes; OR
  • interfacing with a higher-level API (like DisMAP) that can provide some assurance of keeping up with changes appropriately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants