assign_uids_by_homes#

assign_uids_by_homes(homes, id_len=16, use_int=True)[source]#

Assign IDs to everyone in order by their households.

Parameters:
  • homes (array) – The generated synthetic ages of household members.

  • id_len (int) – The length of the UID.

  • use_int (bool) – If True, use ints for the uids of individuals; otherwise use strings of length ‘id_len’.

Returns:

A copy of the generated households with IDs in place of ages, and a dictionary mapping ID to age.