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

quadkeyr: Tools for converting QuadKeys (Microsoft's Bing Maps Tile System) into raster images #619

Closed
12 of 29 tasks
flor14 opened this issue Dec 5, 2023 · 99 comments
Closed
12 of 29 tasks
Assignees

Comments

@flor14
Copy link

flor14 commented Dec 5, 2023

Date accepted: 2024-03-14

Submitting Author Name: Florencia D'Andrea
Submitting Author Github Handle: @flor14
Repository: https://github.com/Fernandez-Lab-WSU/quadkeyr
Version submitted:
Submission type: Standard
Editor: @emilyriederer
Reviewers: @mpaulacaldas, @vincentvanhees

Archive: TBD
Version accepted: TBD
Language: en


  • Paste the full DESCRIPTION file inside a code block below:
Package: quadkeyr
Title: Tools for converting QuadKeys used in Microsoft's Bing Maps Tile System into raster images
Version: 0.0.0.9000
Authors@R: 
    person(given = "Florencia",
           family = "D'Andrea", 
           email = "florencia.dandrea@gmail.com", 
           role = c("aut", "cre"),
           comment = c(ORCID = "0000-0002-0041-097X"))
Description: quadkeyr enables the generation of raster images based on QuadKeys, facilitating efficient integration of Bing Maps data into R workflows. In particular, quadkeyr provides support to process and analyze Facebook mobility datasets within the R environment.
License: MIT + file LICENSE
URL: https://fernandez-lab-wsu.github.io/quadkeyr/, https://github.com/Fernandez-Lab-WSU/quadkeyr
BugReports: https://github.com/Fernandez-Lab-WSU/quadkeyr/issues
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.1
Suggests: 
    knitr,
    rmarkdown,
    shinytest2,
    testthat (>= 3.1.10)
VignetteBuilder: knitr
Depends: 
    R (>= 2.10)
LazyData: true
Imports: 
    bslib (>= 0.5.1),
    dplyr (>= 1.1.2),
    DT (>= 0.27),
    ggplot2 (>= 3.4.3),
    leaflet (>= 2.2.0),
    lubridate (>= 1.9.2),
    purrr (>= 1.0.1),
    readr (>= 2.1.4),
    rnaturalearth (>= 0.3.2),
    sf (>= 1.0.14),
    shiny (>= 1.7.4),
    stars (>= 0.6.2),
    tidyr (>= 1.3.0),
    viridis (>= 0.6.4)

Scope

  • Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):

    • data retrieval
    • data extraction
    • data munging
    • data deposition
    • data validation and testing
    • workflow automation
    • version control
    • citation management and bibliometrics
    • scientific software wrappers
    • field and lab reproducibility tools
    • database software bindings
    • geospatial data
    • text analysis
  • Explain how and why the package falls under these categories (briefly, 1-2 sentences):

🗺️ The package offers tools to analyze data reported by QuadKey and convert it to raster images. QuadKeys are strings that encode information about map coordinates and the level of detail of the Bing Maps Tile System.

  • Who is the target audience and what are scientific applications of this package?

Anyone trying to analyze data reported in this format. Facebook mobility data, for example, can be reported by QuadKey. This package could help this StackOverflow user or this other one.

The closer R package dealing with this type of data is slippymath which has a more general objective. quadkeyr is only based on Microsoft Bing Maps Tile System documentation and it is focused on raster creation.
You can read a list of packages with similar functions in the README references section.

Technical checks

Confirm each of the following by checking the box.

  • I have read the rOpenSci packaging guide.
    ⚠️ Yes, and I have to mention:
    1. The package coverage is less than 75% but I think that the main reason for that is that the Shiny app included doesn't have tests yet. The backend of that app is all the functions that are tested.
    2. There are also missing 2 notes that still appear after running check. The functions polygon_to_raster and format_data don't have valid roxygen2 examples, and polygon_to_raster don't have tests. At least a warning is missing in create_raster and some functions could be potentially improved in efficiency and documentation (I would like to improve the technical terminology). Despite this, I think it is a good moment to get some feedback as I will be using the package in the next weeks and I will be available to update it.
  • I have read the author guide and I expect to maintain this package for at least 2 years or to find a replacement.

This package:

Publication options

  • Do you intend for this package to go on CRAN?
    ❓ Probably yes? After all the packages that were deleted from CRAN, I would appreciate comments about this. I was careful to use as dependencies only stars and sf, which are packages that will continue to be active.
  • Do you intend for this package to go on Bioconductor?
  • Do you wish to submit an Applications Article about your package to Methods in Ecology and Evolution? If so:
MEE Options
  • The package is novel and will be of interest to the broad readership of the journal.
  • The manuscript describing the package is no longer than 3000 words.
  • You intend to archive the code for the package in a long-term repository which meets the requirements of the journal (see MEE's Policy on Publishing Code)
  • (Scope: Do consider MEE's Aims and Scope for your manuscript. We make no guarantee that your manuscript will be within MEE scope.)
  • (Although not required, we strongly recommend having a full manuscript prepared when you submit here.)
  • (Please do not submit your package separately to Methods in Ecology and Evolution)

Code of conduct

Thank you!

@ropensci-review-bot
Copy link
Collaborator

Thanks for submitting to rOpenSci, our editors and @ropensci-review-bot will reply soon. Type @ropensci-review-bot help for help.

@ropensci-review-bot
Copy link
Collaborator

🚀

Editor check started

👋

@ropensci-review-bot
Copy link
Collaborator

Checks for quadkeyr (v0.0.0.9000)

git hash: 8f9fc6c2

  • ✔️ Package name is available
  • ✔️ has a 'codemeta.json' file.
  • ✔️ has a 'contributing' file.
  • ✔️ uses 'roxygen2'.
  • ✔️ 'DESCRIPTION' has a URL field.
  • ✔️ 'DESCRIPTION' has a BugReports field.
  • ✔️ Package has at least one HTML vignette
  • ✔️ All functions have examples.
  • ✔️ Package has continuous integration checks.
  • ✖️ Package coverage is 61.9% (should be at least 75%).
  • ✖️ R CMD check process failed with message: 'Build process failed'.
  • 👀 Function names are duplicated in other packages

Important: All failing checks above must be addressed prior to proceeding

(Checks marked with 👀 may be optionally addressed.)

Package License: MIT + file LICENSE


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
internal base 154
internal quadkeyr 59
internal utils 40
internal graphics 5
internal stats 1
imports sf 10
imports bslib 8
imports dplyr 8
imports stars 3
imports leaflet 2
imports shiny 2
imports purrr 1
imports DT NA
imports ggplot2 NA
imports lubridate NA
imports readr NA
imports rnaturalearth NA
imports tidyr NA
imports viridis NA
suggests knitr NA
suggests rmarkdown NA
suggests shinytest2 NA
suggests testthat NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

base

list (22), return (20), c (16), for (11), data.frame (10), nrow (5), seq_len (5), min (4), as.character (3), max (3), nchar (3), pi (3), seq (3), sign (3), abs (2), as.integer (2), as.numeric (2), by (2), file (2), floor (2), options (2), rbind (2), sum (2), unique (2), version (2), as.Date (1), atan (1), character (1), class (1), colnames (1), exp (1), is.na (1), length (1), list.files (1), log (1), ncol (1), paste (1), paste0 (1), rep (1), rev (1), rownames (1), seq_along (1), sin (1), strsplit (1), subset (1), t (1)

quadkeyr

mapsize (9), clip (7), pixelXY_to_latlong (4), quadkey_to_tileXY (4), create_qk_grid (3), missing_combinations (3), pixelXY_to_tileXY (3), tileXY_to_pixelXY (3), complete_grid_for_polygons (2), create_raster (2), extract_qk_coord (2), latlong_to_pixelXY (2), quadkey_to_latlong (2), apply_weekly_lag (1), extract_tile_coord (1), format_data (1), grid_to_polygon (1), ground_res (1), latlong_to_quadkey (1), mapscale (1), polygon_to_raster (1), qkmap_app (1), read_all_files (1), regular_qk_grid (1), server (1), tileXY_to_quadkey (1)

utils

data (40)

sf

st_as_sf (6), st_bbox (2), st_sf (2)

bslib

bs_theme (2), font_google (2), sidebar (2), layout_sidebar (1), page_navbar (1)

dplyr

mutate (5), anti_join (2), lag (1)

graphics

grid (4), title (1)

stars

st_as_stars (1), st_rasterize (1), write_stars (1)

leaflet

addMarkers (1), setView (1)

shiny

eventReactive (2)

purrr

map_dfr (1)

stats

var (1)

NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 13 files) and
  • 1 authors
  • 3 vignettes
  • 2 internal data files
  • 14 imported packages
  • 24 exported functions (median 13 lines of code)
  • 27 non-exported functions in R (median 29 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages
The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 13 68.2
files_vignettes 3 92.4
files_tests 13 93.3
loc_R 556 50.8
loc_vignettes 349 68.4
loc_tests 419 71.4
num_vignettes 3 94.2
data_size_total 2037768 97.7 TRUE
data_size_median 1018884 98.5 TRUE
n_fns_r 51 57.3
n_fns_r_exported 24 72.5
n_fns_r_not_exported 27 49.7
n_fns_per_file_r 2 39.8
num_params_per_fn 2 11.9
loc_per_fn_r 19 57.3
loc_per_fn_r_exp 13 30.5
loc_per_fn_r_not_exp 29 77.1
rel_whitespace_R 48 77.5
rel_whitespace_vignettes 45 78.5
rel_whitespace_tests 28 75.7
doclines_per_fn_exp 21 15.7
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 52 67.1

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

3a. Continuous Integration Badges

test-coverage.yaml
check-standard.yaml

GitHub Workflow Results

id name conclusion sha run_number date
7105875366 pages build and deployment success 22b70a 11 2023-12-05
7105846578 pkgdown success 65762e 10 2023-12-05
7105846580 R-CMD-check success 65762e 10 2023-12-05
7105846581 test-coverage success 65762e 10 2023-12-05

3b. goodpractice results

R CMD check with rcmdcheck

R CMD check generated the following error:

  1. Error in proc$get_built_file() : Build process failed

Test coverage with covr

Package coverage: 61.94

The following files are not completely covered by tests:

file coverage
R/polygon_to_raster.R 0%
R/qkmap_visualizer.R 0%
R/read_and_format_files.R 62.16%

Cyclocomplexity with cyclocomp

Error : Build failed, unknown error, standard output:

  • checking for file ‘quadkeyr/DESCRIPTION’ ... OK
  • preparing ‘quadkeyr’:
  • checking DESCRIPTION meta-information ... OK
  • installing the package to build vignettes
  • creating vignettes ... ERROR
    --- re-building ‘create_rasters_from_grid.Rmd’ using rmarkdown
    --- finished re-building ‘create_rasters_from_grid.Rmd’

--- re-building ‘get_grid_from_quadkeys.Rmd’ using rmarkdown
File figure/unnamed-chunk-2-1.png not found in resource path
Error: processing vignette 'get_grid_from_quadkeys.Rmd' failed with diagnostics:
pandoc document conversion failed with error 99
--- failed re-building ‘get_grid_from_quadkeys.Rmd’

--- re-building ‘quadkey_conversion.Rmd’ using rmarkdown
--- finished re-building ‘quadkey_conversion.Rmd’

SUMMARY: processing the following file failed:
‘get_grid_from_quadkeys.Rmd’

Error: Vignette re-building failed.
Execution halted

Static code analyses with lintr

lintr found the following 57 potential issues:

message number of times
Avoid library() and require() calls in packages 8
Lines should not be more than 80 characters. 28
Use <-, not =, for assignment. 21


4. Other Checks

Details of other checks (click to open)

✖️ The following 3 function names are duplicated in other packages:

    • clip from CUFF, ramify
    • create_raster from SpatialKDE
    • format_data from GCalcium, popbayes


Package Versions

package version
pkgstats 0.1.3.9
pkgcheck 0.1.2.11


Editor-in-Chief Instructions:

Processing may not proceed until the items marked with ✖️ have been resolved.

@jhollist
Copy link
Member

jhollist commented Dec 8, 2023

@flor14 Thank you for the submission and apologies for the few days that went by prior to my response. Had a high priority thing at work that I had to focus on!

I will take a closer look at your submission early next week. One thing we will need to get figured out is the R CMD Check failures that our build system is seeing. I noticed that the builds on your repo seem to be passing just fine. Stay tuned and thanks again for the submission.

@flor14
Copy link
Author

flor14 commented Dec 8, 2023

Thank you @jhollist, don't worry. I have increased the code coverage to 84% adding tests for the Shiny app, so that is solved. About the checks, I am unsure what could be the issue, as all the tests are passing for me as you can see in the repo, but I will try to figure it out.

@flor14
Copy link
Author

flor14 commented Dec 11, 2023

@jhollist the RMD checks are failing because there was missing this image, which now is included in the repo: https://github.com/Fernandez-Lab-WSU/quadkeyr/blob/main/figure/unnamed-chunk-2-1.png
This is the error that the bot reported:

    creating vignettes ... ERROR
    --- re-building ‘create_rasters_from_grid.Rmd’ using rmarkdown
    --- finished re-building ‘create_rasters_from_grid.Rmd’

--- re-building ‘get_grid_from_quadkeys.Rmd’ using rmarkdown
File figure/unnamed-chunk-2-1.png not found in resource path

I hope that if you run the RMD Checks again, they should be ✅ without issues.
Also, I will continue using the package these days and probably improve things, let me know if you want me to do a first release for the review.

@jhollist
Copy link
Member

@ropensci-review-bot check package

@ropensci-review-bot
Copy link
Collaborator

Thanks, about to send the query.

@ropensci-review-bot
Copy link
Collaborator

🚀

Editor check started

👋

@ropensci-review-bot
Copy link
Collaborator

Checks for quadkeyr (v0.0.0.9000)

git hash: 0425b02e

  • ✔️ Package name is available
  • ✔️ has a 'codemeta.json' file.
  • ✔️ has a 'contributing' file.
  • ✖️ The following function has no documented return value: [qkmap_app]
  • ✔️ uses 'roxygen2'.
  • ✔️ 'DESCRIPTION' has a URL field.
  • ✔️ 'DESCRIPTION' has a BugReports field.
  • ✔️ Package has at least one HTML vignette
  • ✖️ These functions do not have examples: [qkmap_app].
  • ✔️ Package has continuous integration checks.
  • ✔️ Package coverage is 83.8%.
  • ✔️ R CMD check found no errors.
  • ✔️ R CMD check found no warnings.
  • 👀 Function names are duplicated in other packages

Important: All failing checks above must be addressed prior to proceeding

(Checks marked with 👀 may be optionally addressed.)

Package License: MIT + file LICENSE


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
imports bslib NA
imports dplyr NA
imports DT NA
imports ggplot2 NA
imports leaflet NA
imports lubridate NA
imports purrr NA
imports readr NA
imports rnaturalearth NA
imports sf NA
imports shiny NA
imports stars NA
imports tidyr NA
imports viridis NA
suggests knitr NA
suggests rmarkdown NA
suggests shinytest2 NA
suggests testthat NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

NOTE: No imported packages appear to have associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 13 files) and
  • 1 authors
  • 3 vignettes
  • 2 internal data files
  • 14 imported packages
  • 25 exported functions (median 12 lines of code)
  • no non-exported function in R (median lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages
The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 13 68.2
files_vignettes 3 92.4
files_tests 14 93.8
loc_R 439 43.4
loc_vignettes 450 75.5
loc_tests 424 71.6
num_vignettes 3 94.2
data_size_total 2037768 97.7 TRUE
data_size_median 1018884 98.5 TRUE
n_fns_r 25 34.7
n_fns_r_exported 25 73.6
n_fns_r_not_exported 0 0.0 TRUE
n_fns_per_file_r 2 38.7
num_params_per_fn 2 11.9
loc_per_fn_r 12 36.1
loc_per_fn_r_exp 12 27.7
rel_whitespace_R 52 74.2
rel_whitespace_vignettes 37 80.0
rel_whitespace_tests 29 76.2
doclines_per_fn_exp 21 15.7
fn_call_network_size 0 0.0 TRUE

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

3a. Continuous Integration Badges

test-coverage.yaml
check-standard.yaml

GitHub Workflow Results

id name conclusion sha run_number date
7161851741 pages build and deployment success 7fb7aa 20 2023-12-11
7161834160 pkgdown success 0425b0 19 2023-12-11
7161834165 R-CMD-check success 0425b0 19 2023-12-11
7161834161 test-coverage success 0425b0 19 2023-12-11

3b. goodpractice results

R CMD check with rcmdcheck

R CMD check generated the following notes:

  1. checking installed package size ... NOTE
    installed size is 6.0Mb
    sub-directories of 1Mb or more:
    app 1.5Mb
    data 2.3Mb
    doc 1.8Mb
  2. checking dependencies in R code ... NOTE
    Namespaces in Imports field not imported from:
    ‘bslib’ ‘DT’ ‘ggplot2’ ‘leaflet’ ‘rnaturalearth’ ‘tidyr’ ‘viridis’
    All declared Imports should be used.
  3. checking R code for possible problems ... NOTE
    apply_weekly_lag: no visible binding for global variable ‘.data’
    create_qk_grid: no visible binding for global variable ‘.data’
    grid_to_polygon: no visible binding for global variable ‘.data’
    missing_combinations: no visible binding for global variable ‘.data’
    polygon_to_raster: no visible binding for global variable ‘.data’
    Undefined global functions or variables:
    .data

R CMD check generated the following check_fails:

  1. rcmdcheck_imports_not_imported_from
  2. rcmdcheck_undefined_globals
  3. rcmdcheck_reasonable_installed_size

Test coverage with covr

Package coverage: 83.77

Cyclocomplexity with cyclocomp

The following function have cyclocomplexity >= 15:

function cyclocomplexity
create_qk_grid 18

Static code analyses with lintr

lintr found the following 73 potential issues:

message number of times
Avoid library() and require() calls in packages 15
Lines should not be more than 80 characters. 29
Use <-, not =, for assignment. 29


4. Other Checks

Details of other checks (click to open)

✖️ The following 3 function names are duplicated in other packages:

    • clip from CUFF, ramify
    • create_raster from SpatialKDE
    • format_data from GCalcium, popbayes


Package Versions

package version
pkgstats 0.1.3.9
pkgcheck 0.1.2.11


Editor-in-Chief Instructions:

Processing may not proceed until the items marked with ✖️ have been resolved.

@jhollist
Copy link
Member

@flor14 Thanks for tracking down that issue! That was really helpful.

Couple of thoughts for you.

1.) I re-ran the checks and the only thing that comes up now is related to the new function you added, qkmap_app. I am guessing you are still in progress on that.
2.) If you are going to be working on the package in the next few days I would prefer to see you reach a somewhat stable release that we can use as the basis for the review.
3.) If you want to run the checks on your own, you can use the action at https://github.com/ropensci-review-tools/pkgcheck-action.

In the meantime I will look closer at the package and vignettes.

@flor14
Copy link
Author

flor14 commented Dec 11, 2023

Thank you @jhollist

  1. qkmap_app is a simple function that calls the app from inst/ and it has examples, so I will try to see what that error means in the following days.
  2. I won't be working on the package, but I will be heavily using it. And I would probably like to make changes. Let's do this: after I fix the problem with qkmap_app I will not push more changes.
  3. Will do it and let you know when everything is working again.

Thank you

@jhollist
Copy link
Member

@flor14 Sounds good. Just ping me again here once everything is working again. I have taken a closer look and I think quadkeyr is ready to be passed on to a handling editor. I will do that as soon as you get the changes pushed.

Cheers,
Jeff

@flor14
Copy link
Author

flor14 commented Dec 12, 2023

@jhollist pkgcheck is passing now, I have added the GitHub action to the repository.

@jhollist
Copy link
Member

@ropensci-review-bot check package

@ropensci-review-bot
Copy link
Collaborator

Thanks, about to send the query.

@ropensci-review-bot
Copy link
Collaborator

🚀

Editor check started

👋

@ropensci-review-bot
Copy link
Collaborator

Checks for quadkeyr (v0.0.0.9000)

git hash: 10376c70

  • ✔️ Package name is available
  • ✔️ has a 'codemeta.json' file.
  • ✔️ has a 'contributing' file.
  • ✔️ uses 'roxygen2'.
  • ✔️ 'DESCRIPTION' has a URL field.
  • ✔️ 'DESCRIPTION' has a BugReports field.
  • ✔️ Package has at least one HTML vignette
  • ✔️ All functions have examples.
  • ✔️ Package has continuous integration checks.
  • ✔️ Package coverage is 83.9%.
  • ✔️ R CMD check found no errors.
  • ✔️ R CMD check found no warnings.
  • 👀 Function names are duplicated in other packages

(Checks marked with 👀 may be optionally addressed.)

Package License: MIT + file LICENSE


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
internal base 133
internal quadkeyr 48
internal utils 35
internal graphics 3
internal stats 1
imports sf 10
imports dplyr 9
imports stars 3
imports purrr 1
imports bslib NA
imports DT NA
imports ggplot2 NA
imports leaflet NA
imports lubridate NA
imports readr NA
imports rnaturalearth NA
imports shiny NA
imports tidyr NA
imports viridis NA
suggests knitr NA
suggests rmarkdown NA
suggests shinytest2 NA
suggests testthat NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

base

list (18), return (18), c (16), for (11), data.frame (9), nrow (5), seq_len (5), min (3), nchar (3), pi (3), seq (3), sign (3), abs (2), as.integer (2), by (2), file (2), floor (2), max (2), rbind (2), sum (2), unique (2), as.character (1), as.Date (1), as.numeric (1), atan (1), character (1), colnames (1), exp (1), is.na (1), length (1), list.files (1), log (1), paste0 (1), rev (1), seq_along (1), sin (1), strsplit (1), subset (1), system.file (1)

quadkeyr

clip (7), mapsize (6), missing_combinations (3), pixelXY_to_latlong (3), pixelXY_to_tileXY (3), quadkey_to_tileXY (3), complete_grid_for_polygons (2), create_qk_grid (2), create_raster (2), latlong_to_pixelXY (2), quadkey_to_latlong (2), tileXY_to_pixelXY (2), apply_weekly_lag (1), extract_qk_coord (1), extract_tile_coord (1), format_data (1), grid_to_polygon (1), ground_res (1), latlong_to_quadkey (1), mapscale (1), polygon_to_raster (1), qkmap_app (1), tileXY_to_quadkey (1)

utils

data (35)

sf

st_as_sf (6), st_bbox (2), st_sf (2)

dplyr

mutate (5), anti_join (2), all_of (1), lag (1)

graphics

grid (3)

stars

st_as_stars (1), st_rasterize (1), write_stars (1)

purrr

map_dfr (1)

stats

var (1)

NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 13 files) and
  • 1 authors
  • 3 vignettes
  • 2 internal data files
  • 14 imported packages
  • 25 exported functions (median 12 lines of code)
  • 25 non-exported functions in R (median 26 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages
The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 13 68.2
files_vignettes 3 92.4
files_tests 14 93.8
loc_R 448 44.1
loc_vignettes 450 75.5
loc_tests 424 71.6
num_vignettes 3 94.2
data_size_total 2037768 97.7 TRUE
data_size_median 1018884 98.5 TRUE
n_fns_r 50 56.6
n_fns_r_exported 25 73.6
n_fns_r_not_exported 25 47.3
n_fns_per_file_r 2 38.7
num_params_per_fn 2 11.9
loc_per_fn_r 18 54.1
loc_per_fn_r_exp 12 27.7
loc_per_fn_r_not_exp 26 73.5
rel_whitespace_R 51 74.2
rel_whitespace_vignettes 37 80.0
rel_whitespace_tests 29 76.2
doclines_per_fn_exp 21 15.7
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 46 64.6

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

3a. Continuous Integration Badges

pkgcheck.yaml
check-standard.yaml

GitHub Workflow Results

id name conclusion sha run_number date
7183862151 pages build and deployment success a8f312 25 2023-12-12
7183832573 pkgcheck success 10376c 4 2023-12-12
7183832572 pkgdown success 10376c 24 2023-12-12
7183832584 R-CMD-check success 10376c 24 2023-12-12
7183832577 test-coverage success 10376c 24 2023-12-12

3b. goodpractice results

R CMD check with rcmdcheck

R CMD check generated the following notes:

  1. checking installed package size ... NOTE
    installed size is 6.0Mb
    sub-directories of 1Mb or more:
    app 1.5Mb
    data 2.3Mb
    doc 1.8Mb
  2. checking dependencies in R code ... NOTE
    Namespaces in Imports field not imported from:
    ‘bslib’ ‘DT’ ‘ggplot2’ ‘leaflet’ ‘rnaturalearth’ ‘tidyr’ ‘viridis’
    All declared Imports should be used.
  3. checking R code for possible problems ... NOTE
    apply_weekly_lag: no visible binding for global variable ‘.data’
    create_qk_grid: no visible binding for global variable ‘.data’
    grid_to_polygon: no visible binding for global variable ‘.data’
    missing_combinations: no visible binding for global variable ‘.data’
    polygon_to_raster: no visible binding for global variable ‘.data’
    Undefined global functions or variables:
    .data

R CMD check generated the following check_fails:

  1. rcmdcheck_imports_not_imported_from
  2. rcmdcheck_undefined_globals
  3. rcmdcheck_reasonable_installed_size

Test coverage with covr

Package coverage: 83.9

Cyclocomplexity with cyclocomp

The following function have cyclocomplexity >= 15:

function cyclocomplexity
create_qk_grid 18

Static code analyses with lintr

lintr found the following 48 potential issues:

message number of times
Avoid library() and require() calls in packages 15
Lines should not be more than 80 characters. 12
Use <-, not =, for assignment. 21


4. Other Checks

Details of other checks (click to open)

✖️ The following 3 function names are duplicated in other packages:

    • clip from CUFF, ramify
    • create_raster from SpatialKDE
    • format_data from GCalcium, popbayes


Package Versions

package version
pkgstats 0.1.3.9
pkgcheck 0.1.2.11


Editor-in-Chief Instructions:

This package is in top shape and may be passed on to a handling editor

@jhollist
Copy link
Member

@flor14, looks like we are all set. Are you ready to have me pass this on the a handling editor or do you anticipate a few more changes?

@flor14
Copy link
Author

flor14 commented Dec 13, 2023

Yes, I think it is ready. The issue was that my changes were passing the R CMD checks, so I didn't anticipate problems before the review started. Now I learned that pkgcheck works differently and seems to be more strict.
If there is any new change (even if it is small) I will retain it to make all of them together after the review, to avoid any potential issue.
Thank you @jhollist

@jhollist
Copy link
Member

jhollist commented Dec 13, 2023 via email

@jhollist
Copy link
Member

@flor14 I have found a handling editor (thanks @emilyriederer!). There may be a delay of a week or two before she is able to get started in earnest on this because of a hectic end of year schedule.

@jhollist
Copy link
Member

@ropensci-review-bot assign @emilyriederer as editor

@ropensci-review-bot
Copy link
Collaborator

Assigned! @emilyriederer is now the editor

@flor14
Copy link
Author

flor14 commented Dec 18, 2023

Thank you @jhollist and happy holidays

@jhollist
Copy link
Member

Happy holidays to you as well!

@emilyriederer
Copy link

Hi @flor14 ! It's great to meet you. Thanks for your submission.

As @jhollist mentioned, I may not be able to engage more fully until next week, but I thought I'd send over a few preliminary observations.

I think this is a compelling project and is close to being ready for reviewers. On a cursory review of the automated outputs, I just had a few small requests to touch up before we hand this off:

  • Could you add a sentence to the documentation describing what QuadKeys are? This might help many people with relevant problems realize your package is a solution even if they have never used that tech before (and similarly, it will help our reviewers understand)
  • lintr noted a number of library() calls in your package code. Could you look to remove these, please? All packages in your Imports can be assumed to be loaded
  • Ideally, I'd love to see the R CMD checks resolved before passing this along. Do you have thoughts on:
    • For (2), could you remove dependencies from the DESCRIPTION if they are not used in the core package code? (versus used in things like vignettes)
    • For (3), could you import .data from rlang as described here? That should clear things up

Thank you!

@flor14
Copy link
Author

flor14 commented Dec 20, 2023

Hello, @emilyriederer, nice to meet you as well.

Including more high-level documentation is a good idea, I have been paying attention mostly to the function documentation so far.
Also, I realized that 2 notes were pending in the RMD check, but I had some issues when removing the vignette's dependencies so I kept them. The same with the library() calls that are probably referring to the vignettes. I will try to go more in-depth to fully solve that. I will write a message in this thread to let you know when is done. Thank you!

@emilyriederer
Copy link

Thank you @flor14 ! Your dedication to this ambitious project is very impressive and its great to see all these updates. I know we are actively reviewing packages now in multiple languages, so I will check in with the editorial team regarding best practices for maintaing versions of both.

@mpaulacaldas and @vincentvanhees - can you please take a pass through all these wonderful updates and confirm your approval with this template?

@emilyriederer
Copy link

Hi there @mpaulacaldas and @vincentvanhees - just a reminder, at your convenience, could you please review @flor14 's updates and confirm your approval with this template? Per our reviewer guide, the goal of this stage is to ensure you feel your comments have been sufficiently addressed

@vincentvanhees
Copy link

Sorry, I have been crazily occupied, it is on my to do list for the weekend.

@flor14
Copy link
Author

flor14 commented Mar 2, 2024

For the past few days, I have been using quadkeyr and I have added improvements in apply_weekly_lag(), read_fb_mobility_files(), and format_fb_data() along with their tests.

  • The loop in apply_weekly_lag() was removed. Reducing the amount of loops was one of Vincent's comments.
  • read_fb_mobility_files() and format_fb_data() now have an additional argument, making them more flexible for working with real data.
    All these changes are available in the read-and-7-day-lag branch: https://github.com/Fernandez-Lab-WSU/quadkeyr/commits/read-and-7-day-lag/

I will not merge these changes because I believe the review has already been addressed, and I don't want to create confusion. However, if after reading the review you still have concerns about these specific functions, you can check that branch.

Thank you.

@vincentvanhees
Copy link

Reviewer Response

Great job @flor14! My comments have been addressed satisfactory.

A few remarks for your consideration:

  • Going back to our correspondence about the html_document versus html_vignette: I learnt last week that what I suggested (html_document) is less lightweight than (html_vignette) according to bookdown documentation. So, if this is a concern when the package grows in the future then you may want to reverse to html_vignette. For now I guess it is not a problem.

  • The DESCRIPTION file lists you as author and creator but does not list copyright holders (cph). If this is a hobby project then it is also you, but if someone paid for your time then usually they are the copyright holder. If applicable, listing them gives credit for their support and is helpful to know for potential contributors.

  • I am not familiar with rOpenSci's release process, but if the acceptance of this package does not generate a tagged release I would recommend creating one in the near future, such that you have a clear reference point for this stage of the development. Don't forget to also describe this as your first release in NEWS.md.

Final approval (post-review)

  • The author has responded to my review and made changes to my satisfaction. I recommend approving this package.

Estimated hours spent reviewing: 1

@mpaulacaldas
Copy link

Reviewer Response

Thank you @flor14 for all of the detailed and careful changes you made in this last round. With these, I believe you have addressed my key comments in a satisfactory way, and I am happy for to recommend approval.

Like Vincent, I leave here a couple of remarks for future consideration:

  • I think you may have some confusion on the use of @export and the @keywords internal tag. In general, you do not use @keywords internal for functions that you export with @export, but I see for example that you are doing so for get_tile_coord() and complete_grid_for_polygons(). If you don't intend to export these functions (in other words, you want them to be internal), then you should remove the @export tag. If on the contrary, you want to export the functions, then you don't need the @keywords internal tag, since Roxygen builds by default documentation for all exported functions. Right now, you are in strange situation where those two functions are exported, but their documentation is hidden in the pkgdown website.

  • A minor bug, but the images in your README are not showing up in the pkgdown website.

Final approval (post-review)

  • The author has responded to my review and made changes to my satisfaction. I recommend approving this package.

Estimated hours spent reviewing: 1

@flor14
Copy link
Author

flor14 commented Mar 3, 2024

Thank you @mpaulacaldas and @vincentvanhees

I will change what you are saying @mpaulacaldas tomorrow morning. The @export tag was removed in the other internal functions, probably I missed removing them in the last review. Thank you for pointing this out.

@emilyriederer
Copy link

Thank you, @mpaulacaldas and @vincentvanhees for your continued, thoughtful engagement! We really appreciate your support

@flor14 - please give me a tag after you've made the last tweaks based on @mpaulacaldas 's feedback, and I think we will be ready to approve quadkeyr!

@flor14
Copy link
Author

flor14 commented Mar 6, 2024

I am on hold with this because the researcher I am working with is asking the university about the copyright. Also, I will ask a question in ROpenSci Slack regarding how to specify the authorship, in case you have an opinion about it.

@vincentvanhees
Copy link

vincentvanhees commented Mar 7, 2024

My understanding is that if you work for an institute then usually they are the copyright holder and not the external funder that funded the research.

Also, I will ask a question in ROpenSci Slack regarding how to specify the authorship, in case you have an opinion about it.

You can just do:

Authors@R: 
    c(person(given = "Florencia",
           family = "D'Andrea", 
           email = "florencia.dandrea@gmail.com", 
           role = c("aut", "cre"),
           comment = c(ORCID = "0000-0002-0041-097X")),
    person("Your Institute Name", role="cph"))

EDIT: I now saw the question you posted which is a of a different nature. Agree with Noam that minor contributors do not need to be code contributions, and auth should be reserved for those who made significant contributions.

@flor14
Copy link
Author

flor14 commented Mar 7, 2024

Thank you @vincentvanhees, you are always ready to answer.
The researcher told me that she wanted to ask someone from the university about this, so I will wait anyway. I don't work for any institution, this is just a contract.

@flor14
Copy link
Author

flor14 commented Mar 13, 2024

The review is finished, I have updated the authors, theNEWS.md and created a release.

Remaining questions:

  • What about the submission to JOSS? Should I mention this issue with the submission?
  • The idea is to leave a version in Spanish available as well, any comment on how to do that is welcomed.

Thank you

@vincentvanhees
Copy link

vincentvanhees commented Mar 14, 2024

thanks, there is a typo in my name, it is "van Hees" not "Van Hess".

@flor14
Copy link
Author

flor14 commented Mar 14, 2024 via email

@flor14
Copy link
Author

flor14 commented Mar 14, 2024

Done! I modified the release so there is not a version with your name incorrect.

@emilyriederer
Copy link

Congratulations @flor14 ! Thank you so much for your dedication to this package

@emilyriederer
Copy link

@ropensci-review-bot approve quadkeyr

@ropensci-review-bot
Copy link
Collaborator

Approved! Thanks @flor14 for submitting and @mpaulacaldas, @vincentvanhees for your reviews! 😁

To-dos:

  • Transfer the repo to rOpenSci's "ropensci" GitHub organization under "Settings" in your repo. I have invited you to a team that should allow you to do so. You will need to enable two-factor authentication for your GitHub account.
    This invitation will expire after one week. If it happens write a comment @ropensci-review-bot invite me to ropensci/<package-name> which will re-send an invitation.
  • After transfer write a comment @ropensci-review-bot finalize transfer of <package-name> where <package-name> is the repo/package name. This will give you admin access back.
  • Fix all links to the GitHub repo to point to the repo under the ropensci organization.
  • Delete your current code of conduct file if you had one since rOpenSci's default one will apply, see https://devguide.ropensci.org/collaboration.html#coc-file
  • If you already had a pkgdown website and are ok relying only on rOpenSci central docs building and branding,
    • deactivate the automatic deployment you might have set up
    • remove styling tweaks from your pkgdown config but keep that config file
    • replace the whole current pkgdown website with a redirecting page
    • replace your package docs URL with https://docs.ropensci.org/package_name
    • In addition, in your DESCRIPTION file, include the docs link in the URL field alongside the link to the GitHub repository, e.g.: URL: https://docs.ropensci.org/foobar, https://github.com/ropensci/foobar
  • Skim the docs of the pkgdown automatic deployment, in particular if your website needs MathJax.
  • Fix any links in badges for CI and coverage to point to the new repository URL.
  • Increment the package version to reflect the changes you made during review. In NEWS.md, add a heading for the new version and one bullet for each user-facing change, and each developer-facing change that you think is relevant.
  • We're starting to roll out software metadata files to all rOpenSci packages via the Codemeta initiative, see https://docs.ropensci.org/codemetar/ for how to include it in your package, after installing the package - should be easy as running codemetar::write_codemeta() in the root of your package.
  • You can add this installation method to your package README install.packages("<package-name>", repos = "https://ropensci.r-universe.dev") thanks to R-universe.

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.

@emilyriederer
Copy link

A few additional notes @flor14 :

  • I'd strongly encourage you to market your package with a post as described in one of the last paragraphs of the automated post above. I think this package will have a lot of interest and I'd love to get the word out there
  • For JOSS, you can use the rOpenSci repository link once you've transferred it and potentially link to this review in your submission. As you can see in this recent submission, their system is set up to notice
  • On multilanguage docs, this is still an open issue. This package is currently under review and strives to have multilanguage docs, so you can check out their set up. There's also the babelquarto package for multilingual websites but it doesn't directly work with pkgdown. Meanwhile this project is in development to do something similar for help pages, but to my understanding it's not a stable release yet

@yabellini
Copy link
Member

I will jump here to add that we are discussing multilingual documentation and publishing and sharing projects, ideas, and progress in the #multilingual channel in our Slack. 😃

@flor14
Copy link
Author

flor14 commented Mar 15, 2024

@ropensci-review-bot finalize transfer of quadkeyr

@ropensci-review-bot
Copy link
Collaborator

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

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

No branches or pull requests

7 participants