-
Notifications
You must be signed in to change notification settings - Fork 8
Big redesign #14
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
Big redesign #14
Conversation
- As per the discussion on #8, from now on, an `epi_signal` object represents a single snapshot of a data set - Modify `as.epi_signal()` to reflect this change - Update documentation and vignettes accordingly
It's worth noting that I decided to forgo the |
- As per the discussion on #7, I ditched the `value` column in an `epi_signal` object completely - Aside from `geo_value` and `time_value`, the other columns are arbitrary and can be treated as measured variables - This required refactoring `pct_change()`, `estimate_deriv()`, and `sliced_cor()` so that the user can specify the variables they want to act on - In doing so, I used tidy evaluation (so the user just passes variable names directly), and extended this to the `by` arg of `sliced_cor()` as well - This will dovetail nicely into allow arbitrary groupings later on (for sliding by more than just geo, for example, as per #12) - The other thing I did here (probably shouldn't have lumped it into the same commit though ...) was to broaden the allowed `time_type`s to include a new "day-time" type, coded as a `POSIXct` object (time on a given day, measured to the second) - I expanded `slide_by_geo()` so that the user can specify the definition of a time step; so, for example, one can slide over the last 7 hours (if `time_type` was "day-time"), or the last 7 minutes, or whatever - Rewrote a lot of the documentation, updated the vignettes
f1f5967
to
7e93071
Compare
7e93071
to
78527ae
Compare
- This was basically "for free" implementation-wise; just needed to update needed the documentation to reflect this - Rename to `grouped_cor()` from `sliced_cor()`; update all uses of the word "slice" in documentation and vignettes accordingly
Just a note to myself or anybody else reading this: the last 2 commits were just me being silly with rebasing. I was trying to fix some typos in the commit messages, but clearly I need more practice with git rebase. |
- `epi_signal` is now `epi_tibble`. As suggested by Logan on #14, it might not be a good idea to call it use "signal, since it can contain more than one signal column - Got rid of the grouping done internally by `slide_by_geo()`. Instead allow the user to do their own grouping ahead of time - This jells with the discussion in #12, and it seems more in line with standard tidyverse-style data wrangling - As a result, renamed the sliding function to `epi_slide()` - And had to define S3 methods for grouping and joining for our `epi_tibble` objects, so that the class and metadata wouldn't be dropped by these actions - Update documentation and vignettes
- Create scaffolding for new vignettes on time and geo aggregation and on issue dates and `epi_archive` objects - My notes on these vignettes also contains ideas about what to implement - While I'm here, get rid of all join methods for the `epi_tibble` class. This was flawed because it's not clear how to handle the metadata - Rewrite the correlations vignette accordingly - Introduce an `ungroup()` method for the `epi_tibble` class, and fix a few small things to do with class and metadata assignment
@brookslogan @elray1 @dajmcdon @jacobbien @capnrefsmmat I'm about done with this now. The sequence of commits on this PR is not as clean as it should have been (too many big commits, and my rebasing attempts only clogged the presentation above). Oops, sorry ... next time I will remember to do it better. So because the commits are too big and may be unwieldy to scan, here's what I did as a summary. Renaming
Handling of signal variables, groupings
Issues
Tsibble
|
Well, I'm a bit of an idiot. I just closed this PR, by clicking "close with comment" instead of "comment". Luckily I could open it back up easily! Anyway, I am planning on merging this soon. I've rewritten all the documentation and vignettes and checked that it all works. I'll give you guys a little bit of time to chime in if you'd like ... but since nobody is really using this package yet, and we're still in the early stages, I feel like merging without an official review process is still OK. Probably soon though, we should implement some tests, and do things more properly. |
- Changing what we highlight about what this function does; also, moving "cor" to the front of the name - While I'm here, I snuck in a fix to the `NA` problem raised by Logan on #17. Now `pct_change()` and `estimate_deriv()` take as an argument `na_rm` with default value `TRUE`
Attempting to address many issues at once: #7 #8 #10 #12.