I have the following counties in Florida :
counties =
Join @@ EntityValue[{Entity[
"AdministrativeDivision", {"Florida", "UnitedStates"}]},
EntityProperty["AdministrativeDivision", "Subdivisions"]]
I set my working directory as follows :
setDir :=
Quiet@Check[SetDirectory@DirectoryName@$InputFileName,
SetDirectory@NotebookDirectory[]]
I have the following values :
values = {21.2, 15.3, 14.9, 19.1, 12.4, 13.1, 21.1, 10.8,
14.4, 9.9, 11.7, 16.5, 26.1, 24.4, 15.1, 16.4, 12., 21.3,
23.1, 16.1, 18.9, 21.6, 24., 23.3, 23.9, 14., 19.8,
15.5, 21.2, 10.6, 18., 17.7, 22.7, 12.6, 11.8, 18., 20.8,
23., 28.3, 10.8, 16.2, 10.9, 16.7, 11.8, 9.1, 10.9,
21.8, 15.3, 14., 11.8, 13., 12.2, 16.1, 26.3, 10.2, 9.2,
11.2, 8.3, 12.8, 9.1, 20.3, 23.8, 22.2, 15.2, 12.9, 15.9,
21.1};
I thread my counties and values as follows:
countyvalueassignment = Thread[counties -> values]
I define the following color function:
getColor[val_] :=
Which[8.3 <= val <= 11.7, Yellow, 11.7 < val <= 14, Orange,
14 < val <= 16.5, LightGreen, 16.5 < val <= 21.3, LightBlue,
21.3 < val <= 28.3, Blue]
and color assignment:
colorassignment = getColor[#] & /@ values
I thread the counties and their colors:
countycolorassignment = Thread[counties -> colorassignment]
and build the following map:
flmap = GeoRegionValuePlot[countycolorassignment,
GeoBackground -> None, ImageSize -> 800]
Now I want to add the following shorter version of the county names. For instance; instead of "Alachua County, Florida, United States" I want only "Alachua". I also want to specify the location of the county - name labels on the map as follows :
countynames = EntityValue[counties, "CanonicalName"];
loc = EntityValue[counties, "Position"];
countyshortnames = StringDrop[#, -6] & /@ countynames[[All, 1]];
Here is the second map:
MapOfFlorida =
GeoGraphics[{EdgeForm[{Thick, Black}], GeoStyling["OutlineMap"],
Polygon /@ counties,
Table[GeoMarker[loc[[j]],
Style[countyshortnames[[j]], TextAlignment -> Center, Black,
FontSize -> 10, Bold], "Scale" -> 1], {j, 1,
Length@countyshortnames}]}, GeoBackground -> None,
ImageSize -> 1200]
My question is : how can I insert the short version of the county names (as shown in the "MapOfFlorida" map) into the Geo Region Value plot "flmap"? Thank you for your help!