This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(gdata) | |
library(reshape) | |
library(classInt) | |
############### | |
# INTEGRATING # | |
############### | |
f <- read.xls("IN/Leg 2012 Candidatures T1 31 05 2012.xls", sheet=1) | |
nuances <- read.xls("IN/Leg 2012 Candidatures T1 31 05 2012.xls", sheet=2, skip=2, header=FALSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rgdal) | |
# DATA | |
# http://professionnels.ign.fr/ficheProduitCMS.do?idDoc=6185461 | |
cities <- readOGR("C:/DATAS/GEOFLA/COMMUNES/COMMUNE.SHP", "COMMUNE") | |
# http://www.data-publica.com/opendata/13495--resultats-du-deuxieme-tour-de-l-election-presidentielle-2012 | |
votes <- read.csv2("IN/votesResults2012.csv",sep=",", quote="\"") | |
# VOTES TO SPATIAL DATA " | |
votes$pc.sar <- votes$results.sarkozy / votes$results.exprimes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## ATTENTION !!: l'utilisation de ce code nécessite d'avoir | |
# lancé le code précédent (https://gist.github.com/2857180) , | |
# en gros d'avoir créé l'objet spatial comm2 avec les résultats du vote. | |
library(rgdal) | |
library(spatstat) | |
library(maptools) | |
## COERCING DATA for SPATSTAT ## | |
# on lit le trait de côte téléchargé depuis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rgdal) | |
library(maptools) | |
library(classInt) | |
setwd("F:/METHODES/1205_CAMPAGNE_PRES") | |
######################### | |
## READING SOURCE DATA ## | |
######################### | |
# on intègre les contours des communes GEOFLA |
NewerOlder