https://github.com/openwashdata/fslogisticskampala
Data on faecal sludge transporting logistics in Kampala, Uganda
https://github.com/openwashdata/fslogisticskampala
Last synced: 4 months ago
JSON representation
Data on faecal sludge transporting logistics in Kampala, Uganda
- Host: GitHub
- URL: https://github.com/openwashdata/fslogisticskampala
- Owner: openwashdata
- License: cc-by-4.0
- Created: 2024-07-18T07:54:04.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-27T10:50:45.000Z (over 1 year ago)
- Last Synced: 2025-09-04T19:07:22.705Z (9 months ago)
- Language: R
- Homepage: https://openwashdata.github.io/fslogisticskampala/
- Size: 2.04 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
- Citation: CITATION.cff
Awesome Lists containing this project
README
---
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'
)
```
# fslogisticskampala
[](https://creativecommons.org/licenses/by/4.0/)
[](https://github.com/openwashdata/fslogisticskampala/actions/workflows/R-CMD-check.yaml)
The goal of fslogisticskampala is to provide data sources on faecal sludge transporting logistics in Kampala, Uganda collected from 30th March 2015 until 25th June 2015.
## Installation
You can install the development version of fslogisticskampala from
[GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("openwashdata/fslogisticskampala")
```
```{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/fslogisticskampala/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 two datasets `trips` and `trucks`.
```{r}
library(fslogisticskampala)
```
### trips
The dataset `trips` contains data about the GPS locations of faecal sludge trucks collecting sludge from pit latrines and septic tanks in Kampala, Uganda. Each trip is recorded with a unique identifier, the numberplate of the truck, the date and time of the record. Data was collected from 30th March 2015 until 25th June 2015.
It has `r nrow(trips)` observations and `r ncol(trips)` variables
```{r}
trips |>
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 == "trips.rda") |>
dplyr::select(variable_name:description) |>
knitr::kable() |>
kableExtra::kable_styling("striped") |>
kableExtra::scroll_box(height = "200px")
```
### trucks
The dataset `trucks` contains data about additional information on the volume of each truck used in the dataset `trips`.
It has `r nrow(trucks)` observations and `r ncol(trucks)` variables
```{r}
trucks |>
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 == "trucks.rda") |>
dplyr::select(variable_name:description) |>
knitr::kable() |>
kableExtra::kable_styling("striped") |>
kableExtra::scroll_box(height = "200px")
```
## Example
```{r}
library(fslogisticskampala)
library(ggplot2)
library(lubridate)
aus <- trips |>
dplyr::filter(numberplate == "AUS 119X") |>
dplyr::filter(date < ymd("2015-04-06"))
ggplot(aus, aes(x = lon, y = lat, color = date)) +
geom_point() +
labs(title = "GPS Locations of Faecal Sludge Trucks",
x = "Longitude",
y = "Latitude",
color = "Treatment Plant") +
theme_minimal()
# Provide some example code here
```
## License
Data are available as
[CC-BY](https://github.com/openwashdata/fslogisticskampala/blob/main/LICENSE.md).
## Citation
Please cite this package using:
```{r}
citation("fslogisticskampala")
```