Adding Age, Height, Weight attributes to the synthetic dataset
age_height_weight.py
helps us add age, height, and weight to the synthetic dataset. It has the following functions.
def load_data(synthetic_pop:str,ihds:str) -> Tuple[DataFrame,DataFrame]:
Loads the IHDS and synthetic population data.
def modify_age_gender(synthetic_population:DataFrame) -> DataFrame:
Adds age and gender labels in accordance to the values
def renaming_columns(ihds_df:DataFrame) -> DataFrame:
Selects a subset of relevant colums, and maps them to a better naming convetion
def boundary_df(ihds_df:DataFrame, district:str) -> Tuple(DataFrame,DataFrame):
Create a boundary dataframe according to district,sex
def assign_height_weight(df:DataFrame, sex:str, parameter:str):
Assign height and weight to individuals in proportion to age and gender