To start:
FLcounties =
AdministrativeDivisionData[
Entity["AdministrativeDivision", {"Florida", "UnitedStates"}],
"Subdivisions"];
FLcountiespop =
AdministrativeDivisionData[#, "Population"] & /@ FLcounties;
ds = Dataset[AssociationThread[FLcounties -> FLcountiespop]];
FLPopulationMap =
GeoRegionValuePlot[ds, GeoBackground -> None, ImageSize -> 600,
GeoLabels -> (Tooltip[#1,
Row[{#2, ": ", EntityValue[#2, "PopulationDensity"]}]] &),
ColorFunctionScaling -> False,
ColorFunction -> (If[# > 2500000, Purple,
If[# > 2000000, Red,
If[# > 1500000, Orange,
If[# > 1000000, Yellow, If[# > 500000, Green, Blue]]]]] &),
PlotStyle -> Opacity[.3],
PlotLegends ->
BarLegend[Automatic, LegendFunction -> "Frame",
LegendLabel -> "Population",
LabelStyle -> Directive[Black, Bold, FontSize -> 16]]]
The above should build a population map for all the counties in Florida; accompanied by a bar legend. If you now look at the bar legend of this map; what I' m attempting is to modify the NumberForm of the bar legend; so that the population values appear as: 2,500,000; 2,000,000; 1,500,000; 1,000,000; 500,000 instead of in exponential form as above. I have attempted substituting:
LabelStyle ->
Directive[Black, Bold, FontSize -> 16]
above with:
LabelStyle ->
Directive[NumberForm[#, DigitBlock -> 3], Black, Bold,
FontSize -> 16]]
or
LabelingFunction -> (Style[NumberForm[#, DigitBlock -> 3],
Bold, Black, 16] &)
but, I get the following error message : "An improperly formatted directive with head NumberForm was encountered." I thank you for any help that you could provide!