2

I am trying to get the latitude and longitude for different schools, and keep getting an error. Location is at the root, and I am able to get ids which are also at the root, so I'm not sure what I'm doing wrong.

This does not work: https://api.data.gov/ed/collegescorecard/v1/schools?_fields=location.lon&school.name=pepperdine&api_key=**********

but this does: https://api.data.gov/ed/collegescorecard/v1/schools?_fields=id&school.name=pepperdine&api_key=***********

Am I doing something wrong?

  • Appears to be a defect / mismatch of functionality with the API. Perhaps an idiosyncracy with the underlying API-maker github.com/18F/open-data-maker/blob/api-docs/API.md . Your logic isn't flawed.. it's something odd. Sidenote: I dont see why location isn't nested within school. Also, as a workaround, for your use case, can you just get back all fields and extract location using your code? – Mark Silverberg Oct 8 '15 at 12:31
  • Hi Skram, yes, I used a workaround of just I getting all the school ids, making a call for each id, and than getting the lat long that way. However, this requires a lot more code and API calls, and I am hitting my limit for API calls pretty quickly. So good to know it's a bug! – Celia Oct 9 '15 at 14:39
2

Thank you very much for finding this, and I'm sorry for the inconvenience. We've verified that this is indeed a bug. I've created an issue for it here: https://github.com/18F/open-data-maker/issues/227

Thanks,

Holly Allen Product Lead 18F

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.