geography - Neighboring counties (within the State of Florida) for every county in the State of Florida
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!
Comments
Post a Comment