rhealthsites

R Client to the Global Healthsite Mapping Project

An R package to quickly access health facilities from the Healthsites project.

Install rhealthsites

You can install the development version from GitLab using the remotes package.

Get the API key from healthsites.io

In order the have the API key token you need to register on https://healthsites.io/ and got to your /profile page. The following steps are required:

1- Establish an OpenStreetMap account: https://www.openstreetmap.org/user/new

2- Sign into Healthsites with your OSM account https://healthsites.io/map

3- Get an API token off your profile page, click on your user profile to open your profile page where you will find an option to generate the token.

First Usage

The main function of this package is hs_facilities, it allows you to get all available health facilities from a country or any specified spatial extent.

library(rhealthsites)
library(sf)
hs_set_api_key("xxxxxxxxxxxxxxxxxxxxxxxxxxxx")
mali_hs <- hs_facilities(country = "Mali")
str(mali_hs)
#>  tibble [1,229 × 33] (S3: sf/tbl_df/tbl/data.frame)
#>   $ osm_id             : num [1:1229] 3.53e+09 3.19e+09 2.16e+09 3.46e+09 2.16e+09 ...
#>   $ osm_type           : chr [1:1229] "node" "node" "node" "node" ...
#>   $ completeness       : num [1:1229] 10 13 17 10 10 13 10 10 13 10 ...
#>   $ is_in_health_zone  : chr [1:1229] "" "" "" "" ...
#>   $ amenity            : chr [1:1229] "clinic" "clinic" "clinic" "clinic" ...
#>   $ speciality         : chr [1:1229] "" "" "" "" ...
#>   $ addr_full          : chr [1:1229] "" "" "" "" ...
#>   $ operator           : chr [1:1229] "" "" "" "" ...
#>   $ water_source       : chr [1:1229] "" "" "" "" ...
#>   $ changeset_id       : int [1:1229] 31265202 26858587 26816057 30312121 26849135 38791643 72096998 75708395 77315665 37519235 ...
#>   $ insurance          : chr [1:1229] "" "" "" "" ...
#>   $ staff_doctors      : chr [1:1229] "" "" "" "" ...
#>   $ contact_number     : chr [1:1229] "" "" "" "" ...
#>   $ uuid               : chr [1:1229] "7e2a9b5888be4b2caca7901049833e58" "1d2410ef911749c29a81e1b5015ebc13" "66c32517e809484ba6cab3d7f85e813c" "db009fcb77674ee6b478db19c4dc196f" ...
#>   $ electricity        : chr [1:1229] "" "" "" "" ...
#>   $ opening_hours      : chr [1:1229] "" "" "" "" ...
#>   $ operational_status : chr [1:1229] "" "" "" "" ...
#>   $ source             : chr [1:1229] "" "OMS Survey" "OMS Survey" "" ...
#>   $ is_in_health_area  : chr [1:1229] "" "" "" "" ...
#>   $ health_amenity_type: chr [1:1229] "" "" "" "" ...
#>   $ changeset_version  : int [1:1229] 1 1 2 1 2 1 1 1 3 2 ...
#>   $ emergency          : chr [1:1229] "" "" "" "" ...
#>   $ changeset_timestamp: POSIXct[1:1229], format: "2015-05-18 20:34:02" ...
#>   $ name               : chr [1:1229] "Cabinet Medical M'BEWO" "Centre de Santé Communautaire ASACODA" "Centre de Santé Communautaire de Madina Diassa" "KURESEL DOKTORLAR-MALI Clinique Ophtamologique" ...
#>   $ staff_nurses       : chr [1:1229] "" "" "" "" ...
#>   $ changeset_user     : chr [1:1229] "Mamery KANE" "jgc" "jgc" "Nathalie SIDIBE" ...
#>   $ wheelchair         : chr [1:1229] "" "" "yes" "" ...
#>   $ beds               : chr [1:1229] "" "" "" "" ...
#>   $ url                : chr [1:1229] "" "" "" "" ...
#>   $ dispensing         : chr [1:1229] "" "" "" "" ...
#>   $ healthcare         : chr [1:1229] "" "" "" "" ...
#>   $ operator_type      : chr [1:1229] "" "" "" "" ...
#>   $ geometry           :sfc_POINT of length 1229; first list element:  'XY' num [1:2] -8.02 12.54
#>   - attr(*, "sf_column")= chr "geometry"
#>   - attr(*, "agr")= Factor w/ 3 levels "constant","aggregate",..: NA NA NA NA NA NA NA NA NA NA ...
#>    ..- attr(*, "names")= chr [1:32] "osm_id" "osm_type" "completeness" "is_in_health_zone" ...
plot(st_geometry(mali_hs))

Acknowledgements