Objective

This file was created to calculate modularity and E-I index based on igrpah package for the entire dataset of Carem25 in Argentina. We use two files to rebuild the dataset and being able to calculate the indexes:

First we load all the files

## New names:
## • `note` -> `note...1`
## • `note` -> `note...2`

Then we create the functions to merge the data in the graph and plot the resulting networks.

Finally, we complete the merging and verify the results.

## IGRAPH fbf5bd0 UNWB 5 2 -- 
## + attr: id (v/c), name (v/c), type (v/c), alias (v/c), note (v/c),
## | variable (v/c), frequency (v/n), nuclear (v/n), ideology (v/c), color
## | (v/c), weight (e/n)
## + edges from fbf5bd0 (vertex names):
## [1] CNEA--Kosmologos      CNEA--Radio El Debate

## IGRAPH 0f9484f UNWB 29 101 -- 
## + attr: id (v/c), name (v/c), type (v/c), alias (v/c), note (v/c),
## | variable (v/c), frequency (v/n), nuclear (v/n), ideology (v/c), color
## | (v/c), weight (e/n)
## + edges from 0f9484f (vertex names):
## [1] Algo esta Pasando        --Gobierno de Formosa   
## [2] Antis Outdoor Consultants--CNEA                  
## [3] Antis Outdoor Consultants--Diario de la Industria
## [4] Antis Outdoor Consultants--Escuelas Tecnicas ORT 
## [5] Antis Outdoor Consultants--IMPULSO BAIRES        
## [6] Antis Outdoor Consultants--Inngeniar             
## + ... omitted several edges

## IGRAPH 7a8f847 UNWB 13 12 -- 
## + attr: id (v/c), name (v/c), type (v/c), alias (v/c), note (v/c),
## | variable (v/c), frequency (v/n), nuclear (v/n), ideology (v/c), color
## | (v/c), weight (e/n)
## + edges from 7a8f847 (vertex names):
##  [1] CNEA              --La Voz de Zarate        
##  [2] CNEA              --UOCRA                   
##  [3] Discusionez       --PJ                      
##  [4] FM La Voz 99.1    --Formosa es nuestra      
##  [5] FM La Voz 99.1    --Nordeste Noticias       
##  [6] FM La Voz 99.1    --PJ                      
## + ... omitted several edges

## IGRAPH 6b0a4e9 UNWB 55 371 -- 
## + attr: id (v/c), name (v/c), type (v/c), alias (v/c), note (v/c),
## | variable (v/c), frequency (v/n), nuclear (v/n), ideology (v/c), color
## | (v/c), weight (e/n)
## + edges from 6b0a4e9 (vertex names):
##  [1] AM 770--Agencia Federal de Noticias DERF
##  [2] AM 770--Alborada Sociedad de Fomento    
##  [3] AM 770--Gobierno de Chaco               
##  [4] AM 770--Greenpeace Argentina            
##  [5] AM 770--Grupo Clan                      
##  [6] AM 770--Hogar Betania                   
## + ... omitted several edges

## IGRAPH 2cbf6c2 UNWB 47 471 -- 
## + attr: id (v/c), name (v/c), type (v/c), alias (v/c), note (v/c),
## | variable (v/c), frequency (v/n), nuclear (v/n), ideology (v/c), color
## | (v/c), weight (e/n)
## + edges from 2cbf6c2 (vertex names):
## [1] 11 Noticias      --Asamblea Riojana             
## [2] 11 Noticias      --Greenpeace Argentina         
## [3] 11 Noticias      --Iglesia Catolica Argentina   
## [4] 11 Noticias      --Los Verdes                   
## [5] 11 Noticias      --Piuke Organizacion Ecologista
## [6] Algo esta Pasando--Argendef                     
## + ... omitted several edges

## IGRAPH 331321c UNWB 36 298 -- 
## + attr: id (v/c), name (v/c), type (v/c), alias (v/c), note (v/c),
## | variable (v/c), frequency (v/n), nuclear (v/n), ideology (v/c), color
## | (v/c), weight (e/n)
## + edges from 331321c (vertex names):
## [1] ADIMRA--Agencia Telam                                     
## [2] ADIMRA--Agrupacion Rolando Garcia                         
## [3] ADIMRA--Asociacion de Empresarios y Empresarias Nacionales
## [4] ADIMRA--CNEA                                              
## [5] ADIMRA--Consultora Ramos & Asociados                      
## [6] ADIMRA--Gobierno de Tierra del Fuego                      
## + ... omitted several edges

## IGRAPH e04fddf UNWB 33 217 -- 
## + attr: id (v/c), name (v/c), type (v/c), alias (v/c), note (v/c),
## | variable (v/c), frequency (v/n), nuclear (v/n), ideology (v/c), color
## | (v/c), weight (e/n)
## + edges from e04fddf (vertex names):
##  [1] ANEIC--Algo esta Pasando               
##  [2] ANEIC--CEDYAT                          
##  [3] ANEIC--CNEA                            
##  [4] ANEIC--Corporacion Vitinicola Argentina
##  [5] ANEIC--Enlace Critico                  
##  [6] ANEIC--Federico Kukso                  
## + ... omitted several edges

## IGRAPH 2f35e0b UNWB 75 1653 -- 
## + attr: id (v/c), name (v/c), type (v/c), alias (v/c), note (v/c),
## | variable (v/c), frequency (v/n), nuclear (v/n), ideology (v/c), color
## | (v/c), weight (e/n)
## + edges from 2f35e0b (vertex names):
##  [1] AM 1070--Agencia Telam         AM 1070--Alejandra Mastrangelo
##  [3] AM 1070--Ambito                AM 1070--Argentinisima TV     
##  [5] AM 1070--Baires para Todos     AM 1070--CEDYAT               
##  [7] AM 1070--CNEA                  AM 1070--CTA                  
##  [9] AM 1070--Ceres Ciudad          AM 1070--Chubut para Todos    
## [11] AM 1070--De Medios             AM 1070--DefOnline            
## + ... omitted several edges

## IGRAPH 7fe2a6e UNWB 104 2206 -- 
## + attr: id (v/c), name (v/c), type (v/c), alias (v/c), note (v/c),
## | variable (v/c), frequency (v/n), nuclear (v/n), ideology (v/c), color
## | (v/c), weight (e/n)
## + edges from 7fe2a6e (vertex names):
## [1] 102.3 Radio Viva--Asociacion por la Autonomia de Lima APAL
## [2] 102.3 Radio Viva--CNEA                                    
## [3] 102.3 Radio Viva--Defendamos la Ciencia                   
## [4] 102.3 Radio Viva--La Manana Online                        
## [5] 102.3 Radio Viva--Revista U238                            
## [6] 102.3 Radio Viva--Washington University in St Louis       
## + ... omitted several edges

## IGRAPH 48c52a0 UNWB 257 15612 -- 
## + attr: id (v/c), name (v/c), type (v/c), alias (v/c), note (v/c),
## | variable (v/c), frequency (v/n), nuclear (v/n), ideology (v/c), color
## | (v/c), weight (e/n)
## + edges from 48c52a0 (vertex names):
## [1] 3DU--AGTSyP                           3DU--AM 1130                         
## [3] 3DU--ANLAP                            3DU--ATE                             
## [5] 3DU--Acto Analitico                   3DU--Adecco                          
## [7] 3DU--Agencia Federal de Noticias DERF 3DU--Agencia Telam                   
## [9] 3DU--AgendAR                         
## + ... omitted several edges

## IGRAPH d0f6af2 UNWB 135 5364 -- 
## + attr: id (v/c), name (v/c), type (v/c), alias (v/c), note (v/c),
## | variable (v/c), frequency (v/n), nuclear (v/n), ideology (v/c), color
## | (v/c), weight (e/n)
## + edges from d0f6af2 (vertex names):
## [1] ADN Info--ANLAP                                   
## [2] ADN Info--Adimra                                  
## [3] ADN Info--Agencia Ancla                           
## [4] ADN Info--Agencia Telam                           
## [5] ADN Info--AgendAR                                 
## [6] ADN Info--Argentinisima TV                        
## + ... omitted several edges

## IGRAPH 65ddfd8 UNWB 192 10551 -- 
## + attr: id (v/c), name (v/c), type (v/c), alias (v/c), note (v/c),
## | variable (v/c), frequency (v/n), nuclear (v/n), ideology (v/c), color
## | (v/c), weight (e/n)
## + edges from 65ddfd8 (vertex names):
## [1] ARN--ATE                                         
## [2] ARN--Aconcagua LABS                              
## [3] ARN--Adimra                                      
## [4] ARN--Agencia I+D+i                               
## [5] ARN--Agencia Paco Urondo                         
## [6] ARN--Agencia Telam                               
## + ... omitted several edges

## IGRAPH 95e772a UNWB 304 21216 -- 
## + attr: id (v/c), name (v/c), type (v/c), alias (v/c), note (v/c),
## | variable (v/c), frequency (v/n), nuclear (v/n), ideology (v/c), color
## | (v/c), weight (e/n)
## + edges from 95e772a (vertex names):
##  [1] 24hs Radio--AM 530             24hs Radio--AM 750            
##  [3] 24hs Radio--ANDigital          24hs Radio--ATE               
##  [5] 24hs Radio--Abrazo ciudadano   24hs Radio--Agencia Ancla     
##  [7] 24hs Radio--Agencia TSS        24hs Radio--Agencia Telam     
##  [9] 24hs Radio--Aire Digital       24hs Radio--Altina Inversora  
## [11] 24hs Radio--Ambito             24hs Radio--Arete Grupo Editor
## + ... omitted several edges
## character(0)
## [1] "Algo Pasando"    "Frente Amplio"   "San Luis"        "Greenpeace"     
## [5] "La Nacion"       "TN"              "UOCN"            "UCR"            
## [9] "Villa Ocampo SF"
## [1] "Centinela Formosa" "Greenpeace"
##  [1] "Clarin"                     "Compacto Nea"              
##  [3] "Rausch McKenna"             "El Comercial"              
##  [5] "FM 103.5"                   "FUNAM"                     
##  [7] "Formosa Hoy"                "Frente Justicialista"      
##  [9] "Gerencia Ambiental"         "Paraguay"                  
## [11] "Greenpeace"                 "IFDC"                      
## [13] "La Corneta"                 "La Manana"                 
## [15] "Los Verdes"                 "Observatorio Petrolero Sur"
## [17] "RESDAL"                     "Senado Paraguay"           
## [19] "UCR"                        "UNC"                       
## [21] "UNSAM"                      "Voces"
## [1] "11Noticias"       "Asamblea Riojana" "Greenpeace"       "Catholic church" 
## [5] "La Nacion"        "Los Verdes"       "Piuke"            "UCR"
## [1] "IBM"        "Los Verdes" "Parlasur"   "SEDAGER"
## [1] "Consuelo Bilbao" "FUNAM"           "Greenpeace"      "Lexambiental"   
## [5] "Los Verdes"      "Punto Verde"     "Radio Capital"   "UCR"
## [1] "Consuelo Bilbao" "Lexambiental"    "Los Verdes"      "No Queremos I"  
## [5] "Oceanos"         "Punto Verde"     "UA"
## [1] "CPA"          "La Manana"    "Lexambiental" "Los Verdes"
## character(0)
## [1] "Los Verdes"
## character(0)
## [1] "CPA"          "Lexambiental" "Los Verdes"   "Punto Verde"

Index calculations

Using different packages we calculate the modularity and e-i index using nuclear as the attribute. for each period.

Modularity

Modularity measures coalition polarization. It ranges from 0 to 1.

  • Values close to 0 mean shows low ideological polarization between groups. And there differences within each coalition

  • Values close to 0.5 do not show any association.

  • Values close to 1 show high polarization between groups. Coalitions are compacted internally and show a great difference to others coalitions.

GraphName Modularity
g2010 0.0000000
g2011 0.2304186
g2012 0.4548611
g2013 0.3101220
g2014 0.1946169
g2015 0.0268569
g2016 0.2054408
g2017 0.0698078
g2018 0.1017668
g2019 0.1879317
g2020 0.0279726
g2021 0.0890003
g2022 0.1250055

Average modularity is 0.155677

E-I index

E-i index measures homophily based on a given attribute, in this case we select attitude toward nuclear. E-I index ranges from −1 (represents complete homophilly) to 1 (represents complete heterophilly).

GraphName EIIndex
g2010 -1.0000000
g2011 -0.4455446
g2012 -1.0000000
g2013 -0.4447439
g2014 -0.9065817
g2015 -0.9798658
g2016 -0.9539171
g2017 -0.9903206
g2018 -0.9945603
g2019 -1.0000000
g2020 -0.9638330
g2021 -1.0000000
g2022 -0.9917986

Average EI index is -0.897782

Calculations for phases

First we get the data for:

## Warning in read.graph.graphml(file, ...): At core/io/graphml.c:635 : Ignoring
## <key id="d0"> because of a missing or unknown 'attr.type' attribute.

## Warning in read.graph.graphml(file, ...): At core/io/graphml.c:635 : Ignoring
## <key id="d0"> because of a missing or unknown 'attr.type' attribute.

## Warning in read.graph.graphml(file, ...): At core/io/graphml.c:635 : Ignoring
## <key id="d0"> because of a missing or unknown 'attr.type' attribute.

## Warning in read.graph.graphml(file, ...): At core/io/graphml.c:635 : Ignoring
## <key id="d0"> because of a missing or unknown 'attr.type' attribute.

and then proceed to the calculations.

Modularity

GraphName Modularity
gph1 0.1697638
gph2 0.2800933
gph3 0.0930587

Average modularity is 0.180972

E-I Index

GraphName EIIndex
gph1 -0.7029001
gph2 -0.9967108
gph3 -0.9891679

Average EI index is -0.8962596