| Title: | 2021 Ghana Population and Housing Census Results as Data Frames | 
| Version: | 0.1.0 | 
| Description: | Datasets from the 2021 Ghana Population and Housing Census Results. Users can access results as 'tidyverse' and 'sf'-Ready Data Frames. The data in this package is scraped from pdf reports released by the Ghana Statistical Service website https://census2021.statsghana.gov.gh/ . The package currently only contains datasets from the literacy and education reports. Namely, school attendance data for respondents aged 3 years and above. | 
| License: | MIT + file LICENSE | 
| Encoding: | UTF-8 | 
| RoxygenNote: | 7.1.2 | 
| Maintainer: | Ama Owusu-Darko <aowusuda@asu.edu> | 
| Depends: | R (≥ 3.5.0) | 
| LazyData: | true | 
| Suggests: | dplyr, knitr, magrittr, rmarkdown, sf, tmap | 
| VignetteBuilder: | knitr | 
| URL: | https://github.com/ktemadarko/rGhanaCensus | 
| BugReports: | https://github.com/ktemadarko/rGhanaCensus/issues | 
| NeedsCompilation: | no | 
| Packaged: | 2022-01-13 11:01:36 UTC; LENOVO | 
| Author: | Ama Owusu-Darko [cre, aut] | 
| Repository: | CRAN | 
| Date/Publication: | 2022-01-13 20:02:43 UTC | 
Ghana School Attendance Indicator data
Description
The Ghana_2021_school_attendance dataset contains  school attendance indicators for respondents in the 16 regions of Ghana surveyed in the 2021 Ghana Population and Housing Census.
- Details -Age range of survey respondents in this data set 3 years and above. 
Usage
Ghana_2021_school_attendance
Format
A data frame with 64 rows and 10 variables:
- Region - A factor with 16 levels with the names of the regions in Ghana 
 
- Gender - A factor with 2 levels 
 
- Locality - A factor with 2 levels describing with the respondents surveyed lived in an urban or rural area 
 
- Currently_Attending_School - numeric column with the raw count values of survey respondents aged 3 years and above currently attending school 
 
- Percent_Currently_Attending_School - A numeric column with the derived percentage of 
- ((Currently_Attending_School)/Sum_of_Respondents_(3_years_and_above))*100 to two decimal places 
 
- Never_Attended_School - -A numeric column with the raw count values of survey respondents aged 3 years and above who have never attended school 
 
- Percent_Never_Attended_School - A numeric column with the derived percentage of 
- ((Never_Attended_School)/Sum_of_Respondents_(3_years_and_above))*100 to two decimal places 
 
- Dropped_out_of_School - A numeric column with the raw count values of survey respondents aged 3 years and above who were in school but dropped out 
 
- Percent_Dropped_out_of_School - A numeric column with the derived percentage of 
- ((Dropped_out_of_School)/Sum_of_Respondents_(3_years_and_above))*100 to two decimal places 
 
- Sum_of_Respondents_(3_years_and_above) - A numeric column with the raw sum values in each row. 
- That is sum of (Currently_Attending_School, Never_Attended_School, Dropped_out_of_School) in each row 
 
Source
- School attendance data 
- Scraped from Ghana Statistical Service published 2021 Ghana Population and Housing Census Results Volume 3D Literacy and Education PDF Reports 
- Ghana regional administrative boundaries geometry data 
- Downloaded from Humanitarian data exchange website on 7th January, 2022 
https://data.humdata.org/dataset/ghana-administrative-boundaries
Ghana School Attendance Indicator data plus geometry
Description
The Ghana_2021_school_attendance_geometry dataset contains  school attendance indicators for respondents in the 16 regions of Ghana surveyed in the 2021 Ghana Population and Housing Census plus Ghana regional administrative boundaries.
- Details Age range of survey respondents in this data set 3 years and above. 
Usage
Ghana_2021_school_attendance_geometry
Format
A data frame with 64 rows and 10 variables:
- Region - A factor with 16 levels with the names of the regions in Ghana 
 
- Gender - A factor with 2 levels 
 
- Locality - A factor with 2 levels describing with the respondents surveyed lived in an urban or rural area 
 
- Currently_Attending_School - numeric column with the raw count values of survey respondents aged 3 years and above currently attending school 
 
- Percent_Currently_Attending_School - A numeric column with the derived percentage of 
- ((Currently_Attending_School)/Sum_of_Respondents_(3_years_and_above))*100 to two decimal places 
 
- Never_Attended_School - -A numeric column with the raw count values of survey respondents aged 3 years and above who have never attended school 
 
- Percent_Never_Attended_School - A numeric column with the derived percentage of 
- ((Never_Attended_School)/Sum_of_Respondents_(3_years_and_above))*100 to two decimal places 
 
- Dropped_out_of_School - A numeric column with the raw count values of survey respondents aged 3 years and above who were in school but dropped out 
 
- Percent_Dropped_out_of_School - A numeric column with the derived percentage of 
- ((Dropped_out_of_School)/Sum_of_Respondents_(3_years_and_above))*100 to two decimal places 
 
- Sum_of_Respondents_(3_years_and_above) - A numeric column with the raw sum values in each row. 
- That is sum of (Currently_Attending_School, Never_Attended_School, Dropped_out_of_School) in each row 
 
Source
- School attendance data 
- Scraped from Ghana Statistical Service published 2021 Ghana Population and Housing Census Results Volume 3D Literacy and Education PDF Reports 
- Ghana regional administrative boundaries geometry data 
- Downloaded from Humanitarian data exchange website on 7th January, 2022 
https://data.humdata.org/dataset/ghana-administrative-boundaries
Examples
## Not run: 
#Example
#Create a interactive map with the package tmap that displays the
#regional distribution of percentage of students 3 years or older who have dropped out of school.
#Load required packages
library(sf)
library(tmap)
library(dplyr)
library(magrittr)
#Load geometry data
data("Ghana_2021_school_attendance_geometry", package = "rGhanaCensus")
#Convert to sf data frame and assign a name
#In this example, "Ghana_edu_sf" will be the name of the sf data frame created.
Ghana_edu_sf<- sf::st_as_sf(Ghana_2021_school_attendance_geometry)
#Use tmap to create interactive map
tmap_mode("plot")
Ghana_edu_sf %>%
               dplyr::filter(Locality=="Urban") %>%
               tm_shape()+
               tm_polygons(id="Region", col="Percent_Dropped_out_of_School")+
               tm_text(text="Percent_Dropped_out_of_School")+
               tm_facets(by="Gender")
## End(Not run)