1 2 3 4 5 6 7 8 9 10 11 12 13
|
library(ggplot2)
idf_dist = fortify(idf_dist, region = "NOM_DEPT")
distcenters <- ddply(idf_dist, .(id), summarize, clat = mean(lat), clong = mean(long))
ggplot() + geom_map(data = donnees, aes(map_id = VariableDepartementDeTesDonnees, fill = Montant),
map = idf_dist) + expand_limits(x = idf_dist$long, y = idf_dist$lat) + scale_fill_manual(values=c("#922424","#A44949","#B66D6D","#C89292","#DBB6B6","#EDDBDB","#F2E6E6"), guide = FALSE,na.value="#FFFFFF")+
geom_text(data = distcenters, aes(x = clong, y = clat, label = id, size = 0.2)) + ggtitle(paste(An, ": Montant en Ile de France")) +
theme(panel.background = element_rect(fill = 'white', colour = 'black'))+
opts(panel.grid.major = theme_blank(),
panel.grid.minor = theme_blank(),
panel.border = theme_blank()) |
Partager