Repository navigation
Add sle_hf: Sierra Leone health facility points from OpenStreetMap - #47
Merged
Merged
Conversation
The Epidemiologist R Handbook's GIS basics chapter uses three data inputs:
the admin-3 shapefile (sle_adm3), the admin-3 population table
(sle_admpop_adm3_2020) and the health facility points. The first two are in
this package; the third was not, so the chapter still reads it from a file
path. This adds it as sle_hf, so the chapter can read all three through
get_data() like every other chapter.
The seven shapefile components already ship inside sle_adm3.zip. They now
also ship as inst/extdata/sle_hf.zip, which is what save_data(name = "sle_hf")
looks up, and data-raw/sle_hf.R builds data/sle_hf.rda from it, so
get_data(name = "sle_hf") returns an sf object (44 points, 12 columns,
WGS 84). Registry row: ebola_outbreak_sle_2014_shape_2_1, licence ODbL,
(c) OpenStreetMap contributors. Documented beside sle_adm3 in
R/ebola_outbreak_sle_2014_doc.R and listed in _pkgdown.yml.
Verified after devtools::document(): get_data("sle_hf") is sf 44 x 12,
list_data() lists it, save_data("sle_hf") writes sle_hf.zip, and the 89
existing registry rows are unchanged (all.equal against the previous file).
Version 0.0.0.9012.
Contributor
|
checked it out: clean filenames, prep script, roxygen doc, _pkgdown.yml entry, and a registry row. I also loaded the package and pulled the data myself: get_data("sle_hf") returns a 44×12 sf object as expected. No issues, good to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The GIS basics chapter of the Epidemiologist R Handbook needs three data inputs. Two are already here (
sle_adm3,sle_admpop_adm3_2020); this adds the third, the health facility points, assle_hf, so the chapter can read all of its data throughget_data()like every other chapter.inst/extdata/sle_hf.zip: the seven shapefile components (they already ship insidesle_adm3.ziptoo; a separate zip is whatsave_data(name = "sle_hf")looks up).data-raw/sle_hf.Rbuildsdata/sle_hf.rda;get_data(name = "sle_hf")returns an sf object, 44 points, 12 columns, WGS 84.ebola_outbreak_sle_2014_shape_2_1, licence ODbL, (c) OpenStreetMap contributors. Documented besidesle_adm3; listed in_pkgdown.yml; NEWS and version 0.0.0.9012.Verified locally:
get_data,list_data,save_dataall work for the new name, and the 89 existing registry rows are byte-for-byte unchanged in value.Follow-up once merged: bump the
appliedepidatapin inappliedepi/aedockerpublic(epirhandbook/2.8/packages_github.json) to the merge commit, then switch the handbook's GIS chapter toget_data().