Dear all,
I have the following dataset for about 600 household:
I would to manipulate the data to take the following shape:
I am not sure how I could transform the data to take this shape and would greatly appreciate your help on this. Also please note that some households have up to 13 members within it.
Thank you in advance.
I have the following dataset for about 600 household:
Key | Village | Nursery | hh_address | parent_interviewed | mobile number | Parent name | age_parent | hh_members | name_1 | hh_gender_1 | hh_relationship_1 | age_calc_1 | name_2 | hh_gender_2 | hh_relationship_2 | age_calc_2 | name_3 | hh_gender_3 | hh_relationship_3 | age_calc_3 | name_4 | hh_gender_4 | hh_relationship_4 | age_calc_4 |
1248674fh49bg845624120 | Beba | Ndaa | 10 st. sham el zein | Mother | 999 | Amira |
24 |
4 | Mohsen |
Male |
Husband/wife | 30 | Asmaa |
Female | son/daughter |
15 | Omar | Male | son/daughter | 4 | Mai | Female | Mother/Father | 65 |
3545674groxzbg84149789 | Beba | Shenwya | the ghalfia street behind the bakery | Mother | 12193719371 | Samia | 32 | 2 | Sayed | Male | Husband/wife | 36 |
Zaki | Male | son/daughter | 3 | ||||||||
1145674bwbzng84567904 | Bndr | Om el Kora | Al amal street | Husband | 18369458264 | Omar | 35 | 3 | Saffa | Female | Husband/wife | 27 | Salma | Male | son/daughter | 2.5 | Amira | Female | son/daughter | 0.5 |
I would to manipulate the data to take the following shape:
Key | Village | Nursery | hh_address | Parent_interviewed | Mobile number | Parent name | age_parent | hh_members | name | gender | hh_relationship | age_calc |
1248674fh49bg845624120 | Beba | Ndaa | 10 st. sham el zein | Mother | 999 | Amira | 24 | 4 | Mohsen | Male | Husband/wife | 30 |
1248674fh49bg845624120 | Beba | Ndaa | 10 st. sham el zein | Mother | 999 | Amira | 24 | 4 | Asmaa | Female | son/daughter | 15 |
1248674fh49bg845624120 | Beba | Ndaa | 10 st. sham el zein | Mother | 999 | Amira | 24 | 4 | Omar | Male | son/daughter | 4 |
1248674fh49bg845624120 | Beba | Ndaa | 10 st. sham el zein | Mother | 999 | Amira | 24 | 4 | Mai | Female | Mother/Father | 65 |
3545674groxzbg84149789 | Beba | Shenwya | the ghalfia street behind the bakery | Mother | 12193719371 | Samia | 32 | 2 | Sayed | Male | Husband/wife | 36 |
3545674groxzbg84149789 | Beba | Shenwya | the ghalfia street behind the bakery | Mother | 12193719371 | Samia | 32 | 2 | Zaki | Male | son/daughter | 3 |
1145674bwbzng84567904 | Bndr | Om el Kora | Al amal street | husband | 1836945826 | Omar | 35 | 3 | saffa | Female | Husband/wife | 27 |
1145674bwbzng84567904 | Bndr | Om el Kora | Al amal street | husband | 1836945826 | Omar | 35 | 3 | Salma | Male | Son / daughter | 2.5 |
1145674bwbzng84567904 | Bndr | Om el Kora | Al amal street | husband | 1836945826 | Omar | 35 | 3 | Amira | Female | son/daughter | 0.5 |
Thank you in advance.
Comment