Changelog
Source:NEWS.md
rfema 1.0.0 (2022-01-10)
Changes made for this version are primarily a result of suggestions made while the package was reviewed for inclusion in the rOpensci suite of packages. Thus, the following summarizes suggestions made by reviews and then how those suggestions were dealt with.
DOCUMENTATION FIXES
- rOpensci Reviewer Suggestion: emphasize in readme that no API is needed.
- The following line has been added to the first paragraph of the README file: “Notably, the FEMA API does not require an API key meaning the package is extremely accessible regardless of if the user has ever interacted with an API.”
- rOpensci Reviewer Suggestion: link FEMA data sets webpage in README, vignette, and help file, when talking about fema_data_sets().
- Done. The Readme and vignette both suggest that the
fema_data_sets()
function be used for quick references and that naive users should start by visiting the FEMA API documentation page. The help file forfema_data_sets()
also contains a link to the documentation page now.
- Done. The Readme and vignette both suggest that the
- rOpensci Reviewer Suggestion: remove the use of kable() in the readme and vignettes (removed from readme but not vignette yet)
-
kable()
is not longer used to present output in the documentation files. Most output is now returned as a tibble making the use ofkable()
unnecessary for truncating long blocks of text.
-
- rOpensci Reviewer Suggestion: fix link to R-CMD-check badge
- The link to the R-CMD-check badge has been fixed and point to the correct Github repo.
- rOpensci Reviewer Suggestion: Add description field for
bulk_dl()
in the help file.- the
bulk_dl()
help file now has a description field.
- the
- rOpensci Reviewer Suggestion: make sure functions in helpers.R are NOT exported
- all functions in the helpers.R files are no longer exported.
- rOpensci Reviewer Suggestion: Make sure there are links in the README to the Contributing file.
- The end of the README file now has a link to the contributing file.
- rOpensci Reviewer Suggestion: include issues template in README using usethis::use_tidy_issue_template()
- Done.
- rOpensci Reviewer Suggestion: use TRUE/FALSE in the documentation
- all function help files use TRUE/FALSE now rather than the abbreviations T/F
MINOR IMPROVEMENTS
- rOpensci Reviewer Suggestion: Convert all output to tibbles
- All exported functions that return objects now return that data as at tibble.
- rOpensci Reviewer Suggestion: Add a estimate for the time it will take to complete an API query.
- When the
ask_before_call
argument is set toTRUE
in theopen_fema
function, in addition to outputting a console message letting the user know how many individual API query iterations are necessary to retrieve their data, the message will also present an estimate of the time it will take to do this. The time estimate is generated by making 5 API queries in the background on thedata_set
specified inopen_fema
, timing them, then extrapolating the average time per query to the number of queries needed to get the full set of records the user is requesting. A new helper function,time_iterations
, handles this process.
- When the
- rOpensci Reviewer Suggestion: Format returned date and time columns as POSIX
- A new helper function was written,
convert_dates
, that takes the returned data set and attempts to convert any column that has “date” in its label to
POSIX format. This is done within theopen_fema
function so the tibble returned to the user has dates converted before it reaches them.
- A new helper function was written,
- rOpensci Reviewer Suggestion: Investigate if parameter_values() function can obtain all parameter values, instead of just searching the first 1000 records for unique values of the parameters.
- As far as I can tell, there is way to obtain all the unique values for a data set column without obtaining the entire data set and searching all the records. I’ve modified the function to make it clear that what is presented does not necessarily represent the full range of possible parameter values (some data fields have all the unique values detailed in the data sets description, but this is not universally true), but instead just provides some examples to help the user understand the data set. When the function is used, it also suggests visiting the FEMA documentation page for more information.
- rOpensci Reviewer Suggestion: using remotes instead of devtools for installation in README (pull request)
- Pull request was accepted and merged.
- rOpensci Reviewer Suggestion: memoization should be done in the .onLoad function
- All functions that should be memoized receive memoization in the .onLoad function now.
BUG FIXES
- rOpensci Reviewer Suggestion: Fix bug in iteration message (prints FALSE) for the
open_fema
function.- Fixed.
- rOpensci Reviewer Suggestion: alter iteration message for the
open_fema
function so is overwrites the previous console message after each iteration.- Fixed. The message displayed after each iteration now looks like the following: “Obtaining Data: 3 out of 5 iterations (60% complete)”
- rOpensci Reviewer Suggestion: wrap examples in to avoid CRAN check failures when the FEMA API is down.
- Done.