Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API doc for new REST endpoint: /stat/collection #152

Open
beets opened this issue Feb 18, 2021 · 0 comments
Open

API doc for new REST endpoint: /stat/collection #152

beets opened this issue Feb 18, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request REST

Comments

@beets
Copy link
Contributor

beets commented Feb 18, 2021

This endpoint allows a user to get the value associated with a statistical variable for a set of child places of a certain type, for a given date.

Endpoint: /stat/collection
Parameters:

  • parent_place
  • child_type
  • date
  • stat_vars (list)

Available as GET

Example:
https://api.datacommons.org/stat/collection?parent_place=country/USA&child_type=State&date=2013&stat_vars=Count_Person

Note, a direct parent/child place relationship is required here as well, i.e. country/USA -- State works, but country/USA -- County would not:
https://api.datacommons.org/stat/collection?parent_place=geoId/06&child_type=County&date=2013&stat_vars=Count_Person
https://api.datacommons.org/stat/collection?parent_place=country/USA&child_type=County&date=2013&stat_vars=Count_Person

@beets beets added enhancement New feature or request documentation Improvements or additions to documentation REST labels Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request REST
Projects
None yet
Development

No branches or pull requests

2 participants