Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bisaloo/contactdata
R package with social contact data for 177 regions (Prem et al. 2017; Prem et al. 2021)
https://github.com/bisaloo/contactdata
demographics epidemiology r-package social-sciences
Last synced: about 2 months ago
JSON representation
R package with social contact data for 177 regions (Prem et al. 2017; Prem et al. 2021)
- Host: GitHub
- URL: https://github.com/bisaloo/contactdata
- Owner: Bisaloo
- License: other
- Created: 2020-09-05T09:52:13.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-26T07:24:13.000Z (3 months ago)
- Last Synced: 2024-10-24T16:18:32.688Z (about 2 months ago)
- Topics: demographics, epidemiology, r-package, social-sciences
- Language: R
- Homepage: http://hugogruson.fr/contactdata/
- Size: 11.3 MB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# contactdata
[![cran version](https://www.r-pkg.org/badges/version-ago/contactdata)](https://cran.r-project.org/package=contactdata/)
[![R-CMD-check](https://github.com/Bisaloo/contactdata/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Bisaloo/contactdata/actions/workflows/R-CMD-check.yaml)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html)
[![Codecov test coverage](https://codecov.io/gh/Bisaloo/contactdata/branch/main/graph/badge.svg)](https://app.codecov.io/gh/Bisaloo/contactdata?branch=main)The goal of contactdata is to provide access to social contact data for 177
countries. This data comes from> Kiesha Prem, Alex R. Cook, Mark Jit, *Projecting social contact matrices in
152 countries using contact surveys and demographic data*, PLoS Comp. Biol.
(2017), https://doi.org/10.1371/journal.pcbi.1005697.and
> Kiesha Prem, Kevin van Zandvoort, Petra Klepac, Rosalind M. Eggo, Nicholas G.
Davies, CMMID COVID-19 Working Group, Alex R. Cook, Mark Jit, *Projecting
contact matrices in 177 geographical regions: An update and comparison with
empirical data for the COVID-19 era*, PLoS Comp. Biol. (2021),
https://doi.org/10.1371/journal.pcbi.1009098.(please cite them in your publications, alongside this package).
**Note that this package does not make any geopolitical statement and only
provides the data as it has been published.**<contactdata offers an easier access to this data, makes it readily compatible
with [tidyverse](https://www.tidyverse.org/) packages, such as
[ggplot2](https://ggplot2.tidyverse.org/), via the `contact_countries()`
function, and provides an easy way to harmonise country nomenclature by using
the [countrycode](https://cran.r-project.org/package=countrycode) package as
authoritative name source.## Installation
You can install this package from CRAN:
```{r, eval = FALSE}
install.packages("contactdata")
```or the development version from [GitHub](https://github.com/bisaloo), via my
[r-universe](https://bisaloo.r-universe.dev/):```{r, eval = FALSE}
install.packages("contactdata", repos = "https://bisaloo.r-universe.dev")
```## Example
The most basic function allows you to get matrix data for a specific country:
```{r example}
library(contactdata)
contact_matrix("France")
```You can also get several countries at once with the `contact_df_countries()`
function, as detailed in the
[vignette](https://hugogruson.fr/contactdata/articles/visualise_contact.html).Because it is very likely that users of this package will also need data about
the population in each age group, it is also bundled in this package for
convenience. Please see `?age_df_countries` for more information.