Closed sanderbroos closed 1 year ago
At the moment we don't store the size of the household on the individual object, but we do store the household ID. The table of individual attributes (including household ID) can be obtained by using the method get_individuals
on the model object (via either the Python or R interface). Generating a lookup table of household size should then be a one-liner in pandas/dataframe.
Hi, I am trying to use a user's household size (number of people in their household) as an attribute for my research. At the moment I accomplish this by, at the start of every run, reading baseline_household_demographics.csv (which has household data per age group), summing over each row to get the total counts, and creating a new list which I then index into using the user's household id every time I need a user's household size. This feels like a bit of a workaround, so I was wondering if there is a simpler way to directly access this property per user.
Kind regards, Sander