def recodeSizeNonvacantVect(): name = CC.HHSIZE_NONVACANT_VECT size_range = range(1, 8) sizedict = HHSizeAttr.getLevels() size_groupings = getSubsetTuples(sizedict, size_range) groupings = dict(size_groupings) return name, groupings
def sizex0(self): name = "sizex0" size_range = range(1, 8) sizedict = self.getLevels()[SIZE] size_groupings = sk.getSubsetTuples(sizedict, size_range) groupings = {SIZE: dict(size_groupings)} return name, groupings
def recodeSizeNotAloneVect(): name = CC.HHSIZE_NOTALONE_VECT size_range = range(2, 8) sizedict = HHSizeAttr.getLevels() size_groupings = getSubsetTuples(sizedict, size_range) groupings = dict(size_groupings) # Shouldn't it just be # SIZE: {"sizes above 1": size_range} ?? return name, groupings
def sizex01(self): name = "sizex01" size_range = range(2, 8) sizedict = self.getLevels()[SIZE] size_groupings = sk.getSubsetTuples(sizedict, size_range) groupings = { SIZE: dict(size_groupings) # Shouldn't it just be # SIZE: {"sizes above 1": size_range} } return name, groupings
def gqlevels(self): name = "gqlevels" gqdict = self.getLevels()[HHGQ] gq_range = range(1,8) gq_groupings = sk.getSubsetTuples(gqdict, gq_range) groupings = { HHGQ: dict(gq_groupings) } return name, groupings
def gqlevels(self): """ subset the hhgq variable to only grab the GQ levels """ name = "gqlevels" reldict = self.getLevels()[HHGQ] gq_range = range(1, 8) gq_groupings = sk.getSubsetTuples(reldict, gq_range) groupings = {HHGQ: dict(gq_groupings)} return name, groupings
def gqlevels(self): """ subset the HHGQ variable to only grab the GQ levels """ name = DHCP.GQLEVELS reldict = self.getLevels()[HHGQ] gq_range = list(range(1, 8)) gq_groupings = sk.getSubsetTuples(reldict, gq_range) groupings = {HHGQ: dict(gq_groupings)} return name, groupings
def gqhh(self): name = "gqhh" reldict = self.getLevels()[HHGQ] rel_range = range(0, 1) rel_group = [("Household", list(rel_range))] gq_range = range(1, 8) gq_group = sk.getSubsetTuples(reldict, gq_range) group = rel_group + gq_group groupings = {HHGQ: dict(group)} return name, groupings