I have a file from an api that gets updated on a daily basis, hence, I do not wish to download the csv frequently and rather prefer to use the API (csv format file) link directly for importing in Stata . My data currently looks like-
and I wish to import data in the following format-
Is there anyway I can do this neatly in Stata without manually adjusting the excel- it is a huge data being updated on a daily basis. Can't reshape. Any guidance is greatly appreciated.
Thanks.
District_Key | Key | District | 16/01/2021 | 16/01/2021 | 16/01/2021 |
First Dose Administered | second Dose Administered | total | |||
an_n | name_one | one | 0 | ||
an_ns | name_two | two | 0 | ||
an_s | name_three | three | 2 |
Date | District_Key | Key | District | First Dose Administered | second Dose Administered | total |
16/01/2021 | an_n | name_one | one | 2 | 0 | |
16/01/2021 | an_ns | name_two | two | 2 | 0 | |
16/01/2021 | an_s | name_three | three | 5 | 2 | |
17/01/2021 | an_n | name_one | one | 4 | 1 | |
17/01/2021 | an_ns | name_two | two | 5 | 2 | |
17/01/2021 | an_s | name_three | three | 7 | 3 |
Is there anyway I can do this neatly in Stata without manually adjusting the excel- it is a huge data being updated on a daily basis. Can't reshape. Any guidance is greatly appreciated.
Thanks.
Comment