get_contact_matrix#

get_contact_matrix(datadir, setting_code, sheet_name=None, file_path=None, delimiter=' ', header=None)[source]#

Get setting specific age contact matrix given sheet name to use. If file_path is given, then delimiter and header should also be specified.

Parameters:
  • datadir (string) – file path to the data directory

  • setting_code (string) – name of the physial contact setting: H for households, S for schools, W for workplaces, C for community or other

  • sheet_name (string) – name of the sheet in the excel file with contact patterns

  • file_path (string) – file path to user specified age contact matrix

  • delimiter (string) – delimter for the contact matrix file

  • header (int) – row number for the header of the file

Returns:

Matrix of contact patterns where each row i is the average contact patterns for an individual in age bracket i and the columns represent the age brackets of their contacts. The matrix element i,j is then the contact rate, number, or frequency for the average individual in age bracket i with all of their contacts in age bracket j in that physical contact setting.

Return type:

ndarray