contactdata

R package with social contact data for 177 regions (Prem et al. 2017; Prem et al. 2021)

https://github.com/socialcontactdata/contactdata

Science Score: 39.0%

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

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.3%) to scientific vocabulary

Keywords

demographics epidemiology r-package social-sciences
Last synced: 6 months ago · JSON representation

Repository

R package with social contact data for 177 regions (Prem et al. 2017; Prem et al. 2021)

Basic Info
Statistics
  • Stars: 9
  • Watchers: 3
  • Forks: 2
  • Open Issues: 3
  • Releases: 4
Topics
demographics epidemiology r-package social-sciences
Created over 5 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog License

README.Rmd

---
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/socialcontactdata/contactdata/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/socialcontactdata/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.

Owner

  • Name: socialcontactdata
  • Login: socialcontactdata
  • Kind: organization

GitHub Events

Total
  • Delete event: 1
  • Issue comment event: 1
  • Pull request event: 1
  • Create event: 1
Last Year
  • Delete event: 1
  • Issue comment event: 1
  • Pull request event: 1
  • Create event: 1

Dependencies

DESCRIPTION cran
  • R >= 3.5 depends
  • countrycode * suggests
  • covr * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • spelling * suggests
  • testthat >= 3.0.0 suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/render-readme.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/lint-changed-files.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite