# NOT RUN {
# Example 1
library(sp)
data("nuts2006")
plot(nuts0.spdf)
# There is no data for deaths in Turkey
propTrianglesLayer(spdf = nuts0.spdf, df = nuts0.df,
var1 = "birth_2008",
var2 = "death_2008")
# Example 2
layoutLayer(title = "Births and Deaths in Europe, 2008",
sources = "",author = "",
scale = NULL,
frame = FALSE,
col = "black",
coltitle = "white",
extent = nuts0.spdf)
plot(countries.spdf,col="#E0E0E0",border="white",lwd=1, add=TRUE)
plot(nuts0.spdf,col="#E5CFC1",border="white",lwd=2,add=TRUE)
# There is no data for deaths in Turkey
propTrianglesLayer(spdf = nuts0.spdf, df = nuts0.df,
var1 = "birth_2008", legend.style = "e",
var2 = "death_2008", legend.frame = TRUE,
col1="#FF9100",col2="#45C945",k = 0.1, add=TRUE)
# }
Run the code above in your browser using DataLab