Logo Lanfrica

afrimapr/WiGISKeDataViz3

Domain:

geospatialhealthcare
Creator:
afr
Host:
A package created to support the Women in GIS Kenya (WiGISKe) data visualisation challenge #3 - wigis.co.ke # WiGISKeDataViz3 The goal of WiGISKeDataViz3 is to facilitate easy access to datasets, analysis and visualisation used in the Women in GIS Kenya data viz challenge \#3 where the focus was on teenage pregnancies between 2016 - 2020. For more information about the challenge see . ## Installation WiGISKeDataViz3 is not on CRAN but you can install the development version available on Github as follows: ``` r # install.packages("devtools") # if not already installed # devtools::install_github("afrimapr/WiGISKeDataViz3") library(WiGISKeDataViz3) ``` ## Example ### Population data to use in normalisation Access population data from the World Bank Data Bank to normalise pregnancy data. The World Pop datasets that will work (given the dataformat and cleanup code) include “SP.POP.1014.FE”, “SP.POP.1014.MA”, “SP.POP.1519.FE”, “SP.POP.1519.MA”. ``` r # Create tibble with population data for females age ken_fem_1014 Registered S3 method overwritten by 'httr': #> method from #> print.cache_info hoardr head(ken_fem_1014) #> # A tibble: 5 x 5 #> iso3c date indicator_value age gender #> #> 1 KEN 2016 3074808 1014 f #> 2 KEN 2017 3149007 1014 f #> 3 KEN 2018 3222081 1014 f #> 4 KEN 2019 3288073 1014 f #> 5 KEN 2020 3362403 1014 f ``` ### Admin boundaries to use in maps and analysis Access administrative boundaries for Kenya through the rgeoboundaries package from Ahmadou Dicko. rgeoboundaries provides easy access in R to data from the GeoBoundaries project. ``` r # Create sf object for Kenya admin level 2 (sub-county) with cleaned-up sub-county names ken_adm2 Classes 'sf' and 'data.frame': 71 obs. of 6 variables: #> $ shapeName : chr "Baringo" "Bomet" "Bondo" "Bungoma" ... #> $ shapeISO : chr "None" "None" "None" "None" ... #> $ shapeID : chr "KEN-ADM2-3_0_0-B1" "KEN-ADM2-3_0_0-B2" "KEN-ADM2-3_0_0-B3" "KEN-ADM2-3_0_0-B4" ... #> $ shapeGroup: chr "KEN" "KEN" "KEN" "KEN …