Forum Discussion
zack
9 years agoFrequent Visitor
Census.gov API difficulty-- PowerBI Query doesn't display data
I need some help getting data returned by US Census.gov API (web data). I have registered for an API key, and have the proper syntax in the web URL, but when it gets to Power BI I can't use the data....
- Anonymous9 years ago
Try
Let
Source = Json.Document(Web.Contents("http://api.census.gov/data/2015/acs1/subject?get=S0101_C01_001E&for=county:021&in=state:37&key=MYCENSUSGOVKEYVALUE")),
Table = Table.FromRows(Source),
PromotedHeaders = Table.PromoteHeaders(Table)
in
PromotedHeadersNote that
Source = Json.Document(Web.Contents("http://api.census.gov/data/2015/acs1/subject?get=NAME,S0101_C01_001E&for=county:*&in=state:*&key=MYCENSUSGOVKEYVALUE"),
should return a single table of results for all Counties in all States if you need them.
Anonymous
9 years agoNot applicable
zack
9 years agoFrequent Visitor
Anonymous thanks. you're right that it's similar, but not enough to solve my problem. For example, I get an error when trying to add the index column. It seems I have to covert to table, and transpose rows before i can add an index column. But if I knew what i was talking about this discussion would not be takign place. :smileyfrustrated: