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

Clean up time #56

Closed
ethanplunkett opened this issue Mar 29, 2023 · 2 comments · Fixed by #69
Closed

Clean up time #56

ethanplunkett opened this issue Mar 29, 2023 · 2 comments · Fixed by #69

Comments

@ethanplunkett
Copy link
Contributor

  1. A newly added function lookup_timestep() should be used within lookup_transitions() to not duplicate code; and because it's more robust.
  2. lookup_timestep() should be updated as currently it would give bogus results if the model doesn't cover the whole year (see Allow preprocessing part of year #39) but this can't happen until we update the example data (Generate new test dataset #50). lookup_transitions() has the same problem (but shouldn't after 1).
@ethanplunkett
Copy link
Contributor Author

ethanplunkett commented Apr 2, 2023

Also consider supporting the 't##' (timestep) notation used in BirdFlow distribution column names and the 'W##' (week) notation used by ebirdst for time labels. The distinction between the two being that a model always starts with timestep 1 where the w indicates week of the year so for a partial year model might not start with 1.

@ethanplunkett
Copy link
Contributor Author

Also add a new function lookup_time_sequence(start, end, direction, bf) which returns a directional series of timesteps. This would use a lot of code from lookup_transitions( ) and would return a directed sequence of timesteps, that might pass over the year boundary. It would verify that all the timesteps were in the BirdFlow model and (if it crosses the year boundary) that the model has the necessary transition. See #66 for a slight change in precedence of direction vs implicit direction in dates relative to current intended behavior. The change is to always follow the direction argument even when dates are used as input.

ethanplunkett added a commit that referenced this issue Apr 11, 2023
 lookup_timestep_series()  designed to process user input to other functions
   like route() and predict().
  lookup_season_timesteps() narrowly focused helper for looking up season
   info.  It is called by lookup_timestep_sereis()
Updated functions (to use new functions above:
  lookup_transitions()
  route()
  route_migration()

Addresses #56, closes #68, fixes #66
@ethanplunkett ethanplunkett linked a pull request Apr 12, 2023 that will close this issue
ethanplunkett added a commit that referenced this issue Apr 13, 2023
- lookup_timestep() is now consistent with ebirdst.
- lookup_timestep() now uses breakpoints in $dates.  Addresses #56
- get_distr() now uses lookup_timestep()
- preprocess_species() uses column names start, midpoint, and end  in $dates
- more testing
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

Successfully merging a pull request may close this issue.

1 participant