ropensci / software-review

rOpenSci Software Peer Review.
292 stars 104 forks source link

Submission tsbox: Class-Agnostic Time Series #464

Closed christophsax closed 1 year ago

christophsax commented 3 years ago

Date accepted: 2023-02-23 Submitting Author Name: Christoph Sax Submitting Author Github Handle: !--author1-->@christophsax<!--end-author1-- Repository: https://github.com/christophsax/tsbox Version submitted: 3.1.9001 Submission type: Stats Badge grade: silver Editor: !--editor-->@rkillick<!--end-editor-- Reviewers: @chamberlinc, @brunaw, @nunesmatt

Due date for @chamberlinc: 2021-11-23 Due date for @brunaw: 2021-11-23 Due date for @nunesmatt: 2022-10-03

Archive: TBD Version accepted: TBD


Package: tsbox
Type: Package
Title: Class-Agnostic Time Series
Version: 0.3.1.9001
Authors@R: person("Christoph", "Sax", email = "christoph.sax@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7192-7044"))
Description: Time series toolkit with identical behavior for all
  time series classes: 'ts','xts', 'data.frame', 'data.table', 'tibble', 'zoo',
  'timeSeries', 'tsibble', 'tis' or 'irts'. Also converts reliably between these classes.
Imports:
    data.table (>= 1.10.0),
    anytime
Suggests:
    testthat,
    dplyr,
    tibble,
    tidyr,
    forecast,
    seasonal,
    dygraphs,
    xts,
    ggplot2,
    scales,
    knitr,
    rmarkdown,
    tsibble (>= 0.8.2),
    tsibbledata,
    tibbletime,
    tseries,
    units,
    zoo,
    tis,
    timeSeries,
    nycflights13,
    imputeTS,
    spelling
License: GPL-3
Encoding: UTF-8
URL: https://www.tsbox.help, https://github.com/christophsax/tsbox
BugReports: https://github.com/christophsax/tsbox/issues
Roxygen: list(markdown = TRUE, roclets = c ("namespace", "rd", "srr::srr_stats_roclet"))
RoxygenNote: 7.1.2
VignetteBuilder: knitr
Depends:
    R (>= 2.10)
Config/testthat/parallel: true
Config/testthat/edition: 3
Language: en-US

Pre-submission Inquiry

General Information

Anyone who works with time series. Many statistical packages require time series to be in a certain object (ts, xts, tsibble, data.frame). tsbox facilitates the conversion between these objects. It also provides a general toolkit that works the same way with all time series classes. {tsbox} is also mentioned in the rOpenSci Statistical Software Peer Review Section on Time Series.

In the rOpenSci classification, this package is An improvement on other implementations of similar algorithms in R. Many time series packages, e.g., zoo or tsibble contain converter functions from one class to another. They often convert from their class to ts objects and back, but lack converters to other time series class.

In most cases, tsbox transforms an object into an augmented data.table. And uses the data.table infrastructure for efficient joining and reshaping. After computation, it restores the original input class. This restoring feature is was also used in the xts::reclass() function of the xts package.

data.table: For efficient joining and reshaping xts: Similar reclassing mechanism tsibble: Tidy Temporal Data Frames and Tools

Not applicable.

Badging

I probably need some advice on this. I think that tsbox complies with most standards that are applicable. Generality of usage is a particular feature that should qualify the package for silver.

The most outstanding point is probably the one on generality:

Have a demonstrated generality of usage beyond one single envisioned use case.

The package facilitates work with time series in general. It can also be used to ease the burden of object testing and time series conversion for other time series packages.

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

Code of conduct

ropensci-review-bot commented 2 years ago

Logged review for nunesmatt (hours: 6)

mpadge commented 1 year ago

@ropensci-review-bot assign @mpadge as editor

mpadge commented 1 year ago

@christophsax Sorry that this review has taken such an extraordinarily long time. One of our editors has had to step back for a bit, so I'll take over editing the submission from here. Your last comment indicated that you stil intended to respond to the reviews. An update would be appreciated, to help us move this submission towards approval. Thanks :smile:

christophsax commented 1 year ago

I am sorry for the delay, @mpadge. I was overwhelmed with work over the last week. I hope I can do it over this or next week. Thanks for your patience.

christophsax commented 1 year ago

Thank you very much for your review, @nunesmatt! And thanks to you both for your patience, @nunesmatt and @mpadge!

I tried to answer your points as much as possible – except for the line length of the SRR comments and point 5., where I think that the point is already fulfilled.

  1. Package checking.

Fixed, thanks. (https://github.com/christophsax/tsbox/pull/216/commits/a9650f8e7ca2b86d4024ddece71db9e7ba7c185e)

  1. good practice. A few things came up when using gp. Many code lines come up as 81 characters (as opposed to suggested lengths of ![\leq 80].

These are all SRR stats comments, e.g., @srrstats {G2.4c}. I had them broken once at 80 characters, but this caused another problem. So, I would leave them like this if you don't insist on it.

guess_dts.R has a suggestion of using vapply rather than sapply.

Fixed, thanks. (https://github.com/christophsax/tsbox/pull/216/commits/d3e26afa63403d81b58e679d660e5d5e6979224e)

Error message about ts_boxable(x).

Substituted existing stopifnot(ts_boxable(x)) by the already existing but rarely used check_ts_boxable(x). The result is a more verbose error message with hint to further information:

Previously:

ts_ts(1:2)
    Error in ts_ts(1:2) : ts_boxable(x) is not TRUE

Now:

ts_ts(1:2)
    Error: object is of non-ts-boxable class(es) 'integer'. See `?ts_ts`.
  1. Comparison with timetk.

Added a paragraph on 'related packages' to the introductory vignette. (https://github.com/christophsax/tsbox/pull/216/commits/5a774a3b5e8c224c61d04c68f6be3bafd3e1739c)

The package developer might want to consider an additional function handling the zooreg class for completeness.

Implemented. You can do now, e.g.,

ts_zooreg(mdeaths)
  1. Whilst users are probably familiar with usage, the developer might want to consider adding examples to show functionality of ts_prcomp and ts_forecast under the ts_examples documentation file.

There are examples, both for ts_prcomp() and ts_forecast, already in the CRAN version. Is it confusing that they are shown within ts_plot()?

  1. I noticed that there is a spelling mistake of explicit in the error messages for the guess_time and guess_value functions.

Fixed.

nunesmatt commented 1 year ago

Review 2 for ts_box:

@christophsax, @rkillick, @mpadge -- apologies for the slow turnaround on this second review.

The full script of this review can be found at my github page here.

Package Review

Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide

Documentation

The package includes all the following forms of documentation:

Functionality


Review Comments

Summary

The package is a comprehensive conversion tool for all current time series objects, stemming from the desire to be structure/class-agnostic. As outlined in my first review, I feel this is a useful package in terms of functionality and scope for the R community. The associated package vignettes and other documentation are well set out. Readdressing the comments from my first review:

  1. Package checking. When checking the package, I get:
dts_first_of_period: no visible binding for global variable ‘time.orig’
## Undefined global functions or variables:
##   time.orig

This has been fixed successfully.

  1. good practice. A few things came up when using gp. Many code lines come up as 81 characters (as opposed to suggested lengths of $\leq 80$), which might be due to line endings etc. guess_dts.R has a suggestion of using vapply rather than sapply. These are left to the developer to tackle if desired.

@christophsax : You are right that these are SRR stats related, and as such I am fine with them being left as is.

The use of vapply has also been included as suggested.

  1. Error message about ts_boxable(x). I wonder whether a more informative error message could be shown when ts_boxable(x) is not TRUE.

This new error message is now more helpful to the beginner user.

  1. The package developer might want to consider an additional function handling the zooreg class for completeness.

@christophsax : thanks for the inclusion.

  1. Whilst users are probably familiar with usage, the developer might want to consider adding examples to show functionality of ts_prcomp and ts_forecast under the ts_examples documentation file.

On reflection, including examples within ts_plot might indeed be overkill, and I suggest leaving the documentation as is.

  1. I noticed that there is a spelling mistake of explicit in the error messages for the guess_time and guess_value functions.

this has been fixed successfully.

Having run through various checks on the package, in summary @christophsax has addressed all my comments and has a great package for end-users, and I approve the final package..

mpadge commented 1 year ago

Thanks @nunesmatt. @christophsax it seems that these comments only leave a couple of very minor points:

  1. guess_dts.R has a suggestion of using vapply rather than sapply.

    rOpenSci has a clear policy on using vapply and not sapply, so could you please change this?

  2. Please comment on the error message for ts_boxable(), and optionally inform of any changes you may decide to implement.

Please let us know when these very minor and very final issues have been addressed, and we'll look forward to approving the package.


@chamberlinc Could you please indicate in the meantime your final approval of this package? Thank you, and thanks to all involved for your patience in this issue :smiley:

nunesmatt commented 1 year ago

@mpadge, both of these issues have also been fixed by @christophsax in the latest update. Apologies for my error in not including this information..

mpadge commented 1 year ago

@nunesmatt Can you then please explicitly indicate your final approval of this package? thanks

nunesmatt commented 1 year ago

@mpadge : Yes, sure I approve the final package. I have editied my second review to make this more explicit.

christophsax commented 1 year ago

Thank you so much for your support, @nunesmatt and @mpadge! The review was super helpful and has led to a more polished package.

maurolepore commented 1 year ago

Dear all,

I don't mean to intrude but to save you time. My EiC rotation just started and I'm checking the status of open issues. So while I'm here I'll point to the next steps I see (handling editor feel free to correct me).

--

I don't see a review by @brunaw but I assume it's optional.

christophsax commented 1 year ago

@maurolepore, my understanding from https://github.com/ropensci/software-review/issues/464#issuecomment-1342939990 was that @chamberlinc has already approved.

I believe @nunesmatt was added as a reviewer instead of @brunaw.

Let me know if I can provide something else. Thanks a lot!

maurolepore commented 1 year ago

Thanks @christophsax.

I see no comment by @chamberlinc since you incorporated reviewers' feedback on Dec 26, 2022 (https://github.com/ropensci/software-review/issues/464#issuecomment-1365462292). But I see @mpadge sent a reminder for the final approval on Jan 20, 2023 (https://github.com/ropensci/software-review/issues/464#issuecomment-1398059879). With that and our mentions here I hope we get an answer soon :crossed_fingers:.

chamberlinc commented 1 year ago

Hello! I'm so sorry I missed all of this - my notification settings must have changed. Thank you for the email.

Reviewer Response

Final approval (post-review)

Estimated hours spent reviewing: 1

mpadge commented 1 year ago

@ropensci-review-bot approve tsbox

ropensci-review-bot commented 1 year ago

Approved! Thanks @christophsax for submitting and @chamberlinc, @brunaw, @nunesmatt for your reviews! :grin:

To-dos:

Should you want to acknowledge your reviewers in your package DESCRIPTION, you can do so by making them "rev"-type contributors in the Authors@R field (with their consent).

Welcome aboard! We'd love to host a post about your package - either a short introduction to it with an example for a technical audience or a longer post with some narrative about its development or something you learned, and an example of its use for a broader readership. If you are interested, consult the blog guide, and tag @ropensci/blog-editors in your reply. They will get in touch about timing and can answer any questions.

We maintain an online book with our best practice and tips, this chapter starts the 3d section that's about guidance for after onboarding (with advice on releases, package marketing, GitHub grooming); the guide also feature CRAN gotchas. Please tell us what could be improved.

Last but not least, you can volunteer as a reviewer via filling a short form.

christophsax commented 1 year ago

@ropensci-review-bot invite me to ropensci/tsbox

ropensci-review-bot commented 1 year ago

Invitation sent!

christophsax commented 1 year ago

@ropensci-review-bot finalize transfer of tsbox

ropensci-review-bot commented 1 year ago

Transfer completed. The tsbox team is now owner of the repository and the author has been invited to the team

christophsax commented 1 year ago

@chamberlinc and @nunesmatt, thank you very much for your helpful reviews! Is it ok for you if I add you as ["rev"] to the DESCRIPTION in tsbox? Thanks!

nunesmatt commented 1 year ago

@chamberlinc and @nunesmatt, thank you very much for your helpful reviews! Is it ok for you if I add you as ["rev"] to the DESCRIPTION in tsbox? Thanks!

@christophsax Sure! Thanks for the contribution to the package community.

chamberlinc commented 1 year ago

Sure! Thanks for the chance to review.