count_layer_degree#

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

Create a dataframe from the population of people in the layer, including their uid, age, degree, and the ages of contacts in the layer.

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

Returns:

A pandas DataFrame of people in the layer including uid, age, degree, and the ages of contacts in the layer.

Return type:

pandas.DataFrame