Skip to content

Better geography function documentation#32

Merged
nataliec-sss merged 8 commits intomainfrom
geog_function_doc
Oct 9, 2025
Merged

Better geography function documentation#32
nataliec-sss merged 8 commits intomainfrom
geog_function_doc

Conversation

@ken-oneill
Copy link
Copy Markdown
Member

Purpose of this pull request

To improve the function documentation for the following functions: get_datazone_lookup(); get_simd_lookup(); get_sspl_lookup(); add_geography().

Main changes

  1. Remove a dependency via the config package to read in a local file (for Scottish Statistics Postcode lookup). Instead, a mock CSV file that is essentially the first 10 rows (plus the column headers) from the (already published) Scottish Statistics Postcode lookup version 2025/2. This mock file is stored within tests/testthat/sspl_data, and no R code is used to create this file to avoid accidental update/overwritten
  2. Because of the mock CSV file, the .gitignore file is modified slightly to allow only this CSV file to be included in this package
  3. Similarly, because of the mock CSV files, some tests have changed a bit to remove the aforementioned dependency
  4. For each of the aforementioned functions, improve function documentations by including the seealso tag and an example. Note all of those examples are wrapped in \dontrun{} to avoid encountering issues with github actions for this package
  5. Make use of .data from the rlang package and tidy selection to deal with data masking previously triggered R CMD Check notes on "no visible binding".

My ask for reviewers of this pull request

Feedback on those changes would be appreciated, e.g. is the function documentation for any function clearer? Are examples easy to read and understand despite the example for get_sspl_lookup() would not work since people would have to download the Scottish Statistics Postcode Lookup to their local device?

Please note that this pull request will still fail some github actions, and I hope to try to resolve this immediately if this pull request is approved.

Ken

@ken-oneill ken-oneill added documentation Improvements or additions to documentation question Further information is requested labels Oct 6, 2025
@nataliec-sss nataliec-sss self-requested a review October 9, 2025 14:37
Copy link
Copy Markdown
Contributor

@nataliec-sss nataliec-sss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ken, i think the changes to the documentation and the ability to use test functionality without the config file is great. I've run the tests and everything passed so content to approve this pull request.

Could we please mark this as a release? I'm concerned we are aren't updating package version numbers with each update so i think that this would be a good way to introduce this.

@nataliec-sss nataliec-sss merged commit 9a7051f into main Oct 9, 2025
0 of 5 checks passed
@nataliec-sss nataliec-sss deleted the geog_function_doc branch October 9, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants