Geographic maps in R: Italy

2010-09-13

As suggested by this post, I created an Italian map

Italian Map with R and sp package

with the following R code using the sp package and the GADM maps

library(sp)

con <- url(“http://gadm.org/data/rda/ITA_adm1.RData”)

print(load(con))

close(con)

# giving random values to the Italian regions (1,2,3,5,1,2,3,4,5,…)

language <- rep(seq(1,5),4)

gadm$language <- as.factor(language)

# choosing colors

col = rainbow(length(levels(gadm$language)))

spplot(gadm, “language”, col.regions=col, main=“Italian Regions”)


Enter your instance's address


More posts like this

My Networking Survival Kit

2020-03-15 | #Me

In this small tutorial I’ll speak about tunneling, ssh port forwarding, socks, pac files, Sshuttle I’ve been using Linux since 1995 but I have never been interested a lot in networking.

Continue reading 