{"id":38654537,"url":"https://github.com/openwashdata/portawaterperu","last_synced_at":"2026-01-17T09:25:38.200Z","repository":{"id":245410513,"uuid":"816813046","full_name":"openwashdata/portawaterperu","owner":"openwashdata","description":"Data about Peruvian Portable Water System ","archived":false,"fork":false,"pushed_at":"2024-07-30T13:10:38.000Z","size":6340,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-04T20:42:18.840Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://openwashdata.github.io/portawaterperu/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openwashdata.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":".zenodo.json"}},"created_at":"2024-06-18T12:59:23.000Z","updated_at":"2024-07-30T13:06:59.000Z","dependencies_parsed_at":"2024-07-30T16:39:20.487Z","dependency_job_id":null,"html_url":"https://github.com/openwashdata/portawaterperu","commit_stats":null,"previous_names":["openwashdata/portawaterperu"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/openwashdata/portawaterperu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fportawaterperu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fportawaterperu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fportawaterperu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fportawaterperu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openwashdata","download_url":"https://codeload.github.com/openwashdata/portawaterperu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fportawaterperu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28505550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-17T09:25:38.050Z","updated_at":"2026-01-17T09:25:38.155Z","avatar_url":"https://github.com/openwashdata.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\nalways_allow_html: true\neditor_options: \n  markdown: \n    wrap: 72\n  chunk_output_type: console\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\",\n  message = FALSE,\n  warning = FALSE,\n  fig.retina = 2,\n  fig.align = 'center'\n)\n```\n\n# portawaterperu\n\n\u003c!-- badges: start --\u003e\n\n[![License: CC BY\n4.0](https://img.shields.io/badge/License-CC_BY_4.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)\n[![R-CMD-check](https://github.com/openwashdata/portawaterperu/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/openwashdata/portawaterperu/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\nThe goal of the package `portawaterperu` is to provide access to data about community portable water systems in Peru. The data is collected from SIASAR database consisted of information and surveys about water catchments, storage system, treatment, distribution networks and maintainance. \n\n## Installation\n\nYou can install the development version of portawaterperu from\n[GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"openwashdata/portawaterperu\")\n```\n\n```{r}\n## Run the following code in console if you don't have the packages\n## install.packages(c(\"dplyr\", \"knitr\", \"readr\", \"stringr\", \"gt\", \"kableExtra\"))\nlibrary(dplyr)\nlibrary(knitr)\nlibrary(readr)\nlibrary(stringr)\nlibrary(gt)\nlibrary(kableExtra)\n```\n\nAlternatively, you can download the individual datasets as a CSV or XLSX\nfile from the table below.\n\n```{r, echo=FALSE, message=FALSE, warning=FALSE}\n\nextdata_path \u003c- \"https://github.com/openwashdata/portawaterperu/raw/main/inst/extdata/\"\n\nread_csv(\"data-raw/dictionary.csv\") |\u003e \n  distinct(file_name) |\u003e \n  dplyr::mutate(file_name = str_remove(file_name, \".rda\")) |\u003e \n  dplyr::rename(dataset = file_name) |\u003e \n  mutate(\n    CSV = paste0(\"[Download CSV](\", extdata_path, dataset, \".csv)\"),\n    XLSX = paste0(\"[Download XLSX](\", extdata_path, dataset, \".xlsx)\")\n  ) |\u003e \n  knitr::kable()\n\n```\n\n## Data\n\nThe package provides access to one dataset `portawaterperu`.\n\n```{r}\nlibrary(portawaterperu)\n```\n\n### portawaterperu\n\nThe dataset `portawaterperu` contains data abour portable water system from 32 communities in Peru. It has\n`r nrow(portawaterperu)` observations and `r ncol(portawaterperu)`\nvariables\n\n```{r}\nportawaterperu |\u003e \n  head(3) |\u003e \n  gt::gt() |\u003e\n  gt::as_raw_html()\n```\n\nFor an overview of the variable names, see the following table.\n\n```{r echo=FALSE, message=FALSE, warning=FALSE}\nreadr::read_csv(\"data-raw/dictionary.csv\") |\u003e\n  dplyr::filter(file_name == \"portawaterperu.rda\") |\u003e\n  dplyr::select(variable_name:description) |\u003e \n  knitr::kable() |\u003e \n  kableExtra::kable_styling(\"striped\") |\u003e \n  kableExtra::scroll_box(height = \"200px\")\n```\n\n## Example\n\n```{r}\nlibrary(portawaterperu)\nlibrary(ggplot2)\n# Provide some example code here\nportawaterperu |\u003e \n  #dplyr::filter(stringr::str_starts(divisiones, \"AMAZONAS\")) |\u003e\n  #dplyr::group_by(divisiones) |\u003e \n  #dplyr::summarise(mean = mean(pob_servida)) |\u003e \n  ggplot(aes(y = pop_serviced, color = type_gravity))+\n  geom_boxplot(outliers = F)+\n  labs(title = \"Population served given different gravity types\",\n       y= \"Population\") +\n  theme_classic()\n  \n```\n\n## Capstone Project\nThis dataset is shared as part of a capstone project in Data Science for openwashdata. For more information about the project and to explore further insights, please visit the project page at https://ds4owd-001.github.io/project-laurenjudah/ (to be public available)\n\n\n## Methodology\nThe data was obtained from @SIASAR, an information system containing data on rural water supply and sanitation services. Using SIASAR's \"download data by country\" tool, all available data for Peru (10 excel files) were downloaded. After examining the 10 excel files, only 5 pertained to potable water systems. Those 5 data sets were imported into R and subsequently empty values and unnecessary columns were deleted from them. Finally, the 5 data sets were combined into 1 data frame based on community ID. The combined, cleaned data set contains data from 32 communities.\n\nSIASAR does not provide a matching data dictionary. openwashdata developer went through the attachements of the original questionnaire:\n\n- https://globalsiasar.org/es/content/documentacion-tecnica\n- https://globalsiasar.org/en/content/technical-documentation\n\nThe variable description is written with our best guess with the information from the attachements.\n\n## License\n\nData are available as\n[CC-BY](https://github.com/openwashdata/portawaterperu/blob/main/LICENSE.md).\n\n## Citation\n\nPlease cite this package using:\n\n```{r}\ncitation(\"portawaterperu\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenwashdata%2Fportawaterperu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenwashdata%2Fportawaterperu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenwashdata%2Fportawaterperu/lists"}