Message Boards Message Boards

GROUPS:

Help with Syntax? - plotting multiple countries "AdministrativeDivision"s

Posted 7 years ago
6883 Views
|
2 Replies
|
1 Total Likes
|

I'm trying to generate maps of multiple countries' administrative divisions by population. I can get them drawn with multiple countries, or with one country by administrative division, but but not with multiple countries' administrative divisions -- any time I include multiple Administrative Divisions it doesn't resolve correctly.

By Multiple Countries' Administrative Division (doesn't draw the map at all):

GeoRegionValuePlot[{Entity["AdministrativeDivision", { _ , "Iran"}]-> "Population", Entity["AdministrativeDivision", { _ , "Iraq"}]-> "Population"}]

By Countries only (draws the maps correctly but without administrative divisions or population density):

GeoRegionValuePlot[{Entity["Country", "Iran"]->"Population", Entity["Country", "Iraq"]->"Population"}]

By an Individual Country's Administrative Division (works for one country only):

   GeoRegionValuePlot[Entity["AdministrativeDivision", { _ , "Iran"}]-> "Population"]

Any help would be appreciated.

POSTED BY: Jack B
Answer
2 Replies

Hi there,

what about this:

GeoRegionValuePlot[Join[CountryData["Iraq", "AdministrativeDivisions"], CountryData["Iran", "AdministrativeDivisions"]] -> "Population"]

which gives:

enter image description here

Cheers,

M.

Posted 7 years ago

Thanks :D Exactly what I was looking for.

POSTED BY: Jack B
Answer
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