Social Contact Matrices for 177 Countries
Overview
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.
Bug fix
age_df_countries()now pads single-digit ages with a leading 0 to ensure
correct ordering. The new behaviour also produces age bin labels that are
consistent with the labels for the contact matrices
Before:
```
country age population
945 France 70_74 3611581
946 France 65_69 3915473
947 France 60_64 4123982
948 France 5_9 4179215
949 France 55_59 4344144
Show all changes in 1.1.0Hide the rest of the changes in 1.1.0
950 France 50_54 4445007
951 France 45_49 4490632
952 France 40_44 3991502
953 France 35_39 4097635
954 France 30_34 4036630
955 France 25_29 3920126
956 France 20_24 3959154
957 France 15_19 4100855
958 France 10_14 4201067
959 France 0_4 4070454
960 France 75+ 6352464
```
After:
```
country age population
945 France 00_04 4070454
946 France 05_09 4179215
947 France 10_14 4201067
948 France 15_19 4100855
949 France 20_24 3959154
950 France 25_29 3920126
951 France 30_34 4036630
952 France 35_39 4097635
953 France 40_44 3991502
954 France 45_49 4490632
955 France 50_54 4445007
956 France 55_59 4344144
957 France 60_64 4123982
958 France 65_69 3915473
959 France 70_74 3611581
960 France 75+ 6352464
```
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 5 (1 internal)includes a package overview page
- Examples that run
- 100%4 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 80%
Downloads
Repository
Moved from bisaloo/contactdata.
- PRs merged (all time)
- 91%
- Median days to close, 50 most recently updated closed issues
- 51
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
13 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/bisaloo/contactdata on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2025-07-11 · The repository has a site deploy workflow
Show all practicesHide 3 practices
Dependencies
Installing contactdata adds no packages beyond those that come with R.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 1.1.0Latest
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 1.0.02023-03-22 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.2.0
- 0.12020-09-23
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2020-09-23
- Total releases
- 4 / 6 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.5.0
- Download size
- 4.0 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("contactdata")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.