[R] creating a world map of eco-climatic zones

Tanja Srebotnjak Tanja.Srebotnjak at Yale.edu
Thu Jul 19 00:42:31 CEST 2007


Hello R users:

I would like to produce a world map with countries colored according to whether
they fall into one of 7 eco-climatic zones. For simplicity, each country is
allocated to exactly 1 eco-climatic zone. For this purpose I have looked at the
map and mapdata packages, which contain world maps composed of polygons (1 for
each country, it seems). Each of the polygons can be referred to by a region
name in the map package.

I am thinking, I would do something like

map(region=c('Germany', 'Switzerland',...), fill=TRUE, col='blue')

for each of the 7 eco-climatic zones.

My question is, what are the names used in the world map dataset for each
country and how can I get them?

Perhaps there's also a smarter way to produce this map, in which case, your
advise is greatly appreciated as well.

Lastly, some countries (mostly large ones such as USA, Russia, Canada, China)
fall into multiple eco-climatic zones. Assume I could get geographical
coordinates for polygons describing the sub-country portion falling into a
single eco-climatic zone, is there a way to improve the above map to show
portions of countries belonging to a specific eco-climatic zone?

Thanks!
Tanja



More information about the R-help mailing list