Skip to contents

Depending on how and what you would like to use the data for, the description might change. It is based on the student project of Lauren Judah..

Installation

You can install the development version of portawaterperu from GitHub with:

# install.packages("devtools")
devtools::install_github("openwashdata/portawaterperu")
## Run the following code in console if you don't have the packages
## install.packages(c("dplyr", "knitr", "readr", "stringr", "gt", "kableExtra"))
library(dplyr)
library(knitr)
library(readr)
library(stringr)
library(gt)
library(kableExtra)

Alternatively, you can download the individual datasets as a CSV or XLSX file from the table below.

dataset CSV XLSX
portawaterperu Download CSV Download XLSX
NA Download CSV Download XLSX

Data

The package provides access to …

portawaterperu

The dataset portawaterperu contains data about … It has 10183 observations and 18 variables

portawaterperu |> 
  head(3) |> 
  gt::gt() |>
  gt::as_raw_html()
nombre ID pais divisiones latitud longitud altitud año comunidades PSE pob_servida viv_servidas tipo_gravedad tipo_bombeo tipo_pozo_manual tipo_agua_lluvia agua_epoca_seca agua_epoca_lluvia
Sistema de VISTA HERMOSA 135492 Perú AMAZONAS,CHACHAPOYAS,ASUNCION -5.96261 -77.7505 2510 2009 VISTA HERMOSA Prestador de VISTA HERMOSA 100 25 NO NO NO NO NO NO
Sistema de POLLAN 135494 Perú AMAZONAS,CHACHAPOYAS,ASUNCION -5.99880 -77.7400 2728 2007 POLLAN Municipalidad de ASUNCION 30 9 NO NO NO NO NO NO
Sistema de VITUYA 135495 Perú AMAZONAS,CHACHAPOYAS,CHILIQUIN -6.10203 -77.7914 1936 2000 VITUYA Municipalidad de CHILIQUIN 160 42 NO NO NO NO NO NO

For an overview of the variable names, see the following table.

variable_name variable_type description
nombre character name of community water system
ID double identification number (unique to each water system)
pais character Country of data collection
divisiones character geographic division (region; province; district)
latitud double latitude of district
longitud double longitude of district
altitud double altitude of district
ano double year water system data was collected
comunidades character community/municipality/town name
PSE character water service provider
pob_servida double population number served by water service provider
viv_servidas double household number served by water service provider
tipo_gravedad character is the community served by a gravity distribution system?
tipo_bombeo character is the community served by a force/pump distribution system
tipo_pozo_manual character is the community served by a well system (communal collection point / no distribution pipes)
tipo_agua_lluvia character rain water (not sure in what regard this relates to water system won’t use in analysis)
agua_epoca_seca character dry season water (not sure in what regard this relates to water system won’t use in analysis)
agua_epoca_lluvia character rainy season water (not sure in what regard this relates to water system won’t use in analysis)

Example

library(portawaterperu)
library(ggplot2)
# Provide some example code here
portawaterperu |> 
  #dplyr::filter(stringr::str_starts(divisiones, "AMAZONAS")) |>
  #dplyr::group_by(divisiones) |> 
  #dplyr::summarise(mean = mean(pob_servida)) |> 
  ggplot(aes(y = pob_servida, color = tipo_gravedad))+
  geom_boxplot(outliers = F)+
  labs(title = "Population served given different gravity types",
       y= "Population") +
  theme_classic()

Refer to Laurens student project for nice examples. Here report index.file is in the data-raw/report-lauren folder…

You will have to adjust the code slightly…

License

Data are available as CC-BY.

Citation

Please cite this package using:

citation("portawaterperu")
#> To cite package 'portawaterperu' in publications use:
#> 
#>   Loos S, Judah L (2024). _portawaterperu: A Preliminary Review of
#>   Peruvian Potable Water System Data_. R package version 0.0.0.9000,
#>   <https://github.com/openwashdata/portawaterperu>.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {portawaterperu: A Preliminary Review of Peruvian Potable Water System Data},
#>     author = {Sebastian Camilo Loos and Lauren Judah},
#>     year = {2024},
#>     note = {R package version 0.0.0.9000},
#>     url = {https://github.com/openwashdata/portawaterperu},
#>   }