Just a note that the import process has been patched to prefer Wikidata entries with lower IDs in case of duplicate Geonames IDs. This has had the effect of changing the Wikidata ID for Kanpur to Q66568
As I mentioned, GeoDB doesn’t guarantee reverse mappings from Wikidata. In other words, there is no guarantee that a Wikidata ID for a city you find on Wikidata can be found by that id in GeoDB. The other direction however is guaranteed. That is, if you find a city in GeoDB, its Wikidata ID (as returned by GeoDB) will reference an entry in Wikidata. So to answer your question, the way to find the Wikidata ID for Kanpur is to use GeoDB, as in:
GET /v1/geo/cities?namePrefix=kanpur&types=CITY
GeoDB will match on the name, irrespective of the ā character. (It will match on the ASCII equivalent: a)
GeoDB reference references this city using Q31856807. The back-link from Wikidata to GeoDB is not guaranteed, since Wikidata may have duplicate entries for a given city. Having said that, I will have a look later to see why the import process prefers Q31856807 over Q66568.
You got it.
Yes, it works now. Thanks for helping.
Just a note that the import process has been patched to prefer Wikidata entries with lower IDs in case of duplicate Geonames IDs. This has had the effect of changing the Wikidata ID for Kanpur to Q66568
As I mentioned, GeoDB doesn’t guarantee reverse mappings from Wikidata. In other words, there is no guarantee that a Wikidata ID for a city you find on Wikidata can be found by that id in GeoDB. The other direction however is guaranteed. That is, if you find a city in GeoDB, its Wikidata ID (as returned by GeoDB) will reference an entry in Wikidata. So to answer your question, the way to find the Wikidata ID for Kanpur is to use GeoDB, as in:
GeoDB will match on the name, irrespective of the ā character. (It will match on the ASCII equivalent: a)
The city name corresponding to Q31856807 is Kānpur on wikidata, in which the second character is not an english alphabet.
Please tell me the correct way to find the wikidataID for a city name.
I used Wikidata(https://en.wikipedia.org/wiki/Wikipedia:Finding_a_Wikidata_ID) to determine the city ID.
Can you please tell me the correct way to find the wikidataID for a city name?
Can you tell me how you determined Q66568? Was this through a search on Wikidata, or a GeoDB namePrefix=Kanpur search?
GeoDB reference references this city using Q31856807. The back-link from Wikidata to GeoDB is not guaranteed, since Wikidata may have duplicate entries for a given city. Having said that, I will have a look later to see why the import process prefers Q31856807 over Q66568.