I am trying to build a program that gets data from Statistics Denmark's API using insheetjson in Stata. However, I have not been able to find a solution for the following problem: I want to get the metadata from a random table (in this case: "FOLK1A" which is a table of demographics). This table has variables of region, age, marital status and time. If we take regions as an example, there are 105 regions, so if I run
Code:
insheetjson using "https://api.statbank.dk/v1/tableinfo/FOLK1A?lang=en", showresponse flatten
Code:
variables:1:values:1:id = 000 variables:1:values:1:text = All Denmark variables:1:values:2:id = 084 variables:1:values:2:text = Region Hovedstaden variables:1:values:3:id = 101 variables:1:values:3:text = Copenhagen variables:1:values:4:id = 147 variables:1:values:4:text = Frederiksberg variables:1:values:5:id = 155 variables:1:values:5:text = Dragør variables:1:values:6:id = 185 variables:1:values:6:text = Tårnby variables:1:values:7:id = 165 variables:1:values:7:text = Albertslund variables:1:values:8:id = 151 variables:1:values:8:text = Ballerup variables:1:values:9:id = 153 variables:1:values:9:text = Brøndby variables:1:values:10:id = 157 variables:1:values:10:text = Gentofte ... variables:1:values:100:text = Mariagerfjord variables:1:values:101:id = 773 variables:1:values:101:text = Morsø variables:1:values:102:id = 840 variables:1:values:102:text = Rebild variables:1:values:103:id = 787 variables:1:values:103:text = Thisted variables:1:values:104:id = 820 variables:1:values:104:text = Vesthimmerlands variables:1:values:105:id = 851 variables:1:values:105:text = Aalborg
Best regards,
Emil Blicher
0 Response to Parse multiple selectors once using insheetjson
Post a Comment