May 2022
Name national_assembly Description Votes of French deputies (XVth legislature) Authors ? Thomas Bonald, Nathan de Lara, Quentin Lutz Creation date 10/07/2020 Network source https://netset.telecom-paris.fr/pages/national_assembly.html Basic source http://data.assemblee-nationale.fr conversion Vladimir Batagelj, May 12, 2022
See p. 216 https://scikit-network.readthedocs.io/_/downloads/en/stable/pdf/
file | sets | content |
---|---|---|
Votes.net | R x V | votes, FirstRepr x ShortVote |
group.clu | R → G | political group |
X.vec | R → Real | x coordinate |
Y.vec | R → Real | y coordinate |
Members.net | R x G | membership of political groups |
LongRepr.nam | R x R | original representative label |
FirstRepr.nam | R x R | first representative |
LongVote.nam | V x V | original vote label |
ShortVote.nam | V x V | abbreviated and shortened vote label (35 chars) |
Additional info https://www.wikiwand.com/en/2017_French_legislative_election
> wdir <- "C:/Users/vlado/DL/data/parlament/France_XV/csv" > setwd(wdir) > library(stringr) > source("https://raw.githubusercontent.com/bavla/Rnet/master/R/Pajek.R") > L <- read.csv("biadjacency.csv",sep=",",head=FALSE) > dim(L) [1] 268892 3 > head(L) V1 V2 V3 1 0 2 -1 2 0 17 1 3 0 39 -1 4 0 40 1 5 0 92 1 6 0 110 -1 > V <- matrix(0,nrow=577,ncol=2807) > V[cbind(L$V1+1,L$V2+1)] <- L$V3 > V[1:10,1:20] > rName <- read.csv("names_row.csv",sep=",",head=FALSE,fileEncoding="UTF-8") > head(rName) V1 1 Fabien Matras 2 Régis Juanico 3 Pierre Morel-A-L'Huissier 4 Jean-Marie Fiévet 5 Loic Prud'homme 6 Daniele Hérin > cN <- readLines("names_col.csv",encoding="UTF-8") > length(cN) [1] 2807
(premiere lecture) | > ”” |
l'article | AR |
l'amendement | AM |
le sous-amendement | SA |
la motion de | MO |
l'ensemble de la proposition de loi | Ep |
l'ensemble du projet de loi | EP |
la déclaration du Gouvernement relative | DG |
les crédits de | CR |
du projet de loi | PL |
de la proposition de loi | Pl |
first 35 characters of the abbreviated label
> N <- rep("",2807) > for(i in 1:2807){ + s <- cN[i] + if(str_detect(s,"(premiere lecture)")) + s <- paste(">",str_replace(s," \\(premiere lecture\\)",""),sep="") + N[i] <- s + } > # replace with %>% > N <- str_replace_all(N,"l'article","AR") > N <- str_replace_all(N,"l'amendement","AM") > N <- str_replace_all(N,"le sous-amendement","SA") > N <- str_replace_all(N,"amendement","AM") > N <- str_replace_all(N,"la motion","MO") > N <- str_replace_all(N,"l'ensemble de la proposition de loi","Ep") > N <- str_replace_all(N,"l'ensemble du projet de loi","EP") > N <- str_replace_all(N,"la déclaration du Gouvernement relative","DG") > N <- str_replace_all(N,"les crédits de","CR") > > N <- str_replace_all(N,"du projet de loi","PL") > N <- str_replace_all(N,"de la proposition de loi","Pl") > > sName <- substr(N,1,35) > head(sName) [1] ">AR 36 PL de finances pour 2020." ">SA n° 41808 de M. Dharréville et S" [3] "AM n? 307 de M. Roussel a AR premie" ">AM n° 90 de M. Mélenchon a AR 3 Pl" [5] ">AM n°2285 de Mme Autain et les AMs" "MO de rejet préalable, déposée par "
> XY <- read.csv("positions.csv",sep="",head=FALSE) > head(XY) V1 V2 1 389.52401 -43.41433 2 233.20391 -261.91775 3 656.27279 -263.39870 4 72.31353 -279.05600 5 105.94016 -439.84167 6 292.42316 -144.75987 > g <- read.csv("labels.csv",sep="",head=FALSE) > dim(g) [1] 577 1 > head(g) V1 1 7 2 8 3 5 4 7 5 11 6 7 > gName <- read.csv("names_labels.csv",sep="$",head=FALSE,fileEncoding="UTF-8") > gName V1 1 Non inscrit 2 Les Républicains 3 Les Constructifs : républicains, UDI, indépendants 4 Libertés et Territoires 5 UDI et Indépendants 6 UDI, Agir et Indépendants 7 Mouvement Démocrate et apparentés 8 La République en Marche 9 Socialistes et apparentés 10 Nouvelle Gauche 11 Gauche démocrate et républicaine 12 La France insoumise > > M <- read.csv("membership.csv",sep=",",head=FALSE) > dim(M) [1] 714 3 > head(M) V1 V2 V3 1 0 7 188 2 1 8 405 3 1 9 99 4 2 2 24 5 2 4 12 6 2 5 136 > G <- matrix(0,nrow=577,ncol=12) > G[cbind(M$V1+1,M$V2+1)] <- M$V3 > G[1:10,1:12] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0 0 0 0 0 0 0 188 0 0 0 0 [2,] 0 0 0 0 0 0 0 0 405 99 0 0 [3,] 0 0 24 0 12 136 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 547 0 0 0 0 [5,] 0 0 0 0 0 0 0 0 0 0 0 557 [6,] 0 0 0 0 0 0 0 529 0 0 0 0 [7,] 0 0 0 0 0 0 0 349 0 0 0 0 [8,] 0 0 0 0 0 0 0 0 0 0 777 0 [9,] 0 0 0 0 0 0 0 290 0 0 0 0 [10,] 0 0 0 0 0 0 0 452 0 0 0 0
> Z <- matrix(0,nrow=577,ncol=577) > W <- matrix(0,nrow=2807,ncol=2807) > rownames(Z) <- colnames(Z) <- rName$V1 > rownames(W) <- colnames(W) <- cN > matrix2net(Z,Net="LongRepr.nam") > matrix2net(W,Net="LongVote.nam") > rownames(W) <- colnames(W) <- sName > matrix2net(W,Net="ShortVote.nam") > RS <- str_split(rName$V1,"\\|\\|\\|",simplify=TRUE) > dim(RS) [1] 577 2 > RN <- RS[,1] > rownames(Z) <- colnames(Z) <- RN > matrix2net(Z,Net="FirstRepr.nam") > rownames(V) <- RN; colnames(V) <- sName > bimatrix2net(V,Net="Votes.net") > vector2clu(g$V1+1,Clu="group.clu") > vector2vec(XY$V1,Vec="X.vec") > vector2vec(XY$V2,Vec="Y.vec") > rownames(G) <- RN; colnames(G) <- gName$V1 > bimatrix2net(G,Net="Members.net")