1
$\begingroup$

When I attempt evaluating:

 Entity[Alachua County, Florida, United States(administrative division)]   [EntityProperty["AdministrativeDivision","BorderingCounties"]]

I get: Missing["UnknownEntity", {"AdministrativeDivision", {"AlachuaCounty", "Florida", "UnitedStates"}}]

The "BorderingCounties" attribute does NOT work on my computer for some unknown reason. Other attributes (like "BorderingStates") work just fine. I'm attempting to find an alternative way to get the result that I'm seeking. I'm attempting to get a list of neighboring counties (within the State of Florida) for every county in the State of Florida. For example; after evaluating:

 counties=EntityList[US counties in Florida (administrative divisions)];

I first try to build a list of neighboring counties; surrounding Escambia county; within the State of Florida as follows:

 counties[[16]

gives: "Escambia County, Florida, United States" but,

Cases[GeoNearest["USCounty", counties[[16]]], Except[counties[[16]]]]

gives: {"Baldwin County, Alabama, United States", "Escambia County, Alabama, United States", "Santa Rosa, Florida, United States"} (which excludes Escambia County, as I want) but, gives me unwanted neighboring counties from the State of Alabama. How can I accommodate another Except within GeoNearest[] to isolate only the counties in Florida? The only neighboring county to Escambia County within the State of Florida should be Santa Rosa County. Similarly;

 counties[45]

gives: "Nassau County, Florida, United States" and

 Cases[GeoNearest["USCounty", counties[[45]]], Except[counties[[45]]]]

gives: {"Baker County, Florida, United States", "Camden County, Georgia, United States", "Charlton County, Georgia, United States", "Charlton County, Georgia, United States","Duval County, Florida, United States"} but, the answer that I'm seeking is: {"Baker County, Florida, United States", "Duval County, Florida, United States"}. The Except command should eliminate those counties located in Alabama and Georgia to isolate the counties in Florida. Thank you!

$\endgroup$
  • $\begingroup$ That's not right, as I showed you here, it's supposed to be Entity["AdministrativeDivision", {"AlachuaCounty", "Florida", "UnitedStates"}][EntityProperty["AdministrativeDivision", "BorderingCounties"]]. What you posted doesn't work for anyone. Similarly further down, in your definition of counties, you've gotten it wrong. That's not how you write entities. (However, you may have the right code in your notebook. The error message does not correspond to what you posted here.) $\endgroup$ – C. E. Apr 21 '17 at 21:31
  • 1
    $\begingroup$ If you just need that list, you can use the online version of Mathematica and run the command to get the data you need there. Then download that and import it into Mathematica. $\endgroup$ – C. E. Apr 21 '17 at 21:38
  • $\begingroup$ @C.E.: As I mentioned (twice) earlier; Entity["AdministrativeDivision",{"AlachuaCounty", "Florida", "UnitedStates"}][EntityProperty["AdministrativeDivision", "BorderingCounties"]] doesn't work in my Mathematica platform. That's the reason why I'm looking for alternative ways to solve this problem. Thank you for your recommendation about using the online version of Mathematica. $\endgroup$ – Gilmar Rodriguez Pierluissi Apr 24 '17 at 14:32
  • $\begingroup$ I know that, but I don't understand what that has to do with anything. I am simply asking you to update this question with the correct code. The code that you posted in this question will not work for anyone. $\endgroup$ – C. E. Apr 24 '17 at 14:36
  • $\begingroup$ @C.S: I made my best attempt to convey the necessary commands in the above entry done on Friday . The "dynamic nature" of some of the "Geo commands" make them difficult to copy and paste to this stackexchange platform. When I write: counties=EntityList[US counties in Florida (administrative divisions)], I'm producing a set that contains all the counties in Florida; and this command works on my Matematica software. This command appears as an icon in my Mathematica platform which; when copied-pasted to this stackexchange platform; the result is a long; nonsensical script entry. $\endgroup$ – Gilmar Rodriguez Pierluissi Apr 24 '17 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.