software-review icon indicating copy to clipboard operation
software-review copied to clipboard

rhud: A R interface for the US Department of Housing and Urban Development APIs

Open etam4260 opened this issue 2 years ago • 63 comments

Submitting Author Name: Name Submitting Author Github Handle: @etam4260 Other Package Authors Github handles: (comma separated, delete if none) Repository: https://github.com/etam4260/rhud Version submitted: Submission type: Standard Editor: @jhollist Reviewers: @rtaph, @khueyama

Due date for @rtaph: 2022-06-07

Due date for @khueyama: 2022-06-09 Archive: TBD Version accepted: TBD Language: en

  • Paste the full DESCRIPTION file inside a code block below:
Package: hudr
Title: A R interface for accessing HUD (US Department of Housing and Urban Development) APIs
Version: 0.1.0.9000
Authors@R: 
    c(person("Emmet", "Tam", ,"[email protected]", role = c("aut", "cre", "cph")),
    person("Allison", "Reilly", ,"[email protected]", role = c("ctb")),
    person("Hamed", "Ghaedi", ,"[email protected]", role = c("ctb")))
Description: 
	An R interface for accessing HUD (US Department of Housing and Urban Development) API.
	The HUD has four main datasets, USPS Crosswalk, Fair Markets Rent,
	Income Limits, and the Comprehensive Housing Affordability Strategy.
License: GPL (>= 2)
Language: en-US
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2.9000
URL: https://github.com/etam4260/hudr, https://etam4260.github.io/hudr/index.html
BugReports: https://github.com/etam4260/hudr/issues
Suggests: 
    covr,
    httptest,
    knitr,
    rmarkdown,
    testthat (>= 3.0.0)
Imports: 
    httr,
    devtools,
    zoo,
    rio
Config/testthat/edition: 3
VignetteBuilder: knitr
ByteCompile: true

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.):

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

It is a data retrieval package because it retrieves data from an API. It 'will' be a data munging package after implementation of additional features such as cross walking an entire dataset. Furthermore, the APIs which this package retrieves data from are associated with geographic identifiers.

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

I am hoping to reach professors, researchers, and students with this package. This gives access to the crosswalk files which is a geospatial technique described very well in these journal articles:

Din, Alexander and Wilson, Ron, 2020. “Crosswalking ZIP Codes to Census Geographies: Geoprocessing the U.S. Department of Housing & Urban Development’s ZIP Code Crosswalk Files,” Cityscape: A Journal of Policy Development and Research, Volume 22, Number 1, https://www.huduser.gov/portal/periodicals/cityscpe/vol22num1/ch12.pdf

Wilson, Ron and Din, Alexander, 2018. “Understanding and Enhancing the U.S. Department of Housing and Urban Development’s ZIP Code Crosswalk Files,” Cityscape: A Journal of Policy Development and Research, Volume 20 Number 2, 277 – 294.

Additionally, it provides access to Income Limits and Fair Markets Rent as well as Comprehensive Housing and Affordability datasets provided by HUD which is of interest to housing and social science researchers.

Implementation of a crosswalk function is planned in future releases, which will help crosswalk a US dataset from one geographic identifier into another using the method described in the papers above.

Recently, a hudr package got published on CRAN, but it looks like some of derives from the work I currently have. I am not sure how this will affect my prospects of submitting this to CRAN. Furthermore, their package provides only access to the fair markets rent and income limits API provide by HUD. Mine gives access to all the APIs that are currently supported by HUD USER (https://www.huduser.gov/portal/home.html) as well as providing more flexibility and intuitiveness.

As for documentation and testing, I believe my package could be improved. I don't test very many edge cases and have not created vignettes for every function.

For the most part, I think yes. The package requires an API key which I have users store using Sys.setenv(). I have not looked into the more sophisticated methods like the keyring package and do not instruct the user on how to set the key to be persistent.

  • If you made a pre-submission inquiry, please paste the link to the corresponding issue, forum post, or other discussion, or @tag the editor you contacted.

https://github.com/ropensci/software-review/issues/500 @jooolia

  • Explain reasons for any pkgcheck items which your package is unable to pass.

I seem to get some errors when running pkgcheck. I manually made sure I had all the necessary components. For the pkgcheck requirement that says all functions need examples, I am assuming that only includes exported ones?

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

  • [X] Do you intend for this package to go on CRAN?

  • [ ] 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

  • [X] I agree to abide by rOpenSci's Code of Conduct during the review process and in maintaining my package should it be accepted.

etam4260 avatar Apr 01 '22 06:04 etam4260

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

ropensci-review-bot avatar Apr 01 '22 06:04 ropensci-review-bot

:rocket:

Editor check started

:wave:

ropensci-review-bot avatar Apr 01 '22 06:04 ropensci-review-bot

Checks for hudr (v0.1.0.9000)

git hash: 660ad0e2

  • :heavy_multiplication_x: Package name is not available (on CRAN).
  • :heavy_check_mark: has a 'codemeta.json' file.
  • :heavy_multiplication_x: does not have a 'contributing' file.
  • :heavy_check_mark: uses 'roxygen2'.
  • :heavy_check_mark: 'DESCRIPTION' has a URL field.
  • :heavy_check_mark: 'DESCRIPTION' has a BugReports field.
  • :heavy_check_mark: Package has at least one HTML vignette
  • :heavy_check_mark: All functions have examples.
  • :heavy_check_mark: Package has continuous integration checks.
  • :heavy_multiplication_x: Package coverage failed
  • :heavy_multiplication_x: R CMD check process failed with message: 'Build process failed'.

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

Package License: GPL (>= 2)


1. 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 11 files) and
  • 1 authors
  • 7 vignettes
  • no internal data file
  • 4 imported packages
  • 30 exported functions (median 22 lines of code)
  • 63 non-exported functions in R (median 20 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 11 62.6
files_vignettes 7 98.5
files_tests 10 90.7
loc_R 786 61.3
loc_vignettes 878 89.0
loc_tests 357 67.9
num_vignettes 7 99.2 TRUE
n_fns_r 93 74.6
n_fns_r_exported 30 78.3
n_fns_r_not_exported 63 73.5
n_fns_per_file_r 4 63.5
num_params_per_fn 4 54.6
loc_per_fn_r 22 64.1
loc_per_fn_r_exp 22 52.1
loc_per_fn_r_not_exp 20 63.0
rel_whitespace_R 37 79.7
rel_whitespace_vignettes 51 96.3 TRUE
rel_whitespace_tests 32 75.2
doclines_per_fn_exp 40 50.1
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 88 77.1

1a. Network visualisation

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


2. goodpractice and other checks

Details of goodpractice and other checks (click to open)

3a. Continuous Integration Badges

R-CMD-check

GitHub Workflow Results

name conclusion sha date
pages build and deployment success 660ad0 2022-04-01
R-CMD-check success 660ad0 2022-04-01
test-coverage success 06b739 2022-03-28

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

R CMD check generated the following check_fail:

  1. no_import_package_as_a_whole

Test coverage with covr

ERROR: Test Coverage Failed

Cyclocomplexity with cyclocomp

Error : Build failed, unknown error, standard output:

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

--- re-building ‘Community-Development-Block-Grant.Rmd’ using rmarkdown --- finished re-building ‘Community-Development-Block-Grant.Rmd’

--- re-building ‘Comprehensive-Housing-and-Affordability-Strategy.Rmd’ using rmarkdown --- finished re-building ‘Comprehensive-Housing-and-Affordability-Strategy.Rmd’

--- re-building ‘Crosswalk.Rmd’ using rmarkdown Quitting from lines 101-105 (Crosswalk.Rmd) Error: processing vignette 'Crosswalk.Rmd' failed with diagnostics: Did you forget to set the key? Please go to https://www.huduser.gov/hudapi/public/register?comingfrom=1 to and sign up and get a token. Then save this to your environment using Sys.setenv('HUD_KEY' = YOUR_KEY) --- failed re-building ‘Crosswalk.Rmd’

--- re-building ‘Fair-Markets-Rent.Rmd’ using rmarkdown --- finished re-building ‘Fair-Markets-Rent.Rmd’

--- re-building ‘Income-Limits.Rmd’ using rmarkdown --- finished re-building ‘Income-Limits.Rmd’

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

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

Error: Vignette re-building failed. Execution halted

Static code analyses with lintr

lintr found the following 351 potential issues:

message number of times
Avoid 1:length(...) expressions, use seq_len. 10
Avoid 1:nrow(...) expressions, use seq_len. 2
Avoid using sapply, consider vapply instead, that's type safe 1
Lines should not be more than 80 characters. 306
Use <-, not =, for assignment. 32

Package Versions

package version
pkgstats 0.0.3.96
pkgcheck 0.0.2.276

Editor-in-Chief Instructions:

Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.

ropensci-review-bot avatar Apr 01 '22 06:04 ropensci-review-bot

Dear @etam4260, Thank you for your submission. Thank you for highlighting the new package hudr that is already on CRAN. Can you describe how you will deal with the name collision (I see it is already a bit problematic as the cran link on your pkgdown site links to that package or maybe that is on purpose?). Also, can you elaborate a bit more on the differences you see between the two packages? thanks, Julia

jooolia avatar Apr 01 '22 19:04 jooolia

Hi @jooolia

An easy solution to deal with the naming conflict I think would be to just rename the entire package as ‘rhud’ and update the documentation accordingly.

Otherwise, I have already contacted CRAN about this issue, but have not heard back about any resolutions. 😔

I’m not sure about any other options. Any other suggestions are appreciated. 🙏🏼

I took a look at the hudr package published on CRAN and it looks like they only implement APIs for two main datasets provided by HUD and they don’t have all the sub datasets. For example, Fair Markets Rent has state, county, and small area level data — they only have state level data. 🧐

hudr(CRAN)

  • Fair Markets Rent (Single Query)
    • State Level
  • Income Limits (Single Query)
    • State Level

They also provide functions for HUD miscellaneous APIs:

  • Query for all US states
  • Query for all counties in a state (Single Query)
  • Query for all metropolitan areas in a state (Single Query)

Single query means their function calls only make 1 API call at a time, whereas multi query means multiple API calls can be done in a single function.

My package on the other hand supports the Crosswalk API and Comprehensive Housing and Affordability Strategy API as well.

hudr(etam4260/hudr)

  • Fair Markets Rent (Multi Query)

    • State Level
    • County
    • Small Areas
  • Income Limits (Multi Query)

    • State Level
    • County
    • Small Areas
  • USPS Crosswalk Files (Multi Query)

  • Comprehensive Housing and Affordability (Multi Query)

  • Query for all US states

  • Query for all counties in a state (Multi Query)

  • Query for all metropolitan areas in a state (Multi Query)

  • Query for all minor civil divisions in a state(Multi Query)

  • Query for all places in a state (Multi Query)

My package I believe is more flexible and intuitive:

There are many ways of identifying US states such as using their abbreviation, full name, or fips code. My package allows the user to query based either of the options whereas the CRAN version strictly requires using the state abbreviation.

For example,

get_hud_fmr_statedata(entityid = “Virginia”, year = “2020”, hud_key = “dqwqdqwd”)

does not work because entityid must be strictly ‘VA'

Furthermore, their function arguments are less intuitive. For example:

get_hud_fmr_statedata(entityid = “VA”, year = “2020”, hud_key = “dqwqdqwd”)

'entityid' I believe should be better named as state because you are only allowed to query for states. Furthermore, the function name itself I believe is a little verbose. My function names do not need the additionaly ‘get_’ at the front. ‘hud_key’ argument I believe should be better named as ‘key’.

When specifying the year argument as well as arguments that are made of numbers, they don’t allow both character and numeric type to be used. For example, 11023 which can be represented as both a numeric or character can only be inputted as “11023”. I believe the flexibility could be both a good and a bad thing though.

Their functions also only strictly allow for only singular API calls.

For example, you cannot query:

get_hud_fmr_statedata(entityid = c(“VA”, “CA"), year = “2020”, hud_key = “dqwqdqwd”) 😕 and you cannot query:

get_hud_fmr_statedata(entityid = c(“VA”), year = c(“2020”, “2019"), hud_key = “dqwqdqwd”) 😕 Their functions only allow querying for state level data but not county and small areas.

My implementation allows all of them in one function call as well allowing for multiple state and year inputs.

hud_fmr(“VA”, year = 2020, key = “qdqdqdw”) hud_fmr(c(“VA”, “CA”), year = “2020”, key = “dqdqdq”) hud_fmr(51, 2021)

hud_fmr(c(“VA”, “CA”), year = c(“2020”, “2019"), key = “dqdqdq”)

hud_fmr(010099999, year = “2020”, key = “qdqdqdqq”) hud_fmr(‘010099999’, year = “2020”, key = “qdqdqdqq”)

hud_fmr(‘METRO47900M47900’, year = 2020, key = “uefjhqiufd”)

For the X marks on the pkgcheck:

I have updated the repository to have a contributing file. Right now I have fixed rcmdcheck() so that it only give a single warning — a problem with rendering PDF documents with latex I think. It says something is wrong with Rd files. I’m not sure how to deal with the coverage error, as on my end codecov seems to be working fine. I made sure the HUD_KEY secret needed by the package is not "". If so, the tests and or code blocks are not run. 🤥

etam4260 avatar Apr 02 '22 00:04 etam4260

@ropensci-review-bot check package

jooolia avatar Apr 03 '22 19:04 jooolia

Thanks, about to send the query.

ropensci-review-bot avatar Apr 03 '22 19:04 ropensci-review-bot

:rocket:

Editor check started

:wave:

ropensci-review-bot avatar Apr 03 '22 19:04 ropensci-review-bot

Checks for hudr (v0.1.0.9000)

git hash: 120ebe8d

  • :heavy_multiplication_x: Package name is not available (on CRAN).
  • :heavy_check_mark: has a 'codemeta.json' file.
  • :heavy_check_mark: has a 'contributing' file.
  • :heavy_check_mark: uses 'roxygen2'.
  • :heavy_check_mark: 'DESCRIPTION' has a URL field.
  • :heavy_check_mark: 'DESCRIPTION' has a BugReports field.
  • :heavy_check_mark: Package has at least one HTML vignette
  • :heavy_check_mark: All functions have examples.
  • :heavy_check_mark: Package has continuous integration checks.
  • :heavy_multiplication_x: Package coverage failed
  • :heavy_multiplication_x: R CMD check found 1 error.
  • :heavy_check_mark: R CMD check found no warnings.

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

Package License: GPL (>= 2)


1. 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 11 files) and
  • 1 authors
  • 7 vignettes
  • no internal data file
  • 4 imported packages
  • 30 exported functions (median 22 lines of code)
  • 63 non-exported functions in R (median 20 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 11 62.6
files_vignettes 7 98.5
files_tests 10 90.7
loc_R 786 61.3
loc_vignettes 878 89.0
loc_tests 392 69.9
num_vignettes 7 99.2 TRUE
n_fns_r 93 74.6
n_fns_r_exported 30 78.3
n_fns_r_not_exported 63 73.5
n_fns_per_file_r 4 63.5
num_params_per_fn 4 54.6
loc_per_fn_r 22 64.1
loc_per_fn_r_exp 22 52.1
loc_per_fn_r_not_exp 20 63.0
rel_whitespace_R 37 79.7
rel_whitespace_vignettes 51 96.3 TRUE
rel_whitespace_tests 29 74.9
doclines_per_fn_exp 40 50.1
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 88 77.1

1a. Network visualisation

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


2. goodpractice and other checks

Details of goodpractice and other checks (click to open)

3a. Continuous Integration Badges

R-CMD-check

GitHub Workflow Results

name conclusion sha date
pages build and deployment success 120ebe 2022-04-01
R-CMD-check success 120ebe 2022-04-01
test-coverage success 06b739 2022-03-28

3b. goodpractice results

R CMD check with rcmdcheck

R CMD check generated the following error:

  1. checking tests ... Running ‘testthat.R’ ERROR Running the tests in ‘tests/testthat.R’ failed. Last 13 lines of output: ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error (test-test_cdbgdr.R:2:3): Main CDBG-DR data files from DRGR Public Portal ── Error in curl::curl_fetch_memory(file): Timeout was reached: [drgr.hud.gov] Resolving timed out after 10000 milliseconds Backtrace: ▆
    1. └─hudr::hud_cdbg(1) at test-test_cdbgdr.R:2:2
    2. ├─base::suppressMessages(import("https://drgr.hud.gov/public/downloads/DR-CDBG/CDBG-DR%20Financial%20Report%20by%20Appropriation.xlsx"))
    3. │ └─base::withCallingHandlers(...)
    4. └─rio::import("https://drgr.hud.gov/public/downloads/DR-CDBG/CDBG-DR%20Financial%20Report%20by%20Appropriation.xlsx")
    5. └─rio:::remote_to_local(file, format = format)
      
    6.   └─curl::curl_fetch_memory(file)
      

[ FAIL 1 | WARN 0 | SKIP 35 | PASS 2 ] Error: Test failures Execution halted

R CMD check generated the following notes:

  1. checking top-level files ... NOTE File LICENSE is not mentioned in the DESCRIPTION file.
  2. checking dependencies in R code ... NOTE Namespace in Imports field not imported from: ‘devtools’ All declared Imports should be used.

R CMD check generated the following test_fail:

  1. library(testthat)

library(hudr)

test_check("hudr") [ FAIL 1 | WARN 0 | SKIP 35 | PASS 2 ]

══ Skipped tests ═══════════════════════════════════════════════════════════════ • Sys.getenv("HUD_KEY") == "" is TRUE (35)

══ Failed tests ════════════════════════════════════════════════════════════════ ── Error (test-test_cdbgdr.R:2:3): Main CDBG-DR data files from DRGR Public Portal ── Error in curl::curl_fetch_memory(file): Timeout was reached: [drgr.hud.gov] Resolving timed out after 10000 milliseconds Backtrace: ▆

  1. └─hudr::hud_cdbg(1) at test-test_cdbgdr.R:2:2
  2. ├─base::suppressMessages(import("https://drgr.hud.gov/public/downloads/DR-CDBG/CDBG-DR%20Financial%20Report%20by%20Appropriation.xlsx"))
  3. │ └─base::withCallingHandlers(...)
  4. └─rio::import("https://drgr.hud.gov/public/downloads/DR-CDBG/CDBG-DR%20Financial%20Report%20by%20Appropriation.xlsx")
  5. └─rio:::remote_to_local(file, format = format)
    
  6.   └─curl::curl_fetch_memory(file)
    

[ FAIL 1 | WARN 0 | SKIP 35 | PASS 2 ] Error: Test failures Execution halted

R CMD check generated the following check_fails:

  1. no_import_package_as_a_whole
  2. rcmdcheck_stale_license_file
  3. rcmdcheck_imports_not_imported_from
  4. rcmdcheck_tests_pass

Test coverage with covr

ERROR: Test Coverage Failed

Cyclocomplexity with cyclocomp

The following functions have cyclocomplexity >= 15:

function cyclocomplexity
hud_chas 27
hud_cw 23
fmr_il_input_check_cleansing 19
cw_input_check_cleansing 17
hud_counties 17
hud_minor_civil_divisions 17
hud_places 17

Static code analyses with lintr

lintr found the following 351 potential issues:

message number of times
Avoid 1:length(...) expressions, use seq_len. 10
Avoid 1:nrow(...) expressions, use seq_len. 2
Avoid using sapply, consider vapply instead, that's type safe 1
Lines should not be more than 80 characters. 306
Use <-, not =, for assignment. 32

Package Versions

package version
pkgstats 0.0.3.96
pkgcheck 0.0.2.276

Editor-in-Chief Instructions:

Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.

ropensci-review-bot avatar Apr 03 '22 19:04 ropensci-review-bot

@ropensci-review-bot assign @jhollist as editor

jooolia avatar Apr 05 '22 12:04 jooolia

Assigned! @jhollist is now the editor

ropensci-review-bot avatar Apr 05 '22 12:04 ropensci-review-bot

@etam4260 I will be serving as the editor on this submission. I think this is a good fit and your explanation of how your package is different than the existing hudr package has convinced that your package provides a more complete access to the HUD APIs.

So, before I move on to assigning reviewers we need to get several items resolved:

  • Package and repo name: Update this to avoid the conflict on CRAN. Make sure the change is also made to repository and in documenation
  • Pay close attention to the items goodpractice results section. In particular the lintr results and the 2 NOTEs.
  • You have one test failing. It looks like it might be related to access to an API key. Some suggestions on dealing with that are in https://devguide.ropensci.org/package-development-security-best-practices.html.
  • I am still somewhat new to the editorial side so I need to check on the statistical properties table. At first glance nothing serious jumps out, but give me a bit more time to dig into the individual parameters.

If you have questions on any of this let me know.

jhollist avatar Apr 11 '22 17:04 jhollist

Just pinging you again @etam4260. Any questions about the few items I listed above?

jhollist avatar Apr 20 '22 20:04 jhollist

Hi @jhollist,

Apologize for not getting back sooner: just nabbed some time to work on it a bit today. I have been working on fixing a few bugs I found on my end and creating more robust testing infrastructure. I have also changed the structure of some of the output data. Therefore, the documentation is a bit outdated -- which I will address. As for the failing test, I was able to fix that. I am hoping to get to the lintr issues soon as well as updating the name of the package (and documentation associated with it). As for one of the NOTES, it seems like its having a problem with files LICENSE.md, CODE_OF_CONDUCT.md and codemeta.json on the top level folder -- is there another location where these should be located?

etam4260 avatar Apr 20 '22 21:04 etam4260

Couple of thoughts.

As for the license stuff. You will need to make sure that DESCRIPTION knows that you have an additional file. If you add "+ file LICENSE" to "License: GPL (>= 2)" that should take care of that note. I believe the two other files just need to be added to .Rbuildignore. The root folder is a good spot for both (might event be required for codemeta.json).

And no need to apologize! I understand the need to juggle multiple demands on time!

jhollist avatar Apr 21 '22 12:04 jhollist

@jhollist

Thanks for tip! I was able to deal with all the notes. For adding the "+ file LICENSE" to the description file, it gave me another error: "License components with restrictions not permitted." So I instead added the LICENSE file to the .Rbuildignore instead and it 'fixed' it. As for the lintr issues, I fixed maybe 97% of the issues -- most of the remaining ones deal with cyclocomplexity as well as function name length. I haven't applied those 'goodpractices' in the vignettes yet: it looks like lintr doesn't check those? Just need to update the package name and the associated documentation now!

etam4260 avatar Apr 29 '22 21:04 etam4260

I think that sounds pretty good. Once you have the name and documentation updated, let me know. I will start looking for reviewers next week.

On Fri, Apr 29, 2022 at 5:42 PM Emmet Tam @.***> wrote:

@jhollist https://github.com/jhollist

Thanks for tip! I was able to deal with all the notes. For adding the "+ file LICENSE" to the description file, it gave me another error: "License components with restrictions not permitted." So I instead added the LICENSE file to the .Rbuildignore instead and it 'fixed' it. As for the lintr issues, I fixed maybe 97% of the issues -- most of the remaining ones deal with cyclocomplexity as well as function name length. I haven't applied those 'goodpractices' in the vignettes yet: it looks like lintr doesn't check those? Just need to update the package name and the associated documentation now!

— Reply to this email directly, view it on GitHub https://github.com/ropensci/software-review/issues/524#issuecomment-1113773184, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJPYS3F7XN2XGEGJ76D5VLVHRJTRANCNFSM5SHUCVZA . You are receiving this because you were mentioned.Message ID: @.***>

-- Jeffrey W. Hollister email: @.*** cell: 401 556 4087 https://jwhollister.com

jhollist avatar Apr 29 '22 21:04 jhollist

@jhollist

Package has been renamed and documentation has been updated. 🙃

etam4260 avatar May 03 '22 02:05 etam4260

@ropensci-review-bot check package

jhollist avatar May 03 '22 18:05 jhollist

Thanks, about to send the query.

ropensci-review-bot avatar May 03 '22 18:05 ropensci-review-bot

:rocket:

Editor check started

:wave:

ropensci-review-bot avatar May 03 '22 18:05 ropensci-review-bot

Checks for rhud (v0.2.0.9000)

git hash: b5aa3d80

  • :heavy_check_mark: Package name is available
  • :heavy_check_mark: has a 'codemeta.json' file.
  • :heavy_check_mark: has a 'contributing' file.
  • :heavy_check_mark: uses 'roxygen2'.
  • :heavy_check_mark: 'DESCRIPTION' has a URL field.
  • :heavy_check_mark: 'DESCRIPTION' has a BugReports field.
  • :heavy_check_mark: Package has at least one HTML vignette
  • :heavy_multiplication_x: These functions do not have examples: [crosswalk, rhud_website].
  • :heavy_check_mark: Package has continuous integration checks.
  • :heavy_multiplication_x: Package coverage is 0.7% (should be at least 75%).
  • :heavy_check_mark: R CMD check found no errors.
  • :heavy_check_mark: R CMD check found no warnings.

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

Package License: GPL (>= 2)


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 331
internal rhud 90
internal utils 24
imports httr NA
imports zoo NA
imports rio NA
suggests covr NA
suggests httptest NA
suggests knitr NA
suggests rmarkdown NA
suggests testthat NA
suggests devtools 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

paste (41), args (32), c (26), expand.grid (21), try (20), for (19), seq_len (19), as.data.frame (16), format (16), Sys.Date (16), call (14), length (13), do.call (10), as.character (6), grepl (6), nrow (6), unlist (6), rbind (5), as.integer (4), data.frame (4), Sys.getenv (4), cbind (3), rep (3), url (3), list (2), return (2), strsplit (2), substr (2), diff (1), emptyenv (1), grep (1), merge (1), nchar (1), ncol (1), Negate (1), new.env (1), readLines (1), regexec (1)

rhud

cw_input_check_cleansing (15), fmr_il_input_check_cleansing (7), chas_input_check_cleansing (6), chas_do_query_calls (4), misc_do_query_call (4), hud_fmr_state_counties (3), crosswalk_a_dataset_input_check_cleansing (2), hud_cw_zip_county (2), hud_fmr_state_metroareas (2), hud_state_minor_civil_divisions (2), hud_state_places (2), add_leading_zeros (1), capitalize (1), check_is_not_list (1), crosswalk (1), cw_do_query_calls (1), decimal_num (1), download_bar (1), elevennumbers (1), fivenumbers (1), fivenumsthenfournums (1), fix_geoid (1), fournumbers (1), hud_chas (1), hud_chas_county (1), hud_chas_nation (1), hud_chas_state (1), hud_chas_state_mcd (1), hud_chas_state_place (1), hud_cw (1), hud_cw_cbsa_zip (1), hud_cw_cbsadiv_zip (1), hud_cw_cd_zip (1), hud_cw_county_zip (1), hud_cw_countysub_zip (1), hud_cw_tract_zip (1), hud_cw_zip_cbsa (1), hud_cw_zip_cbsadiv (1), hud_cw_zip_cd (1), hud_cw_zip_countysub (1), hud_cw_zip_tract (1), hud_fmr (1), hud_fmr_county_zip (1), hud_fmr_metroarea_zip (1), hud_get_key (1), hud_il (1), hud_nation_states_territories (1), hud_set_key (1), hud_state_counties (1), hud_state_metropolitan (1), is.negative (1), numbers_only (1)

utils

zip (18), data (6)


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 16 files) and
  • 1 authors
  • 7 vignettes
  • no internal data file
  • 3 imported packages
  • 34 exported functions (median 30 lines of code)
  • 94 non-exported functions in R (median 23 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 16 74.9
files_vignettes 7 98.5
files_tests 11 91.7
loc_R 1845 82.6
loc_vignettes 902 89.4
loc_tests 561 77.1
num_vignettes 7 99.2 TRUE
n_fns_r 128 82.1
n_fns_r_exported 34 81.0
n_fns_r_not_exported 94 82.6
n_fns_per_file_r 4 62.2
num_params_per_fn 3 33.6
loc_per_fn_r 26 71.1
loc_per_fn_r_exp 30 63.0
loc_per_fn_r_not_exp 24 70.1
rel_whitespace_R 25 87.6
rel_whitespace_vignettes 50 96.4 TRUE
rel_whitespace_tests 31 83.0
doclines_per_fn_exp 38 47.0
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 124 82.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 and other checks (click to open)

3a. Continuous Integration Badges

R-CMD-check

GitHub Workflow Results

name conclusion sha date
pages build and deployment success b5aa3d 2022-05-03
R-CMD-check success 3e3540 2022-05-03
test-coverage failure 0b6873 2022-05-02

3b. goodpractice results

R CMD check with rcmdcheck

R CMD check generated the following notes:

  1. checking dependencies in R code ... NOTE Namespaces in Imports field not imported from: ‘rio’ ‘zoo’ All declared Imports should be used.
  2. checking R code for possible problems ... NOTE crosswalk: no visible binding for global variable ‘w_geoid’ hud_state_minor_civil_divisions: no visible binding for global variable ‘FAlSE’ Undefined global functions or variables: FAlSE w_geoid

R CMD check generated the following check_fails:

  1. cyclocomp
  2. no_import_package_as_a_whole
  3. rcmdcheck_imports_not_imported_from
  4. rcmdcheck_undefined_globals

Test coverage with covr

Package coverage: 0.74

The following files are not completely covered by tests:

file coverage
R/hudchas.R 0%
R/hudcheckfornumbersonly.R 0%
R/hudcheckisnotlist.R 0%
R/hudcw.R 0%
R/huddatasetcw.R 0%
R/huddoquerycalls.R 0%
R/hudfmr.R 0%
R/hudinputcheckcleansing.R 6.99%
R/hudkey.R 0%
R/hudloadingbar.R 0%
R/hudmisc.R 0%
R/hudmischelpers.R 0%
R/huduser.R 0.48%
R/hudwebsitedocs.R 0%

Cyclocomplexity with cyclocomp

The following functions have cyclocomplexity >= 15:

function cyclocomplexity
crosswalk 67
crosswalk_a_dataset_input_check_cleansing 50
hud_chas 28
hud_cw 25
check_is_not_list 20
fmr_il_input_check_cleansing 19
hud_state_metropolitan 19
cw_input_check_cleansing 17
hud_state_counties 17
hud_state_minor_civil_divisions 17
hud_state_places 17

Static code analyses with lintr

lintr found the following 17 potential issues:

message number of times
Avoid using sapply, consider vapply instead, that's type safe 6
Lines should not be more than 80 characters. 10
Use <-, not =, for assignment. 1

Package Versions

package version
pkgstats 0.0.4.30
pkgcheck 0.0.3.15

Editor-in-Chief Instructions:

Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.

ropensci-review-bot avatar May 03 '22 18:05 ropensci-review-bot

@etam4260 Two things came up in the most recent checks

1.) A couple of functions are missing examples. Add these examples into the docs 2.) The test coverage. I see that most of your tests skip without the key hence the low number above. Looks like your current suite is at about 72%. While we shoot for 75%, this is close enough to get the review process started. I would just ask that after and/or during the review that you revisit the tests and make sure you have adequate coverage.

I think we are close enough. I will start looking for potential reviewers!

jhollist avatar May 03 '22 18:05 jhollist

@etam4260 Just a quick update. I have been looking for reviewers. I have one so far (Thank you, @rtaph!) and have another invite out that I am waiting on.

Have you had a chance to add those examples to the few functions that were missing them?

jhollist avatar May 17 '22 15:05 jhollist

@ropensci-review-bot seeking reviewers

jhollist avatar May 17 '22 15:05 jhollist

Please add this badge to the README of your package repository:

[![Status at rOpenSci Software Peer Review](https://badges.ropensci.org/524_status.svg)](https://github.com/ropensci/software-review/issues/524)

Furthermore, if your package does not have a NEWS.md file yet, please create one to capture the changes made during the review process. See https://devguide.ropensci.org/releasing.html#news

ropensci-review-bot avatar May 17 '22 15:05 ropensci-review-bot

@ropensci-review-bot assign @rtaph as reviewer

jhollist avatar May 17 '22 15:05 jhollist

@rtaph added to the reviewers list. Review due date is 2022-06-07. Thanks @rtaph for accepting to review! Please refer to our reviewer guide.

ropensci-review-bot avatar May 17 '22 15:05 ropensci-review-bot

@rtaph: If you haven't done so, please fill this form for us to update our reviewers records.

ropensci-review-bot avatar May 17 '22 15:05 ropensci-review-bot

Nice to meet you @etam4260, @jooolia, and @jhollist. Confirming the review deadline of 2022-06-07 and looking forward to getting to know your package!

rtaph avatar May 17 '22 17:05 rtaph