UBC-MDS / software-review-2022

0 stars 0 forks source link

Submission Group 10: canadacovidmetrics (R) #12

Open adammorphy opened 2 years ago

adammorphy commented 2 years ago

name: CanadaCovidMetrics about: Our package extracts covid data from OpenAPI, and formats the results in usable dataframes

Submitting Author Name: Adam Morphy Submitting Author Github Handle: !--author1-->@adammorphy<!--end-author1-- Other Package Authors Github handles: @Valli180, @LukeAC, @ming0701 Repository: https://github.com/UBC-MDS/canadacovidmetricsR Version submitted: v1.0.0 Submission type: Standard Editor: TBD Reviewers: Cuthbert Chow @cuthchow, Francisco Mejia @RamiroMejia, Margot Vore @voremargot, Thomas Siu @thomassiu

Archive: TBD Version accepted: TBD Language: en

  Description 

Package: canadacovidmetricsR
Title: What the Package Does (One Line, Title Case)
Version: 0.0.0.9000
Authors@R: 
    c(person(given = "Brandon",
           family = "Lam",
           role = c("aut", "cre"),
           email = "ming0701@student.ubc.ca"),
      person(given = "Adam",
           family = "Morphy",
           role = c("aut")),
      person(given = "Valli",
           family = "Akella",
           role = c("aut")),
      person(given = "Luke",
           family = "Collins",
           role = c("aut")))
Description: canadacovidmetricsR provides key metrics regarding COVID-19 situation in Canada across provinces using the [OpenCovid API](https://opencovid.ca/api/).
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
Imports: 
    httr,
    jsonlite
Suggests: 
    testthat (>= 3.0.0)
Config/testthat/edition: 3

   

Scope

 

This package:

Code of Conduct

RamiroMejia commented 2 years ago

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

Estimated hours spent reviewing: 1.5 Hours


Review Comments

Hello Group 10 members,

Congratulations, you did a great job on your package.

I have the following comments about your package:

  1. It would be relevant to show examples of all functions in Usage and Example in the README like you did in the python version of the package for get_deaths, get_recoveries get_vaccinations. You can also include a link to the vignettes to avoid including all the examples in this section

  2. If you decided not to publish the package in CRAN, please remove the instructions install. packages("canadacovidmetricsR") in the README.

  3. You can add exception handling for incorrect values in the argument date. When I run get_cases(loc = "BC", date = "2015-01-31"), I got this error:

No encoding supplied: defaulting to UTF-8.
Error in `colnames<-`(`*tmp*`, value = `*vtmp*`) : 
  attempt to set 'colnames' on an object with less than two dimensions

This can be confusing for the user.

  1. When running the functions I get a warning message related to the encoding. It would be great if you can suppress this

  2. In the vignettes the example of usage for the function get_deaths, returns an error. If I run get_deaths(loc = "BC", date = "2020-01-31"). The error is because there are no deaths on this date so it is a missing value in the query. You can add exemption handling for those dates with missing values or change the vignette example.

  3. The Contributing Document is missing. The link in the README file is not working.

voremargot commented 2 years ago

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

Estimated hours spent reviewing: 1hr


Review Comments

I think you have a great concept for your package. Easily accessible data is very important to understand the dynamics of the pandemic. I really like how simple it is to use your functions and the simple outputs it gives you! The majority of your package is good but, as always, there is room for improvement. Here are some specific items that you may want to address.

thomassiu commented 2 years ago

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

Estimated hours spent reviewing: 1 hours


Review Comments

Hi Group 10,

Once again congratulations on completing the R package! The package is very handy to use and it is with clear instructions on how to install and navigate. Here are some comments that you may consider to improve in the future:

  1. Possibly to increase test coverage to cover necessary branches. Those marked in red in the codecov report could be considered. (See this.
  2. In the vignette, it would be great if there are more examples on how to call the functions. For example, what are the key combinations of arguments that can be used? Also, providing a description that these functions return a data frame would be a great idea - as I thought it was a print statement initially =)
  3. You may add additional checking on the input, especially on the locations. For example, if I use CANADA or 'bc' then it doesn't work.
  4. The extraction always returns year 2000 when I use argument date. For example, get_cases(date = '2021-05-05') returns record of 2020-05-05.
  5. Possibly to extend the functionality to accept multiple locations, for example, get_recoveries(loc = c("BC", "AB")).
cuthchow commented 2 years ago

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

Estimated hours spent reviewing: 1 hour


Review Comments

Hi Group 10 members, great job on this R package. The package was a joy to use, and I just have several remarks for potential future improvement:

  1. It may be prudent to write a broader range of tests, as the code coverage at the moment at 70%, and certain parts of the code may not work as intended but may not show up in the testing
  2. It would be helpful to have more detailed explanations in the vignette of the package, to walk the user through more different variations and use cases for all the functions in the package
  3. There are some warnings which appear when running the functions, even as shown in the examples, stating that 'No encoding supplied: defaulting to UTF-8.' Although it doesn't break any of the code, it may be beneficial to the package to address such issues to make usage more straightforward
  4. The examples could highlight more of the function arguments, because the ones shown on the repository/vignette only show acquiring data for a single date, but not for a date range, which may be quite a common use case for the package
  5. The error that is thrown for setting an invalid date, or for utilising a 'before' date which comes before an 'after' date, is not particularly helpful, and should ideally tell users what the correct date inputs should be.
  6. For additional functionality, it may be good to allow users to specify a date window instead (e.g 10 days, 4 weeks), with either a single starting or ending date, to avoid having to calculate both date endpoints manually.