VertNet / webapp

VertNet web application
8 stars 7 forks source link

Filter API results to get only georeferenced records? #550

Closed sckott closed 9 years ago

sckott commented 9 years ago

Is this possible now? That is, to get only records with lat/long data. Didn't see anything in the API docs

laurarussell commented 9 years ago

I just did some testing with our samples from the wiki by adding mappable:1 to the string and it does produce less records. Doesn't necessarily mean that it was georeferenced, only that it has coordinates. If this meets your needs we can update the wiki with an example.

http://api.vertnet-portal.appspot.com/api/search?q={%22q%22:%22genus:mustela%20specificepithet:nigripes%22} (275 records)

http://api.vertnet-portal.appspot.com/api/search?q={%22q%22:%22genus:mustela%20specificepithet:nigripes%20mappable:1%22} (61 records)

laurarussell commented 9 years ago

Looks like our other filters work as well.

So all would be options: mappable:1 media:1 tissue:1 fossil:1 hastypestatus:1

sckott commented 9 years ago

yeah, records only with lat/long is what I had in mind. what is your definition of georeferenced?

laurarussell commented 9 years ago

By "georeferenced" we mean that there is evidence in the record that the coordinates were determined by best practices and accompanied by uncertainty and the information about protocol and sources.

sckott commented 9 years ago

Thanks for your help!

tucotuco commented 9 years ago

The wiki has this example already. Closing.

Thus, to find records for the black-footed ferret that are mappable, you could use this query:

http://api.vertnet-portal.appspot.com/api/search?q={"q":"genus:mustela specificepithet:nigripes mappable:1"}