somnathrakshit / geograpy3

Extract place names from a URL or text, and add context to those names -- for example distinguishing between a country, region or city.
https://geograpy3.readthedocs.io
Apache License 2.0
124 stars 12 forks source link

Implement location hierarchy proposal #38

Open tholzheim opened 3 years ago

tholzheim commented 3 years ago

see #35 refactor from here as start https://github.com/SmartDataAnalytics/OpenResearch/blob/master/migration/openresearch/location.py

WolfgangFahl commented 3 years ago

see https://www.wikidata.org/wiki/Q56061#/media/File:World_administrative_levels.png

WolfgangFahl commented 3 years ago
select count(*),hierarchy 
from location_labels
group by hierarchy
count(*) hierarchy
1302117 City
1486 Country
7480 Region