Message Boards Message Boards

0
|
10130 Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

How do I make a map of several zipcodes or countries?

Posted 7 years ago

Hey, Community.

I have a list of zipcodes, and for each zipcode I have certain data, say for example the number of people from that zipcode who took a test (this is known data). Picture a spreadsheet with column 1, zipcodes, column 2 , number of people who took the test.

How do I make a map showing those zipcodes? Could I label each zipcode with the number of people who took the test? How?

Thank you.

POSTED BY: Jorge Mahecha
4 Replies
Posted 5 years ago
POSTED BY: Valery Syssik
POSTED BY: Jorge Mahecha
POSTED BY: Jorge Mahecha

Dear Jorge,

I am not sure whether this helps, because I do not have your data, but here's an idea. Suppose we look at US zip codes in the range from 85001 to 85055. We can generate the Entities for these codes:

zipcodes = Cases[Interpreter["ZIPCode"][ToString /@ Range[85001, 85055]], _Entity]

enter image description here

Let's generate a list of fake numbers of people who did the test:

teststaken = RandomInteger[{1, 500}, Length[zipcodes]]

Then this should work:

GeoRegionValuePlot[Rule @@@ Transpose[{zipcodes, teststaken}]]

enter image description here

Hope this goes in the right direction.

Cheers,

Marco

POSTED BY: Marco Thiel
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