Message Boards Message Boards

3 Replies
11 Total Likes
View groups...
Share this post:

GeoWithinQ Challenge: A is in B and B is in A.

Posted 9 years ago

I'm teaching myself new features of Mathematica 10 by playing with examples.

Here is an amusing case.

There is a California in Columbia:

 Entity["Country", "Colombia"],
 Entity["City", {"California", "Santander", "Colombia"}]

And, there is a Columbia in California:

 Entity["AdministrativeDivision", {"California", "UnitedStates"}], 
 Entity["City", {"Columbia", "California", "UnitedStates"}]

Can anyone find similar cases where (semantically) A is a proper subset of B and B is a proper subset of A?

POSTED BY: W. Craig Carter
3 Replies
Posted 9 years ago

Considering "Columbia" & "Colombia" equivalent? :) Unless we want to consider more of such equivalencies, I didn't find any other.

POSTED BY: Arash Mahdian

Very interesting! No, I don't have more examples either... But it seems that it's not so uncommon to name places after countries or states. For instance, there's a California and a Brazil on the German Baltic Sea coast (both are spelled a bit differently too, as Arash points out for Columbia/Colombia), so if anyone can find a Germany in California or Brazil we'd have another pair...

The Wolfram language certainly allows for a more systematic approach to this question, I wonder if that would be practical in terms of computation time though...

POSTED BY: Bianca Eifert

Hello and Thanks, Yikes! I didn't notice the oversight with spelling--how embarrassing.

This started from something a friend told me years ago: "There is a Jamaica in Queens and a Queens in Jamaica".

I knew that Jamaica was in the New York City borough of Queens, but I couldn't figure out how to extract that as an Entity. Even worse, a search for all cities in the country of Jamaica did not turn up a Queens city.

So, I started a search haphazardly and found (mistakenly) the Columbia (Colombia)/California pair. (Aside, there are a remarkable number of European capitals in WIsconsin).

The first thought was to try something like this:

citList = Last/@CityData;

and then look for pairs of candidates {"city", "state", "country"} shared at least two common members where the relative locations in the list are reversed.

But, this (as Bianca anticipates) would be terribly expensive.. I was hoping there might be a better way.

POSTED BY: W. Craig Carter
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract