Introduction Case

The order of paid advertisements that you see on Google is partially determined by Google adwords. However, the website ranking for all other websites is determined by the Google PageRank algorithm. This exercise will cover this algorithm, using the following example.

PageRank

STEP 1: Dataframe Creation

In a first step, we create a dataframe with 8 nodes (pages in our case) together with an initial equal PageRank of 1/8.

pagerank <- data.frame(matrix(rep(1/8,8),nrow=1))
colnames(pagerank) <-  LETTERS[1:8]

pagerank
      A     B     C     D     E     F     G     H
1 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125

Practice

PageRank_Exercise

Multiple choice

What is the initial PageRank of the network above?

  1. 1/5
  2. 1/8
  3. 1/10

Exercise

Create the dataframe for the network above and save it as pagerank.