Analyses for Ars'23

Reading data

> wdir <- "C:/Users/vlado/docs/papers/2022/ifcs2022/genova/data"
> setwd(wdir)
> library(jsonlite)
> library(magrittr)
> source("https://raw.githubusercontent.com/bavla/Rnet/master/R/Pajek.R")
> source("https://raw.githubusercontent.com/bavla/ibm3m/master/multiway/MWnets.R")
> source("https://raw.githubusercontent.com/bavla/mark/main/R/SVGviewer.R")
> MN <- fromJSON("students.json")
> str(MN)

Complete network for all years

> MN %>% 
+   flatten("w",c("prov","univ","prog")) -> 
+   Sall
> CoU <- projection(Sall,"univ","w")
> SaU <- salton(CoU); DU <- as.dist(1-SaU)
> tU <- hclust(DU,method="ward.D")
> plot(tU,hang=-1,cex=0.8,main="Universities All / Ward")
> svg("UallDendro.svg",height=7,width=12)
> plot(tU,hang=-1,cex=0.8,main="Universities All / Ward")
> dev.off() 
> makeSVGviewer("UallDendro.svg","UallDendro.html",width=1000,height=600)
> CoP <- projection(Sall,"prov","w")
> row.names(CoP) <- MN$nodes$prov$province
> SaP <- salton(CoP); DP <- as.dist(1-SaP)
> tP <- hclust(DP,method="ward.D")
> plot(tP,hang=-1,cex=0.8,main="Provinces All / Ward")
> svg("PallDendro.svg",height=7,width=14)
> plot(tP,hang=-1,cex=0.8,main="Provinces All / Ward")
> dev.off()
> makeSVGviewer("PallDendro.svg","PallDendro.html",width=1000,height=600)
> CoPg <- projection(Sall,"prog","w")
> row.names(CoPg) <- MN$nodes$prog$long
> SaPg <- salton(CoPg); DPg <- as.dist(1-SaPg)
> tPg <- hclust(DPg,method="ward.D")
> plot(tPg,hang=-1,cex=0.8,main="Programs All / Ward")
> svg("PgallDendro.svg",height=7,width=5)
> plot(tPg,hang=-1,cex=0.8,main="Programs / Ward")
> dev.off()
> makeSVGviewer("PgallDendro.svg","PgallDendro.html",width=500,height=600)
> I <- 1:107; J <- 1:79; K <- 1:11
> c11 <- glasbey.colors(11); CC <- col2rgb(c11)/255
> Col <- cbind(CC[1,Sall$links$prog],CC[2,Sall$links$prog],CC[3,Sall$links$prog])
> I[tP$order] <- 1:107; J[tU$order] <- 1:79; K[tPg$order] <- 1:11
> mwnX3D(Sall,"prov","univ","prog","w",maxsize=1.2,pu=I,pv=J,pz=K,lu="province",lz="long",col=Col,file="studentsAllClu.x3d")

studentsAllClu.x3d

Link cut

> MT <- linkcut(Sall,"w>=30")
> Col <- cbind(CC[1,MT$links$prog],CC[2,MT$links$prog],CC[3,MT$links$prog])
> mwnX3D(MT,"prov","univ","prog","w",maxsize=1.2,pu=I,pv=J,pz=K,lu="province",lz="long",col=Col,file="students30Clu.x3d")
vlado/work/2m/mwn/genova/ars23.txt · Last modified: 2023/03/15 01:04 by vlado
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki