開始使用免費開始

終極對決,第二回合!負面評價

在兩家組織中,人們都提到「culture」和「smart people」,因此兩家公司之間有一些相似的正面面向。不過,透過金字塔圖,你可以開始推敲工作環境中正面特徵的程度差異。

現在你要把注意力轉向負面評價,並製作相同的視覺化。這次你的工作空間中已經有 common_words 資料框。不過,這個練習中的常見雙字詞來自員工的「負面」評論。

本練習屬於課程

R 的 Bag-of-Words 文本探勘

檢視課程

練習說明

  • common_words 使用 slice_max(),針對 diff 欄位取得前 5 個雙字詞。新物件的結果會印出在你的主控台。
  • 建立 pyramid.plot()。傳入 top5_df$AmazonNegtop5_df$GoogleNeg,以及 labels = top5_df$terms。為了更清楚的標示,將
    • gap 設為 12
    • top.labels 設為 c("Amzn", "Neg Words", "Goog")

mainunit 參數已為你設定好。

動手互動練習

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

# Extract top 5 common bigrams
(top5_df <- ___ %>% ___(___, n = ___))

# Create a pyramid plot
___(
    # Amazon on the left
    top5_df$___,
    # Google on the right
    top5_df$___,
    # Use terms for labels
    labels = top5_df$___,
    # Set the gap to 12
    ___ = ___,
    # Set top.labels to "Amzn", "Neg Words" & "Goog"
    ___ = ___,
    main = "Words in Common", 
    unit = NULL
)
編輯並執行程式碼