NEWS.md
The contact_matrix()
function now formats age groups as [low,high)
, when they previously were formatted as low_high
(#20).
The age dataset in age_df_countries()
no longer regroup the [75,80)
, [80,85)
, [85,90)
, [90,95)
and [95,100)
age groups into a single 75+
age group (#20).
Some country names have been aligned with the authoritative upstream source we are using (the countrycode R package). This might result in some changes in a handful of situations (see #20 for the list of affected countries). You can sill rely on the list_countries()
function for a comprehensive up-to-date list of covered countries.
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
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
The updated data from Prem et al. (2021) has been added (#4). This results in a large number of cascading changes, including some breaking changes, detailed below.
contact_df_countries()
have been removed and replaced by ...
to increase flexibility. This is only an interface change and does not modify the behaviour since all arguments were already forwarded to contact_matrix()
.list_countries()
and contact_matrix()
now have two additional arguments:
geographic_setting
, which specifies if you’d like to get the contact data from a "rural"
, "urban"
setting, or from "all"
settings.data_source
, which indicates if the data should be extracted from Prem et al. (2017) or Prem et al. (2021)age_df_countries()
to get population by age for all the countries for which we provide contact data. This is motivated by the fact that models using contact data by age will almost surely need population data by age as well.