2
$\begingroup$

How do you plot polygons in GeoRegionValuePlots? I'd like to reproduce what the call (2) (below) does with something like the call to (4). As you can see using GeoDisk(s) (3) works but the call (4) with polygons fails. (1) is shown as a sanity check that my polygons actually work. I think that the problem is that I need to be specifying the color differently in (4). (4) was a naive extension of what worked for disks. I think the answer is hinted at in (1) since there is a color argument in that list.

nmcounties = AdministrativeDivisionData[Entity["AdministrativeDivision", {"NewMexico", "UnitedStates"}], "Subdivisions"];
nmpopdensity = AdministrativeDivisionData[#, "PopulationDensity"] & /@ nmcounties;
nmpgons = AdministrativeDivisionData[nmcounties, "Polygon"];
nmdisks = GeoDisk[GeoPosition[#], 10000] & /@ AdministrativeDivisionData[nmcounties, "Position"];
(1)    GeoGraphics[{EdgeForm[Black], FaceForm[Orange], nmpgons}]
(2)    GeoRegionValuePlot[Thread[nmcounties -> nmpopdensity], ColorFunction -> ColorData["Rainbow"]]
(3)    GeoRegionValuePlot[Thread[nmdisks -> nmpopdensity], ColorFunction -> ColorData["Rainbow"]]
(4)    GeoRegionValuePlot[Thread[nmpgons -> nmpopdensity], ColorFunction -> ColorData["Rainbow"]]
$\endgroup$

1 Answer 1

2
$\begingroup$

It is a bug.

although adding one non-polygon to the list makes everything work:

GeoRegionValuePlot[
 Join[{Entity["City", {"LosAngeles", "California", "UnitedStates"}] ->
     Quantity[577.6458106034206`, ("People")/("Miles")^2]},
  Thread[nmpgons -> nmpopdensity]], ColorFunction -> ColorData["Rainbow"]]
$\endgroup$
2
  • $\begingroup$ Please add the figure that you produced in order to illustrate that your approach "makes everything work". $\endgroup$
    – bbgodfrey
    Feb 23, 2015 at 4:23
  • $\begingroup$ I think he meant do the following (I replaced LA with Albuquerque.) Is nmcounties = AdministrativeDivisionData[Entity["AdministrativeDivision", {"NewMexico", "UnitedStates"}],"Subdivisions"]; nmpopdensity = AdministrativeDivisionData[#, "PopulationDensity"] & /@ nmcounties; nmpgons = AdministrativeDivisionData[nmcounties, "Polygon"]; GeoRegionValuePlot[Join[{Entity["City", {"Albuquerque", "NewMexico", "UnitedStates"}] -> Quantity[Log10[2959], ("People")/("Miles")^2]}, Thread[nmpgons -> Log10[nmpopdensity]]], ColorFunction -> ColorData["Rainbow"]]` $\endgroup$
    – JEP
    Feb 23, 2015 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.