Skip to content

Add sle_hf: Sierra Leone health facility points from OpenStreetMap - #47

Merged
Lfquezada merged 1 commit into
mainfrom
add-sle-hf
Sep 3, 2026
Merged

Lfquezada merged 1 commit into
mainfrom
add-sle-hf

Conversation

@raubreywhite

Copy link
Copy Markdown
Contributor

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, as sle_hf, so the chapter can read all of its data through get_data() like every other chapter.

  • inst/extdata/sle_hf.zip: the seven shapefile components (they already ship inside sle_adm3.zip too; a separate zip is what save_data(name = "sle_hf") looks up).
  • data-raw/sle_hf.R builds data/sle_hf.rda; 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; listed in _pkgdown.yml; NEWS and version 0.0.0.9012.

Verified locally: get_data, list_data, save_data all work for the new name, and the 89 existing registry rows are byte-for-byte unchanged in value.

Follow-up once merged: bump the appliedepidata pin in appliedepi/aedockerpublic (epirhandbook/2.8/packages_github.json) to the merge commit, then switch the handbook's GIS chapter to get_data().

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.
@Lfquezada

Copy link
Copy Markdown
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.

@Lfquezada
Lfquezada merged commit f8b3fef into main Sep 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants