開始使用免費開始

用度數視覺化節點

現在我們已經看過圖形,並探索了一些基本性質,來更深入思考這個網路。你會發現有些節點連結非常多,還有許多離群點。我們將透過有條件地繪圖,並依照入度與出度為部分節點上色來視覺化這件事。把節點分成三種類型來思考:

  • 轉推很多、且也被大量轉推的使用者。
  • 只轉推過 1 次的使用者(入度為 0、出度為 1)。
  • 只被轉推過 1 次的使用者(入度為 1、出度為 0)。

這有助於我們了解,在高連結節點群周圍的環狀結構中發生了什麼。

本練習屬於課程

案例研究:R 的網路分析

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Calculate the "in" degree distribution of retweet_graph
in_deg <- degree(___, mode = "___")

# Calculate the "out" degree distribution of retweet_graph
out_deg <- degree(___, mode = "___")

# Find the case with one "in" degree and zero "out" degrees
has_tweeted_once_never_retweeted <- __ == 1 & __ == 0

# Find the case with zero "in" degrees and one "out" degree
has_never_tweeted_retweeted_once <- __ == 0 & __ == 1
編輯並執行程式碼