{"id":38654519,"url":"https://github.com/openwashdata/watercostaccra","last_synced_at":"2026-01-17T09:25:37.371Z","repository":{"id":245408035,"uuid":"816812281","full_name":"openwashdata/watercostaccra","owner":"openwashdata","description":"Data of household survey on water costs and coping strategies in Accra associated with a project report completed by Elizabeth Vicario for the “data science for openwashdata” course","archived":false,"fork":false,"pushed_at":"2024-10-23T14:10:27.000Z","size":2051,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-04T23:21:08.781Z","etag":null,"topics":["accra","ghana","household-surveys","open-data","openwashdata","r","water-cost"],"latest_commit_sha":null,"homepage":"https://openwashdata.github.io/watercostaccra/","language":"R","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":null}},"created_at":"2024-06-18T12:57:37.000Z","updated_at":"2024-10-23T08:45:49.000Z","dependencies_parsed_at":"2025-04-12T08:28:41.747Z","dependency_job_id":"bc31ef09-b54e-499c-8431-1d472fa35f74","html_url":"https://github.com/openwashdata/watercostaccra","commit_stats":null,"previous_names":["openwashdata/watercostaccra"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/openwashdata/watercostaccra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fwatercostaccra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fwatercostaccra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fwatercostaccra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fwatercostaccra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openwashdata","download_url":"https://codeload.github.com/openwashdata/watercostaccra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fwatercostaccra/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":["accra","ghana","household-surveys","open-data","openwashdata","r","water-cost"],"created_at":"2026-01-17T09:25:37.226Z","updated_at":"2026-01-17T09:25:37.326Z","avatar_url":"https://github.com/openwashdata.png","language":"R","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# watercostaccra\n\n\u003c!-- badges: start --\u003e\n\n[![License: CC BY\n4.0](https://img.shields.io/badge/License-CC_BY_4.0-pink.svg)](https://creativecommons.org/licenses/by/4.0/)\n[![R-CMD-check](https://github.com/openwashdata/watercostaccra/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/openwashdata/watercostaccra/actions/workflows/R-CMD-check.yaml)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13981225.svg)](https://zenodo.org/doi/10.5281/zenodo.13981225)\n\u003c!-- badges: end --\u003e\n\nThe goal of watercostaccra is to provide users with documentation on two surveys on household water costs, coping mechanisms as well as water point estimates conducted in November 2023 in Accra, Ghana. The data sets are associated with the following [project report](https://ds4owd-001.github.io/project-efvicario/) completed by Elizabeth Vicario for the [\"data science for openwashdata\" course](https://ds4owd-001.github.io/website/) offered by [openwashdata.org](https://openwashdata.org/).\n\n## Installation\n\nYou can install the development version of watercostaccra from\n[GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"openwashdata/watercostaccra\")\n```\n\nAlternatively, you can download the individual data sets as a CSV or XLSX\nfile from the table below.\n\n```{r, echo=FALSE, message=FALSE, warning=FALSE}\nlibrary(dplyr)\nlibrary(knitr)\nlibrary(readr)\nlibrary(stringr)\nlibrary(gt)\nlibrary(kableExtra)\nlibrary(ggtext)\n\nextdata_path \u003c- \"https://github.com/openwashdata/watercostaccra/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 household water costs, coping mechanisms as well as water point estimates.\n\n```{r}\nlibrary(watercostaccra)\n```\n\nThe `households` data set contains data about a household survey on water costs and coping strategies in Accra. It has `r nrow(households)` observations and `r ncol(households)` variables. \n```{r echo=FALSE, message=FALSE, warning=FALSE}\nreadr::read_csv(\"data-raw/dictionary.csv\") |\u003e\n  dplyr::filter(file_name == \"households.rda\") |\u003e\n  dplyr::select(variable_name:description) |\u003e \n  knitr::kable() |\u003e \n  kableExtra::kable_styling(\"striped\") |\u003e\n   kableExtra::scroll_box(height = \"400px\")\n```\n\nThe `waterpoints` data set contains data about a water point survey conducted in Accra as well. It has `r nrow(waterpoints)` observations and `r ncol(waterpoints)` variables. For an overview of the variable names, see the following table.\nobservations and `r ncol(households)` variables. \n```{r echo=FALSE, message=FALSE, warning=FALSE}\nreadr::read_csv(\"data-raw/dictionary.csv\") |\u003e\n  dplyr::filter(file_name == \"waterpoints.rda\") |\u003e\n  dplyr::select(variable_name:description) |\u003e \n  knitr::kable() |\u003e \n  kableExtra::kable_styling(\"striped\") |\u003e\n   kableExtra::scroll_box(height = \"400px\")\n```\n## Example\n\nHere is an example illustrating health risks associated with the water samples collected in Accra.\n\n```{r}\nlibrary(watercostaccra)\nlibrary(ggplot2)\nlibrary(dplyr)\nlibrary(tidyr)\n\nlong_data \u003c- waterpoints |\u003e \n  pivot_longer(cols = c(coli_mpn_health_risk, tc_mpn_health_risk),\n               names_to = \"risk_type\",\n               values_to = \"health_risk\")\n\n# Count occurrences of each health_risk category within each community and risk_type\ncount_data \u003c- long_data |\u003e \n  group_by(community, risk_type, health_risk) |\u003e \n  summarise(count = n(), .groups = 'drop')\n\nfacet_labels \u003c- c(\n  coli_mpn_health_risk = \"Coliform MPN health risk\",\n  tc_mpn_health_risk = \"Total Coliform MPN health risk\"\n)\n\n# Create the bar plot\nggplot(count_data, aes(x = community, y = count, fill = health_risk)) +\n  geom_bar(stat = \"identity\", position = \"dodge\") +\n  facet_wrap(~ risk_type, labeller = labeller(risk_type = facet_labels)) +\n  labs(title = \"Health risk assessment by community\",\n       x = \"community\",\n       y = \"count\",\n       fill = \"health risk\") +\n  scale_fill_brewer(palette = \"Dark2\") +\n  theme_minimal()\n\n```\n\n\n## License\n\nData are available as\n[CC-BY](https://github.com/openwashdata/watercostaccra/blob/main/LICENSE.md).\n\n\n## Citation\n\nPlease cite this package using:\n\n```{r}\ncitation(\"watercostaccra\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenwashdata%2Fwatercostaccra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenwashdata%2Fwatercostaccra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenwashdata%2Fwatercostaccra/lists"}