Message Boards Message Boards

GeoRegionValuePlot hangs while trying to plot heatmap of US counties

I am trying to use GeoRegionValuePlot[], to make a heat map for US counties, given a certain value. When I attempt to plot a small number of plots, it runs fine. When I try to do the 240 or so counties that I want to illustrate, the kernel hangs and it finally, after being unresponsive for a LONG time, returns an internet connectivity issue statement.

The following code is what I am using:

GeoRegionValuePlot[
 Table[countyEntities[[i]] -> 
   numQsppXcounty[[i]]/maxQspprichXcounty, {i, 150}], 
 GeoBackground -> {"CountryBorders"}]

Any advice about why this is happening?

POSTED BY: Charles Cannon
2 Replies

Thanks for the quick response. I pasted your code into a notebook on my Macbook and like my code, it stalls and never produces the map. See the screen grab of where it is stuck.

Screen grab of where the execution is stuck on my MacBook

It is a connectivity issue with the Wolfram database and I played around with the settings a bit but nothing seems to make a difference.

Any suggestions about how to fix this problem or what might be the issue would be greatly appreciated.

POSTED BY: Charles Cannon
Posted 2 years ago

Hi Charles,

You have not specified what countyEntities, numQsppXcounty, and maxQspprichXcounty are. This random sample of 240 county populations works fine for me

countyPopulations = 
  EntityValue[EntityClass["AdministrativeDivision", "USCountiesAllCounties"], 
   "Population", "EntityAssociation"];

SeedRandom[123]; sample = RandomSample[countyPopulations, 240];
GeoRegionValuePlot[sample]
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract