Začněte nyníZačněte zdarma

Výpočet skóre in-degree

V síti retweetů udává in-degree uživatele počet retweetů jeho příspěvků.

Uživatelé s vysokým in-degree jsou vlivní, protože jejich tweety jsou retweetovány mnohokrát.

V tomto cvičení identifikuješ uživatele, kteří mohou šířit brandová sdělení cestovního portálu.

Síť retweetů pro hashtag #travel je předem načtena jako nw_rtweet.

Knihovna igraph je pro toto cvičení předem načtena.

Toto cvičení je součástí kurzu

Analýza dat ze sociálních médií v R

Zobrazit kurz

Pokyny k cvičení

  • Vypočítej skóre in-degree ze sítě retweetů.
  • Seřaď skóre in-degree sestupně.
  • Zobraz uživatele s 10 nejvyššími skóre in-degree.

Interaktivní cvičení na vyzkoušení si v praxi

Vyzkoušejte si toto cvičení dokončením tohoto ukázkového kódu.

# Compute the in-degree scores from the retweet network
in_degree <- ___(___, mode = c("___"))

# Sort the in-degree scores in decreasing order
in_degree_sort <- ___(___, decreasing = ___)

# View users with the top 10 in-degree scores
___[1:10]
Upravit a spustit kód