Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .Rhistory
Original file line number Diff line number Diff line change
@@ -1,2 +1,50 @@
library(washr)
setup_rawdata()
library(washr)
devtools::build_readme()
devtools::document()
devtools::check()
devtools::install()
setup_website()
# Required Libraries
library(tidyverse)
library(leaflet)
# Clean and prepare the data
df_clean <- floodresponsemw %>%
# Filter out records missing coordinates
filter(!is.na(latitude), !is.na(longitude)) %>%
# Assign colors based on functional status
mutate(
status_color = case_when(
functional_status == "Functional" ~ "green",
functional_status == "Not functional" ~ "red",
TRUE ~ "gray" # Unknown or missing status
)
)
# Create an interactive map using leaflet
leaflet(df_clean) %>%
addTiles() %>% # Add default OpenStreetMap tiles
addCircleMarkers(
lng = ~longitude,
lat = ~latitude,
color = ~status_color, # Color by functional status
radius = ~log(total_users_of_water_point + 1) * 2,
stroke = FALSE,
fillOpacity = 0.7,
# Add popups showing basic water point info
popup = ~paste0(
"<b>Water Point:</b> ", water_point_name, "<br>",
"<b>Status:</b> ", functional_status, "<br>",
"<b>Total Users:</b> ", total_users_of_water_point
)
) %>%
# Add a legend for functional status
addLegend(
"bottomright",
colors = c("green", "red", "gray"),
labels = c("Functional", "Not Functional", "Unknown"),
title = "Water Point Status"
)
devtools::document()
devtools::check()
devtools::install()
8 changes: 6 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ knitr::opts_chunk$set(
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/.svg)](https://zenodo.org/doi/)

<!-- badges: end -->

This dataset contains detailed field-level information on the status and
Expand Down Expand Up @@ -131,15 +132,18 @@ read_csv("data-raw/dictionary.csv") |>

## Data

The package provides access to field-level assessment data on rural water point infrastructure in Malawi. It was collected as part of the USAID Flood Response program in 2019 - 2020
The package provides access to field-level assessment data on rural
water point infrastructure in Malawi. It was collected as part of the
USAID Flood Response program in 2019 - 2020

```{r}
library(floodresponsemw)
```

### floodresponsemw

The dataset `floodresponsemw` has `r nrow(floodresponsemw)` observations and `r ncol(floodresponsemw)` variables
The dataset `floodresponsemw` has `r nrow(floodresponsemw)` observations
and `r ncol(floodresponsemw)` variables

```{r}
floodresponsemw |>
Expand Down
22 changes: 12 additions & 10 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

624 changes: 624 additions & 0 deletions docs/CLAUDE.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/deps/bootstrap-5.3.1/bootstrap.min.css

Large diffs are not rendered by default.

69 changes: 35 additions & 34 deletions docs/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pandoc: '3.4'
pkgdown: 2.1.1
pkgdown: 2.1.3
pkgdown_sha: ~
articles: {}
last_built: 2025-06-27T13:15Z
last_built: 2025-10-24T07:43Z
urls:
reference: https://github.com/openwashdata/floodresponsemw/reference
article: https://github.com/openwashdata/floodresponsemw/articles
4 changes: 2 additions & 2 deletions docs/reference/floodresponsemw.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading