choleramalawi
Data package tracking the course of the cholera epidemic in Malawi (2023-24)
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.5%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
·
Repository
Data package tracking the course of the cholera epidemic in Malawi (2023-24)
Basic Info
- Host: GitHub
- Owner: openwashdata
- License: cc-by-4.0
- Language: R
- Default Branch: main
- Homepage: https://openwashdata.github.io/choleramalawi/
- Size: 1.31 MB
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'
)
```
# choleramalawi
[](https://creativecommons.org/licenses/by/4.0/)
[](https://zenodo.org/doi/10.5281/zenodo.13920530)
The goal of choleramalawi is to analyse the progress of the Cholera epidemic in Malawi (2023-24)
## Installation
You can install the development version of choleramalawi from
[GitHub](https://github.com/) with:
``` {r eval=FALSE}
# install.packages("devtools")
devtools::install_github("openwashdata/choleramalawi")
```
```{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)
library(rnaturalearth)
library(rnaturalearthdata)
library(sf)
library(RColorBrewer)
#devtools::load_all()
```
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/choleramalawi/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 one dataset `choleramalawi`. It contains data on the progress of the cholera epidemic in each district of Malawi during 2022-23. The data focuses on cases and deaths for every week as well as cumulative cases and deaths.
```{r}
library(choleramalawi)
```
### choleramalawi
The dataset `choleramalawi` contains data about the progress of the cholera epidemic in Malawi (2022-23).
It has `r nrow(choleramalawi)` observations and `r ncol(choleramalawi)` variables
```{r}
choleramalawi |>
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 == "choleramalawi.rda") |>
dplyr::select(variable_name:description) |>
knitr::kable() |>
kableExtra::kable_styling("striped") |>
kableExtra::scroll_box(height = "200px")
```
## Example
```{r}
library(choleramalawi)
# Top districts by total cases
choleramalawi |>
group_by(district) |>
summarise(total_cases = sum(cases, na.rm = TRUE)) |>
arrange(desc(total_cases)) |>
head(10) |>
gt() |>
as_raw_html()
```
```{r}
# Plotting the number of cases over time in Lilongwe district
library(ggplot2)
choleramalawi |>
filter(district == "Lilongwe") |>
ggplot(aes(x = week, y = cases)) +
geom_line() +
labs(title = "Number of cases over time in Lilongwe district",
x = "Week",
y = "Cases")
```
```{r}
# Plot a map of districts of Malawi colored by the number of cases
total_cases_district <- choleramalawi |>
group_by(district) |>
summarise(total_cases = sum(cases, na.rm = TRUE)) |>
mutate(total_cases = ifelse(is.na(total_cases), 0, total_cases))
malawi_map <- ne_states(country = "Malawi", returnclass = "sf")
malawi_map <- malawi_map %>%
left_join(total_cases_district, by = c("name" = "district"))
ggplot(malawi_map) +
geom_sf(aes(fill = total_cases)) +
scale_fill_viridis_c(guide="none") +
theme_void() +
labs(title = "Cholera Cases by District in Malawi")
```
## License
Data are available as
[CC-BY](https://github.com/openwashdata/choleramalawi/blob/main/LICENSE.md).
## Citation
Please cite this package using:
```{r}
citation("choleramalawi")
```
Owner
- Name: openwashdata
- Login: openwashdata
- Kind: organization
- Repositories: 1
- Profile: https://github.com/openwashdata
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 "choleramalawi" in publications use:'
type: software
title: 'choleramalawi: Progress Of Cholera Epidemic in Malawi 2022-23'
version: 0.1.0
doi: 10.5281/zenodo.13920530
abstract: A dataset that tracks the progress of the cholera epidemic in each district of Malawi in 2022-23.
authors:
- family-names: Dubey
given-names: Yash
email: ydubey@ethz.ch
orcid: https://orcid.org/0009-0001-2849-970X
contact:
- family-names: Dubey
given-names: Yash
email: ydubey@ethz.ch
orcid: https://orcid.org/0009-0001-2849-970X
references:
- type: software
title: 'R: A Language and Environment for Statistical Computing'
notes: Depends
url: https://www.R-project.org/
authors:
- name: R Core Team
location:
name: Vienna, Austria
year: '2023'
institution:
name: R Foundation for Statistical Computing
version: '>= 2.10'
GitHub Events
Total
- Commit comment event: 1
- Issues event: 1
- Issue comment event: 1
- Push event: 3
- Pull request event: 2
- Fork event: 1
Last Year
- Commit comment event: 1
- Issues event: 1
- Issue comment event: 1
- Push event: 3
- Pull request event: 2
- Fork event: 1
Dependencies
DESCRIPTION
cran
- R >= 2.10 depends