compute_layer_degree_description#

compute_layer_degree_description(pop, layer='H', ages=None, uids=None, uids_included=None, degree_df=None, percentiles=None)[source]#

Compute a description of the statistics for the degree distribution by age for a layer in the population contact network. See pandas.Dataframe.describe() for more details on all of the statistics included by default.

Parameters:
  • pop (sp.Pop) – population

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

  • ages (list or array) – ages of people to include

  • uids (list or array) – ids of people to include

  • uids_included (list or None) – pre-calculated mask of people to include

  • degree_df (dataframe) – pandas dataframe of people in the layer and their uid, age, degree, and ages of their contacts in the layer

  • percentiles (list) – list of the percentiles to include as statistics

Returns:

A pandas DataFrame of the statistics for the layer degree distribution by age.

Return type:

pandas.DataFrame