Package 'contactdata'

Title: Social Contact Matrices for 177 Countries
Description: Data package for the supplementary data in Prem et al. (2017) <doi:10.1371/journal.pcbi.1005697> and Prem et al. <doi:10.1371/journal.pcbi.1009098>. Provides easy access to contact data for 177 countries, for use in epidemiological, demographic or social sciences research.
Authors: Hugo Gruson [cre, aut, cph] , Kiesha Prem [dtc] , Alex Richard Cook [dtc] , Mark Jit [dtc]
Maintainer: Hugo Gruson <[email protected]>
License: MIT + file LICENSE
Version: 1.1.0.9000
Built: 2024-09-26 08:18:59 UTC
Source: https://github.com/bisaloo/contactdata

Help Index


Get a data.frame (in long format) of population by age for multiple countries

Description

Get a data.frame (in long format) of population by age for multiple countries

Usage

age_df_countries(countries)

Arguments

countries

A character string or a vector of character containing the names of the countries for which to return contact data

Value

A data.frame (in long format) with 3 columns:

  • country: the country name

  • age: the age group

  • population: the number of people in this age group

References

https://www.census.gov/programs-surveys/international-programs/about/idb.html

Examples

age_df_countries(c("Austria", "Belgium"))

Get a data.frame (in long format) of contact data for multiple countries

Description

Get a data.frame (in long format) of contact data for multiple countries

Usage

contact_df_countries(countries, ...)

Arguments

countries

A character string or a vector of character containing the names of the countries for which to return contact data

...

Arguments passed to contact_matrix()

Value

A data.frame (in long format) with 4 columns:

  • country: the country name

  • age_from: the age group of individual

  • age_to: the age group of contact

  • contact: the intensity of contact

References

Kiesha Prem, Alex R. Cook, Mark Jit, Projecting social contact matrices in 152 countries using contact surveys and demographic data, PLoS Comp. Biol. (2017), doi:10.1371/journal.pcbi.1005697

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), doi:10.1371/journal.pcbi.1009098.

Examples

contact_df_countries(c("Austria", "Belgium"), location = "all")

Get contact data matrix for a specific country

Description

Get contact data matrix for a specific country

Usage

contact_matrix(
  country,
  location = c("all", "home", "school", "work", "other"),
  geographic_setting = c("all", "rural", "urban"),
  data_source = c("2020", "2017")
)

Arguments

country

Character. The name of the country for which you want contact data.

location

Character. One of "all" (default), "home", "school", "work" or "other".

geographic_setting

Character. One of "all" (default), "rural", "urban"

data_source

Character. Either "202O" (default) or "2017"

Value

A square (16 by 16) matrix containing the contact data between the different age classes for a given country.

References

Kiesha Prem, Alex R. Cook, Mark Jit, Projecting social contact matrices in 152 countries using contact surveys and demographic data, PLoS Comp. Biol. (2017), doi:10.1371/journal.pcbi.1005697

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), doi:10.1371/journal.pcbi.1009098.

Examples

contact_matrix("France", location = "all")

contact_matrix("Belgium", location = "school")

Get the list of countries included in the dataset

Description

Get the list of countries included in the dataset

Usage

list_countries(
  geographic_setting = c("all", "rural", "urban"),
  data_source = c("2020", "2017")
)

Arguments

geographic_setting

Character. One of "all" (default), "rural", "urban"

data_source

Character. Either "202O" (default) or "2017"

Value

A character vector with the name of all countries included in the dataset

Note

This package uses the nomenclature from the countrycode package. If your names differ from the names used here, you should use countrycode as well to update them.

References

Kiesha Prem, Alex R. Cook, Mark Jit, Projecting social contact matrices in 152 countries using contact surveys and demographic data, PLoS Comp. Biol. (2017), doi:10.1371/journal.pcbi.1005697

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), doi:10.1371/journal.pcbi.1009098.

Examples

list_countries()