Skip to content
Prev 169572 / 398506 Next

Introduction to maps (of Denmark)?

Googling for Denmark Shapefile leads to this website: http://www.vdstech.com/map_data.htm
Where a few clicks lead to downloading a set of shapefiles (different levels of subdividing the country, hopefully you know more about what they correspond to than I do, about all I know about Denmark is from Hamlet, the fact that I have some ancestors from there (but I don't remember which branch), and how to make aebleskivers).  

These can be read into R using the maptools package as:

library(maptools)
dmk1 <- readShapePoly('g:/downloads/DNK_adm/DNK0')
dmk2 <- readShapePoly('g:/downloads/DNK_adm/DNK1')
dmk3 <- readShapePoly('g:/downloads/DNK_adm/DNK2')

simple plots can be done like:

plot(dmk1)
plot(dmk2)
plot(dmk3)

a little more complex with:

plot(dmk3, col=topo.colors(248))

though of course replacing topo.colors(248) with something that is meaningful.  If you need more control, then see the sp package.

Hope this helps,