unhcrwash

A dataset of WASH indicators in refugee camps

https://github.com/openwashdata/unhcrwash

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.3%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

A dataset of WASH indicators in refugee camps

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.Rmd

---
output: github_document
always_allow_html: true
editor_options: 
  markdown: 
    wrap: 72
  chunk_output_type: console
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%",
  message = FALSE,
  warning = FALSE,
  fig.retina = 2,
  fig.align = 'center'
)
```

# unhcrwash



[![License: CC BY
4.0](https://img.shields.io/badge/License-CC_BY_4.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14185117.svg)](https://zenodo.org/doi/10.5281/zenodo.14185117)


The goal of unhcrwash is to make available data on WASH indicators in refugee camps and settlements.

## Installation

You can install the development version of unhcrwash from
[GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("openwashdata/unhcrwash")
```

```{r}
## 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.

```{r, echo=FALSE, message=FALSE, warning=FALSE}

extdata_path <- "https://github.com/openwashdata/unhcrwash/raw/main/inst/extdata/"

read_csv("data-raw/dictionary.csv") |> 
  distinct(file_name) |> 
  dplyr::mutate(file_name = str_remove(file_name, ".rda")) |> 
  dplyr::rename(dataset = file_name) |> 
  mutate(
    CSV = paste0("[Download CSV](", extdata_path, dataset, ".csv)"),
    XLSX = paste0("[Download XLSX](", extdata_path, dataset, ".xlsx)")
  ) |> 
  knitr::kable()

```

## Data

The package provides access to WASH indicators in refugee camps and settlements 

```{r}
library(unhcrwash)
```

### unhcrwash

The dataset `unhcrwash` contains data about WASH indicators in refugee camps and settlements.
It has `r nrow(unhcrwash)` observations and `r ncol(unhcrwash)` variables

```{r}
unhcrwash |> 
  head(3) |> 
  gt::gt() |>
  gt::as_raw_html()
```

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

```{r echo=FALSE, message=FALSE, warning=FALSE}
readr::read_csv("data-raw/dictionary.csv") |>
  dplyr::filter(file_name == "unhcrwash.rda") |>
  dplyr::select(variable_name:description) |> 
  knitr::kable() |> 
  kableExtra::kable_styling("striped") |> 
  kableExtra::scroll_box(height = "200px")
```


## Example

```{r}
library(unhcrwash)

# Average Water Availability by Country 
unhcrwash |> dplyr::group_by(country) |> 
  dplyr::summarise(avg_water_avail = mean(liters_per_person_per_day, na.rm = TRUE)) |> 
  dplyr::arrange(desc(avg_water_avail)) |> 
  head(5) |> 
  gt::gt() |> 
  gt::as_raw_html()
```

```{r}
library(ggplot2)
# Toilet availability
unhcrwash |> 
  dplyr::mutate(year = lubridate::year(as.Date(start_date))) |>  # Extract year as whole number
  dplyr::filter(!is.na(year) & !is.na(persons_per_toilet)) |>    # Remove missing values
  dplyr::group_by(year) |> 
  dplyr::summarise(avg_persons_per_toilet = mean(persons_per_toilet, na.rm = TRUE)) |> 
  ggplot2::ggplot(aes(x = year, y = avg_persons_per_toilet)) +
  ggplot2::geom_line() +
  ggplot2::labs(title = "Average Persons per Toilet in Refugee Camps",
                x = "Year",
                y = "Average persons per toilet") +
  ggplot2::theme_minimal()
```

```{r}
# Countries with highest refugee populations
unhcrwash |> 
  dplyr::group_by(country) |> 
  dplyr::summarise(total_population = sum(refugee_pop, na.rm = TRUE)) |> 
  dplyr::arrange(desc(total_population)) |> 
  head(5) |> 
  gt::gt() |> 
  gt::as_raw_html()
```


## License

Data are available as
[CC-BY](https://github.com/openwashdata/unhcrwash/blob/main/LICENSE.md).

## Citation

Please cite this package using:

```{r}
citation("unhcrwash")
```

Owner

  • Name: openwashdata
  • Login: openwashdata
  • Kind: organization

Citation (CITATION.cff)

# --------------------------------------------
# CITATION file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# --------------------------------------------

cff-version: 1.2.0
message: 'To cite package "unhcrwash" in publications use:'
type: software
license: CC-BY-4.0
title: 'unhcrwash: WASH Data From Refugee Camps and Settlements (UNHCR)'
version: 0.1.0
doi: '10.5281/zenodo.14185117'
abstract: This is a dataset on WASH indicators in refugee camps and settlements. The
  data is collected from the UNHCR Information Management System (IRIS) and is available
  on the UNHCR WASH dashboard. This dataset includes data from 191 sites and 29 countries.
repository-code: https://github.com/openwashdata/unhcrwash
url: https://github.com/openwashdata/unhcrwash
date-released: '2024-11-13'
authors:
  - family-names: Dubey
    given-names: Yash
    orcid: https://orcid.org/0009-0001-2849-970X

GitHub Events

Total
  • Release event: 1
  • Public event: 1
  • Push event: 3
  • Create event: 1
Last Year
  • Release event: 1
  • Public event: 1
  • Push event: 3
  • Create event: 1