Is there a database that I can query for the neighbors of each country?
geonames.org has this info, however, it defines neighborhood formally by having a land border. This creates 2 problems:
- Useless positives, e.g., according to Geonames, US is a neighbor of Cuba because of Guantanamo Bay.
- Not quite correct negatives, e.g., while Australia has no land borders, many people would agree that it's a "neighbor" of New Zealand.