This Rmarkdown script: Policy Actors Twitter Network Summary 2017-2020.Rmd"

Observations

  1. Most ties were mentions.

  2. Mention networks were the less modulized than the retweet, reply, and quote networks.

  3. Retweet networks shown the strongest homophily effect. Very few actors retweeted from their enemies.

  4. In 2018, 2019, and 2020, the supporters had higher % of within-coalition ties (homophily).

  5. In 2018, 2019, and 2020, the opponents were more likely to reach out to enemies. The opponents had more cross-coalition ties. This is interesting.

  6. In 2019 and 2020 (more legislative advancements), the proportion of cross-coalition ties increased (included the ties to bill holders). The high proportion of cross-coalition ties indicate policy actors spent more efforts on persuation.

Packages

library(readr)
library(dplyr)
library(tidyr)
library(writexl)
library(knitr)
library(DT)

Data

Network in Edgelist

Network Properties

Add Category Columns

Homophily Tables

Summary Tables

Descriptive Statistics (holders included)

One-way and two-way tables that includes the count of different variables.

2017-2020 Statistics at a Glance

table(multiplex_all$type) # the count of tie types
## 
## mention   quote   reply retweet 
##    8195     579     794    3512
table(multiplex_all$year) # year distribution
## 
## _2017 _2018 _2019 _2020 
##    56  6148  3507  3369
table(multiplex_all$from_position) # sender
## 
##    hold  oppose support 
##       2    3493    9585
table(multiplex_all$to_position) # recipient
## 
##    hold  oppose support 
##    1717    2701    8662
table(multiplex_all$in_coalition) # ties within the same coalition
## 
## FALSE  TRUE 
##  2932 10148
table(multiplex_all$from_position, multiplex_all$in_coalition) # ties within coalition by sender's belief
##          
##           FALSE TRUE
##   hold        1    1
##   oppose   1107 2386
##   support  1824 7761
table(multiplex_all$from_position, multiplex_all$in_coalition, multiplex_all$type) # ties within coalition by sender's belief by network type
## , ,  = mention
## 
##          
##           FALSE TRUE
##   hold        1    1
##   oppose    975 1683
##   support  1763 3772
## 
## , ,  = quote
## 
##          
##           FALSE TRUE
##   hold        0    0
##   oppose     16  232
##   support    15  316
## 
## , ,  = reply
## 
##          
##           FALSE TRUE
##   hold        0    0
##   oppose    113  189
##   support    30  462
## 
## , ,  = retweet
## 
##          
##           FALSE TRUE
##   hold        0    0
##   oppose      3  282
##   support    16 3211

2017 Statistics (Supporters Only)

table(multiplex_2017$type) # the count network types
## 
## mention   quote   reply retweet 
##      14       1       2      39
table(multiplex_2017$from_position) # sender
## 
## support 
##      56
table(multiplex_2017$to_position) # recipients
## 
## support 
##      56
table(multiplex_2017$in_coalition) # ties within the same coalition
## 
## TRUE 
##   56
table(multiplex_2017$from_position, multiplex_2017$in_coalition) # ties within coalition by sender's belief
##          
##           TRUE
##   support   56
table(multiplex_2017$from_position, multiplex_2017$in_coalition, multiplex_2017$type) # ties within coalition by sender's belief by network type
## , ,  = mention
## 
##          
##           TRUE
##   support   14
## 
## , ,  = quote
## 
##          
##           TRUE
##   support    1
## 
## , ,  = reply
## 
##          
##           TRUE
##   support    2
## 
## , ,  = retweet
## 
##          
##           TRUE
##   support   39

2018 Statistics

table(multiplex_2018$type) # the count of network types
## 
## mention   quote   reply retweet 
##    2969     308     307    2564
table(multiplex_2018$from_position) # sender
## 
##  oppose support 
##    2153    3995
table(multiplex_2018$to_position) # recipient
## 
##  oppose support 
##    1750    4398
table(multiplex_2018$in_coalition) # ties within the same coalition
## 
## FALSE  TRUE 
##   465  5683
table(multiplex_2018$from_position, multiplex_2018$in_coalition) # ties within coalition by sender's belief
##          
##           FALSE TRUE
##   oppose    434 1719
##   support    31 3964
table(multiplex_2018$from_position, multiplex_2018$in_coalition, multiplex_2018$type) # ties within coalition by sender's belief by network type
## , ,  = mention
## 
##          
##           FALSE TRUE
##   oppose    332 1299
##   support    26 1312
## 
## , ,  = quote
## 
##          
##           FALSE TRUE
##   oppose      4  111
##   support     1  192
## 
## , ,  = reply
## 
##          
##           FALSE TRUE
##   oppose     95   76
##   support     4  132
## 
## , ,  = retweet
## 
##          
##           FALSE TRUE
##   oppose      3  233
##   support     0 2328

2019 Statistics

table(multiplex_2019$type) # the count of network types
## 
## mention   quote   reply retweet 
##    2670     105     234     498
table(multiplex_2019$from_position) # sender count
## 
##  oppose support 
##     891    2616
table(multiplex_2019$to_position) # recipient count
## 
##    hold  oppose support 
##     702     609    2196
table(multiplex_2019$in_coalition) # ties within the same coalition
## 
## FALSE  TRUE 
##  1200  2307
table(multiplex_2019$from_position, multiplex_2019$in_coalition) # ties within coalition by sender's belief
##          
##           FALSE TRUE
##   oppose    454  437
##   support   746 1870
table(multiplex_2019$from_position, multiplex_2019$in_coalition, multiplex_2019$type) # ties within coalition by sender's belief by network type
## , ,  = mention
## 
##          
##           FALSE TRUE
##   oppose    435  283
##   support   703 1249
## 
## , ,  = quote
## 
##          
##           FALSE TRUE
##   oppose      5   56
##   support     7   37
## 
## , ,  = reply
## 
##          
##           FALSE TRUE
##   oppose     14   72
##   support    21  127
## 
## , ,  = retweet
## 
##          
##           FALSE TRUE
##   oppose      0   26
##   support    15  457

2020 Statistics

table(multiplex_2020$type) # types by count
## 
## mention   quote   reply retweet 
##    2542     165     251     411
table(multiplex_2020$from_position) # senders
## 
##    hold  oppose support 
##       2     449    2918
table(multiplex_2020$to_position) # recipients
## 
##    hold  oppose support 
##    1015     342    2012
table(multiplex_2020$in_coalition) # ties within the same coalition
## 
## FALSE  TRUE 
##  1267  2102
table(multiplex_2020$from_position, multiplex_2020$in_coalition)
##          
##           FALSE TRUE
##   hold        1    1
##   oppose    219  230
##   support  1047 1871
table(multiplex_2020$from_position, multiplex_2020$in_coalition, multiplex_2020$type) # ties within coalition by sender's belief by network type
## , ,  = mention
## 
##          
##           FALSE TRUE
##   hold        1    1
##   oppose    208  101
##   support  1034 1197
## 
## , ,  = quote
## 
##          
##           FALSE TRUE
##   hold        0    0
##   oppose      7   65
##   support     7   86
## 
## , ,  = reply
## 
##          
##           FALSE TRUE
##   hold        0    0
##   oppose      4   41
##   support     5  201
## 
## , ,  = retweet
## 
##          
##           FALSE TRUE
##   hold        0    0
##   oppose      0   23
##   support     1  387

Within-Coalition Ties

Values in this table are higher because ties directed to the bill holders are included as cross-coalition ties. Thus, the proportion of within-coalition ties are lower.

kable(homophily_hold, digits = 3, caption = "Proportion of within-coalition ties (Holders included as cross-coalition ties)")
Proportion of within-coalition ties (Holders included as cross-coalition ties)
name supporter opponent combined
1 hold_2017 1.000 NA 1.000
3 hold_2018 0.992 0.798 0.924
5 hold_2019 0.715 0.490 0.658
7 hold_2020 0.641 0.512 0.624

Within-Coalition Ties (holders excluded)

Ties directed to the bill holders are excluded from the analysis. The proportion of within-coalition ties is higher.

kable(homophily_no_hold, digits = 3, caption = "Proportion of within-coalition ties (Holders excluded)")
Proportion of within-coalition ties (Holders excluded)
name supporter opponent combined
2 no_hold_2017 1.000 NA 1.000
4 no_hold_2018 0.992 0.798 0.924
6 no_hold_2019 0.916 0.573 0.822
8 no_hold_2020 0.944 0.622 0.893

Network properties by YEAR, TYPE, and BELIEF

datatable(mydata[,c("name","node count","edge count (raw)","average degree (weighted density)","modularity", "fragmentation", "reciprocity (weighted)","edge count (dichotomized)", "indegree centralization (dichotomized)", "outdegree centralization (dichotomized)", "density (dichotomized)","reciprocity (dichotomized)")], options = list(pageLength = 20))

Data Output

write.csv(mydata,"network_properties_2017_2020.csv",row.names = F)
write_xlsx(list("network_properties_2017_2020" = mydata, "homophily_hold.csv" = homophily_hold, "homophily_no_hold.csv" = homophily_no_hold), "network_properties_2017_2020.xlsx")
write.csv(homophily_hold,"homophily_hold.csv", row.names = F)
write.csv(homophily_no_hold,"homophily_no_hold.csv", row.names = F)