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

Georeferences most wanted #52

Open
tucotuco opened this issue Jul 30, 2022 · 0 comments
Open

Georeferences most wanted #52

tucotuco opened this issue Jul 30, 2022 · 0 comments
Labels

Comments

@tucotuco
Copy link
Member

Create an API call that can return a list of a specified number of Locations in the gazetteer for which, if a georeference existed (and doesn't), would have the greatest impact in terms of number of affected Occurrences.

SQL:
SELECT *
FROM
localityservice.gazetteer.locations_distinct_with_scores
WHERE dwc_location_hash NOT IN (
-- Locations with georeferences
SELECT dwc_location_hash
FROM
localityservice.gazetteer.georefs
WHERE bels_coordinates_score>=224
)
ORDER BY occcount DESC
LIMIT 10

Examples:
n= 1261906 tokens: "usa massachusetts nahant canoe cove us"
n= 1159270 tokens: "united states texas hidalgo estero llano grande sp wbc ltc 054 us"
n= 907605 tokens: "canada ontario essex point pelee national park general location for observations within the park ca"

Or, by specified country:
SELECT *
FROM
localityservice.gazetteer.locations_distinct_with_scores
WHERE interpreted_countrycode='AR'
AND dwc_location_hash NOT IN (
-- Locations with georeferences
SELECT dwc_location_hash
FROM
localityservice.gazetteer.georefs
WHERE bels_coordinates_score>=224
)
ORDER BY occcount DESC
LIMIT 10

Examples:
n= 389522 tokens: "argentina ciudad autonoma de buenos aires reserva ecologica costanera sur aica ba25 ar"
n= 66073 tokens: "argentina misiones obera ciar ar"
n= 56654 tokens: "argentina misiones iguazu pn iguazu area cataratas aica mi01 ar"

@tucotuco tucotuco added the API label Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant