1

I'm working on a web app that will let users explore some data from a public API. The idea is to let the user select a U.S. state and some other parameters, and I'll give them a line chart showing, for example, what percentage of home loans in that state were approved or denied over time.

I can make simple queries along these lines work with a small number rows, but these are rather large datasets, so I'm only seeing a sliver of the whole. Asking for all the data produces an error. I think the solution is to aggregate the data. But that's where I start getting 400 bad request responses from the server.

For example, this is an attempt to summarize 2008 California data to give the total number of applications per approval category:

https://api.consumerfinance.gov/data/hmda/slice/hmda_lar.json?$where=as_of_year=2008,state_abbr="CA"&$select=action_taken,SUM(action_taken)&group=action_taken

All summary variations produce a 400 error. I can't find an example that is very similar to what I'm trying to do, so any help is appreciated. Publisher's information is here:

http://cfpb.github.io/api/hmda/queries.html

J. Trimarco
  • 149
  • 1
  • 8

1 Answers1

0

Sorry for the delay, but its worth noting that that API is based on Qu, CFPB's open-source query platform, and not Socrata, so you can't use the same SoQL query language on that API.

Its unclear how you can engage them for help, but there is a "Contact Us" email link in the docs page and an issues forum on GitHub.

chrismetcalf
  • 1,556
  • 1
  • 8
  • 7