The graph EuroSiS-WebAtlas.gexf is a “WebAtlas” constructed for the European Science in Society program. It consists of a partial sampling of Science in Society websites in Europe, and how they link to each other. This is a weighted multigraph: there may be multiple edges between nodes and the edges have weights. When reading into Gephi we merge the edges with strategy Sum. There should be 1285 vertices and 6462 edges.
The network includes node attributes for ‘country’ and ‘actor_type’ (e.g., government, media, research center, university). We construct visualizations that capture the extent of connections across types, and show whether country and/or actor_type appear to be related connectivity between sites.
The Gephi visualizations (PDF file names): (PDF file names)
Please see
Replace this text with the Gephi layout and parameters used, and why they were chosen:
The Gephi layout and parameters used, and why they were chosen:
I constructed the visualization by first testing our the different layouts. I tried various layouts including the Force Atlas, ForceAtlas 2, and the Fruchterman Reingold. I decided that the Force Atlas layout was the most comprehensible, as the nodes were spaced in a visually acceptable manner. Also, when I applied the coloring to the nodes for the countries, I could see that they were grouped by type. In contrast to coloring the nodes for the actor_type, where the groupings were not organized. I tried multiple layouts to find one that would group the actor_type more neatly, but was not successful.
The real-world network that my visualization shows:
That the distribution of actor_type in accordance with country has good integration with respect to actor_type. Below is an image of the Q1-EuroSiS-by-Country graph that is color coded by country and labeled with actor_type. You can see in the image below are the countries Armenia and Bulgaria. They are both diverse in actor_type which is shown in the labels.
Replace this text with a guided tour of how your visualization answers the question of connection across country and/or actor_type. If you wish, embed images in code chunks here using include_graphics, or delete the code chunk.
The network political-blogs.graphml is a network of political blogs from the 2004 election. Vertices are blogs and directed edges are references to other blogs. The vertex attribute ‘value’ indicates political orientation (1.0 is ‘right’ or conservative; 2.0 is ‘left’ or liberal).
The first visualization referenced below shows the Left-Right dichotomy in political blogs, with vertices colored for left (liberal) vs. right (conservative) orientation. It also enables us to identify the blogs that play bridging roles, indicated by higher number of edges that cross between liberal and conservative blogs. Further analysis below identifies the roles that blogs with high in-degree and high out-degree are playing.
The Gephi visualizations (PDF file name): (PDF file names)
The Gephi layout and parameters used, and why they were chosen:
I constructed the layout using Fruchterman Reingold. I adjusted the nodes by changing the gravity from the default of 10.0 to 1.0. I then colored the nodes by value; to show the distinction between the two political parties. I then added the node labels and adjusted their size and color. I chose this layout because it allowed me to view the bridges/links from the giant component and smaller outside components.
Describe the Gephi layout and parameters used, and why they were chosen. Discuss what the overall structure of the visualization shows.
The blogs that play a bridging role:
According to Barbasi, a bridge is defined as a link that if cut will disconnect the network. Certain blogs (pictured below) if removed, would disconnect them from the larger connected network.
Replace this text with a guided tour of how your visualizations show which blogs are playing bridging roles. If you wish, embed images in code chunks here using include_graphics.
Replace this text with discussion of blogs with high in-degree and high out-degree and discuss their roles. If you wish, embed images in code chunks here using include_graphics.
Both the high in-degrees and out-degrees nodes were the same. The graph layout and appearance used to confirm this analysis is listed below.
The blogs with high in-degrees included the following:
The blogs with high out-degrees included the following:
In this section we examine a network from Tapped In, a large and successful online community of education professionals that operated from the 1990’s until the late 2000’s. Participants interacted in synchronous chat rooms or in asynchronous discussions, and could also share files. Some were associated with organizations and others were unaffiliated.
The network we examine, TI-Partition-63.graphml, is a small subset of a bipartite graph of actors and media, with edges indicating how the actors interact via the three kinds of media. Here we read it in and summarize it:
TI <- read_graph("Networks/TI-Partition-63.graphml", format="graphml")
summary(TI)
IGRAPH 1e4973b D-WB 943 2763 --
+ attr: label (v/c), entity (v/c), room
| (v/c), tenantorgroup (v/c), actor (v/c),
| Weighted Degree (v/n), type (v/c), id
| (v/c), Edge Label (e/c), weight (e/n),
| id (e/c)
unique(V(TI)$actor)
[1] "KimberleyS" "NaomiW" "AmyChe"
[4] "BobJ" "SteffanieS" "SteveHo"
[7] "CarlosGo" "ElizabethI" "ChristinFa"
[10] "GinnyLT" "KathyAL" "YoonC"
[13] "ACOEAdmin" "MichelleW" "ZairaH"
[16] "MayraD" "DanielI" "JoanDi"
[19] "DavidKo" "LoisS" "AdaGa"
[22] "ElizabetB6" "MariselaR" "AmyRH"
[25] "DierdreO" "DebbieWo" "IreneFu"
[28] "NancyGO" "RubyS" "AviB"
[31] "MathewDC" "AngelaRom" "SaraFa"
[34] "ClothildeE" "MarthaD" "CinthiaG"
[37] "RaulOr" "AndrewKe" "EstherL"
[40] "LizLi" "RyanW" "WvgiovannR"
[43] "AnneRB" "BrianAD" "KarineB"
[46] "FreddieG" "MargaretC" "FreddieH"
[49] "GriseldaR" "ElizabetMa" "DawnettaF"
[52] "SamA" "ErinA" "PattyM"
[55] "BernardB" "JoseV" "NancyWa"
[58] "DavidAl" "BethKM" "DaraN"
[61] "BrandyOl" "LindaMG" "JeanAM"
[64] "LesleyAG" "JonSo" "MichaelWv"
[67] "AlbertL" "HidieR" "ChristinR3"
[70] "RickA" "SharonMul" "GinnyL"
[73] "SueKe" "JudiF" "BarryK"
[76] "KathyD" "JeffRa" "DeannaA"
[79] "Jennifer10" "SueCC" "RobertAnt"
[82] "DaynaSW" "MariaCG" "RitaMi"
[85] "LydiaA" "JulieAP" "AimeeKP"
[88] "KarenLi" "RafaelR" "KatherinHH"
[91] "PauletteS" "OscarR" "ChristinS2"
[94] "KevinS" "StuartG" "SophiaE"
[97] "DonnaJM" "TiffanyLP" "CosmeP"
[100] "CatherineV" "LindaMM" "DarrenA"
[103] "RobertPo" "NellyP" "JaneBu"
[106] "SusanMcgr" "DianaWy" "SarahBel"
[109] "WilliamWi" "MariaN" "AshleyGre"
[112] "CarolynSC" "RickJH" "Camcelhany"
[115] "CrystalN" "LoriannaC" "JeffreyDe"
[118] "LourdesV" "RexC" "NelsonTS"
[121] "GretaN" "JoannaSa" "GregS"
[124] "AmyLJ" "ChristieD" "RoxanneM"
[127] "CarlyS" "CathieE" "AndreaBl"
[130] "BelyndaR" "TrishA" "LouiseM"
[133] "JohnSa" "JanetTa" "NathaniaC"
[136] "YvonneRA" "SusanMart" "JeanKM"
[139] "GretchenC" "KaiB" "KatherinMC"
[142] "CindyCa" "SaraSum" "GeorgeH"
[145] "SusanCJ" "WandaI" "PamelaCo"
[148] "KellyBo" "SeanMc" "KatherinK"
[151] "BarbaraLe" "JoeF" "SandraHa"
[154] "JaneGol" "CelysB" "JuanaG"
[157] "IsraelN" "KhanhY" "KevinCM"
[160] "JemeryM" "RoxanneJ" "TimWG"
[163] "JoyBS" "JenniferC4" "RuthVe"
[166] "TiffanyS" "ChristyG" "LouiseS"
[169] "EnomwoyiB" "ChristianS" "LeeAnnC"
[172] "JacqueliMR" "SeanC" "ErinR"
[175] "DianneHo" "ManuelU" "PamelaP"
[178] "RichardK" "KennyC" "JohnBy"
[181] "KellieS" "VeronicaC" "TrishaCh"
[184] "AnneL" "CarlosAr" "AmandaBy"
[187] "LoisJH" "BrianSC" "PaulM"
[190] "VeronicaI" "JeffG" "IsaiasL"
[193] "SandraO" "DavidMG" "RachelleD"
[196] "SarahMarz" "EmeryT" "LaurieAz"
[199] "KarenGra" "JoanneA" "DavidUr"
[202] "SteveSh" "DulceMM" "HelenaSo"
[205] "ChristinB" "BaljitP" "DianeW"
[208] "HectorG" "AshleyH" "AlyN"
[211] "JillE" "LisaN" "MarciaL"
[214] "AngusH" "JenF" "DianaBr"
[217] "RebekahM" "ThomasWB" "RamonaP"
[220] "DulceM" "EvanG" "NancySta"
[223] "Admin" "DianeBec" "CherylRR"
[226] "DeniseMF" "CherngchaS" "MichelleN"
[229] "DonaldLM" "ChristinCa" "SusannahW"
[232] "DuffG" "JessicaLZ" "KatyA"
[235] "ArianaW" "KellySc" "LolaS"
[238] "ReginaSca" "NormanF" "DeedeeR"
[241] "MariaU" "PamelaMH" "JenniferBa"
[244] "BobAl" "MelissaCam" "GulghutaiF"
[247] "CynthiaMP" "NancyCl" "MollyD"
[250] "ElizabetGu" "VirginiaH" "KristineS"
[253] "MarilynK" "KevinPK" "TinaM"
[256] "GabrielaS" "NancyWil" "HollyA"
[259] "ElizabethF" "MariaCJ" "HollyCH"
[262] "MichelleGl" "PatriciaPa" "OliviaS"
[265] "MarkMil" "MarcC" "JacksonS"
[268] "JenniferV2" "ElenaSo" "JordanEC"
[271] "MichelleLT" "BrennaY" "SherrieM"
[274] "MarilynNN" "TammiB" "JudiP"
[277] "BjB" "CamachoC" "GailLD"
[280] "PaulaC" "WayneY" "RonaldCS"
[283] "MeganLF" "JennaRS" "TeresaMcc"
[286] "KristianH" "RickM" "KathrynAsh"
[289] "LauraSl" "WesleyW" "MichaelH"
[292] "MatthewKi" "RebeccaC" "KimberlyAG"
[295] "IsabelleR" "ScottC" "DouglasS"
[298] "Mcordero" "KathleenJW" "KrisL"
[301] "ShelleyA" "JasonV" "JohnLl"
[304] "SusanFin" "ConnieT" "JohnMichaC"
[307] "JackL" "PeterLa" "KennyL"
[310] "MaraP" "AmyW" "JenniferLK"
[313] "NancyDR" "KimberlyPh" "JanetLe"
[316] "MichaelMc" "CorinnaC" "JasonCO"
[319] "MatveyS" "CoreyK" "LindaV"
[322] "MarkL" "WesleyS" "EnidL"
[325] "DorothyLa" "GizelleC" "SandraMG"
[328] "EllenW" "ValentinMS" "KristinMac"
[331] "NathalieL" "AnthonyRo" "RebeccaLM"
[334] "MatildeS" "PjotrW" "AimeeCW"
[337] "KevinSh" "LindsayA" "RosanneLS"
[340] "JenniK" "CynthiaSG" "YatC"
[343] "CruzC" "StephaniGo" "VToniA"
[346] "KarenK" "AndyB" "DanielJB"
[349] "MarianneSi" "EvelynCh" "JarekJKK"
[352] "AlbertoM" "JessicaSu" "VickiLL"
[355] "EileenR" "MaryBD" "AngelaP"
[358] "JaniceMM" "KarenMcc" "HenryL"
[361] "DeanD" "ShereneR" "DianaSm"
[364] "JennaC" "CarolineBK" "HectorP"
[367] "DustinB" "RebeccaMi" "CathyP"
[370] "WyoundaH" "SofyaS" "RogettaW"
[373] "GretchenLi" "CherieC" "CarleneN"
[376] "GillianR" "SheilaJ" "RobinLM"
[379] "MohamedH" "TraciK" "GracielaZ"
[382] "JoannaS" "CarmenHe" "MissyC"
[385] "AbigailSG" "LeslieT" "MadelineP"
[388] "LizWu" "DrewK" "ConstancAH"
[391] "RogerEC" "KathrynWi" "MariaGam"
[394] "CraigBo" "RachelV" "ClarkCo"
[397] "JahYeeW" "JudyHo" "LyndaS"
[400] "TracieK" "TeresaAC" "PatrickWJD"
[403] "AhadF" "HenryM" "MichelleU"
[406] "HannahM" "PatriciaSp" "MadonnaJ"
[409] "MariaC" "KathyCr" "MinkyooC"
[412] "JacqueliDC" "LindaHe" "RebeccaMcc"
[415] "PaulaAC" "JenniferK2" "PatrickF"
[418] "PhilRS" "PatriciaRS" "AndyW"
[421] "PaulaJM" "GurbakhasB" "BradW"
[424] "ElizabetMB" "LeslieDC" "MaryTM"
[427] "MarthaEM" "HanyM" "KrissyL"
[430] "JacqueliM" "RickD" "MichaelSL"
[433] "AnnMarieS" "GeraldM" "HeatherMO"
[436] "PamelaJ" "JamesP" "PhilipG"
[439] "PhilR" "FredAF" "JonathanWo"
[442] "KarenSche" "JanineS" "ClayM"
[445] "ImeldaR" "RobinAS" "NancyKS"
In this section we project the network to be an Actor-Actor network, and write it out for visualization in Gephi. We need to solve a problem before we can do the projection. Our objective is to retain all information that was present in the network we read in, so we can pass that information on to Gephi.
summary(TI)
IGRAPH 1e4973b D-WB 943 2763 --
+ attr: label (v/c), entity (v/c), room (v/c), tenantorgroup (v/c), actor (v/c), Weighted Degree
| (v/n), type (v/c), id (v/c), Edge Label (e/c), weight (e/n), id (e/c)
is_bipartite(TI)
[1] TRUE
#TI <- make_bipartite_graph( rep(0:1,length=20), c(1:20))
#print(TI, v=TRUE)
#bipartite_graph(TI)
#plot(TI, main = "Actor-Actor Network",
# layout = layout_as_bipartite(TI)[,2:1])
#?bipartite_projection
TI.proj <- bipartite_projection(TI)
Warning in handle_vertex_type_arg(types, graph) :
vertex types converted to logical
Error in handle_vertex_type_arg(types, graph) :
`NA' is not allowed in vertex types
The problem that had to be solved:
The bipartite function in R searches for a type with (v/l) where l represents logic. However, this data set had the type set as (v/c).
How it was solved:
The problem that had to be solved, and how solved: How information was preserved:
How information was preserved:
# write_graph(___, ___, ___)
How we could tell which projection to use:
The Gephi visualizations may be found in: (PDF file names)
Conclusions drawn about the affiliation of actors and their interactions:
Here we return to the European Science in Society network EuroSiS-WebAtlas.gexf. We show how to convert the network to a format that can be read into igraph, and then we demonstrate how to collapse and simplify the graph so that one can see the relationships between countries (similar to the French political party example in class.)
We want to work in igraph, which does not read gexf files, so we use Gephi to convert to a format igraph can use. (The resulting file is included in this notebook folder.) After doing that we continue with igraph below:
The format I chose was graphml. I chose this file type because it was the same as the files we read in the first problem.
Discuss here
?read_graph
EWSA <- read_graph("Networks/Untitled.graphml", format="graphml")
summary(EWSA)
IGRAPH 75d1092 U-W- 1285 6462 --
+ attr: label (v/c), r (v/n), g (v/n), b (v/n), x (v/n), y (v/n), size (v/n), label (v/c), country
| (v/c), tag_gender (v/c), tag_governance (v/c), tag_health (v/c), tag_info (v/c), tag_internat
| (v/c), tag_nano (v/c), tag_people (v/c), tag_reg (v/c), tag_research (v/c), tag_scienceedu (v/c),
| actor_type (v/c), tag_secur (v/c), tag_socioeco (v/c), tag_space (v/c), tag_transport (v/c),
| tag_agri (v/c), tag_biotech (v/c), tag_business (v/c), tag_comm (v/c), tag_energy (v/c),
| tag_environment (v/c), tag_food (v/c), id (v/c), Edge Label (e/c), weight (e/n), id (e/c)
# And you are ready to plot!
#plot(EWSA,
# main = "EuroSis-WebAtlas as iGraph",
# layout = layout.random,
# vertex.label.name=c(1),
# vertex.size = 1,
# asp = 0)
We can tell from the summary that the vertices and edges are correct because when checking this summary against the data laboratory in Gephi, all the attributes listed as (v/c) are the attributes with vertices, and vice versa, the attributes listed with (e/n) are attributes that represent edges.
You can tell that it is undirected and weighted byt the first line of the summary “U-W-” which represents undirected and weighted.
How we can tell from the above summary that the number of vertices and edges are correct; that it is undirected and weighted; and that we did not import Gephi layout information:
?read_graph
EWSA <- read_graph("Networks/Untitled.graphml", format="graphml")
summary(EWSA)
IGRAPH b4d14c3 U-W- 1285 6462 --
+ attr: label (v/c), r (v/n), g (v/n), b (v/n), x (v/n), y (v/n), size (v/n), label (v/c), country
| (v/c), tag_gender (v/c), tag_governance (v/c), tag_health (v/c), tag_info (v/c), tag_internat
| (v/c), tag_nano (v/c), tag_people (v/c), tag_reg (v/c), tag_research (v/c), tag_scienceedu (v/c),
| actor_type (v/c), tag_secur (v/c), tag_socioeco (v/c), tag_space (v/c), tag_transport (v/c),
| tag_agri (v/c), tag_biotech (v/c), tag_business (v/c), tag_comm (v/c), tag_energy (v/c),
| tag_environment (v/c), tag_food (v/c), id (v/c), Edge Label (e/c), weight (e/n), id (e/c)
sort(unique(V(EWSA)$country))
[1] "Armenia" "Belgium" "Bulgaria" "Czech Republic" "Estonia" "Finland"
[7] "France" "Hungary" "International" "Italy" "Montenegro" "Poland"
[13] "Portugal"
We want to see how different countries connect to each other. We will first show that visualization of the unmodified graph is not helpful. We will then collapse and simplify the graph to be a weighted graph between countries and then visualize that.
A force directed layout with parameters chosen to make the nodes visible without labels, and to give each node a color according to its country:
?read_graph
EWSA <- read_graph("Networks/Untitled.graphml", format="graphml")
plot(EWSA,
main = "Node Colored by Country",
vertex.color = as.numeric(as.factor(V(EWSA)$country)),
vertex.label = NA,
layout = layout.drl
)
# plot(___, ...)
It should be clear that this is not the best visualization for the question of which countries connect to which.
We use contract and simplify to collapse the network into one node for each country, summing the existing edge weights. The result should have 13 country vertices and 70 inter-country edges, with edges weighted by number of cross-country web links. The edge weights should range from 1 to 120:
# Your code here; then summarize the result
?read_graph
EWSA <- read_graph("Networks/Untitled.graphml", format="graphml")
?summary
summary(as.factor(V(EWSA)$country))
Armenia Belgium Bulgaria Czech Republic Estonia Finland France
88 197 105 33 164 85 151
Hungary International Italy Montenegro Poland Portugal
101 47 72 67 138 37
We choose visualization parameters to make the relationships between countries clear: You might explain these choices here.
EWSA <- read_graph("Networks/Untitled.graphml", format="graphml")
plot(EWSA,
layout = layout.drl,
vertex.color = as.numeric(as.factor(V(EWSA)$country)),
vertex.label = NA)
Brief discussion of country relationships shown
I do not see a clear relationship between the countries (color coded). I see some trends of countries of the same type being closer together (clustered). But some nodes are farther apart.
Recording the country names and number of web sites on vertices of the Country graph:
EWSA <- read_graph("Networks/Untitled.graphml", format="graphml")
?V()
V(EWSA)$country <- walktrap.community(EWSA, modularity = TRUE, membership = TRUE)$membership
V(EWSA)$website_count <- walktrap.community(EWSA, modularity = TRUE, membership = TRUE)$membership
?write_graph
write_graph(EWSA, "NewEuro.graphml", format="graphml")
The Gephi visualization may be found in: (PDF file name)
Does the Gephi visualization support the same conclusions?
Pau