Aan de slagGa gratis aan de slag

Explore users based on the golden ratio

The ratio of the number of followers to the number of friends a user has is called the golden ratio.

This ratio is a useful metric for marketers to strategize promotions.

In this exercise, you will calculate the golden ratio for the aggregated data frame counts_df that was created in the last step of the previous exercise.

The data frame counts_df and library dplyr have been pre-loaded for this exercise.

Deze oefening maakt deel uit van de cursus

Analyzing Social Media Data in R

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Calculate and store the golden ratio
counts_df$ratio <- counts_df$___/counts_df$___

# Sort the data frame in decreasing order of follower count
counts_sort <- arrange(___, desc(___))

# View the first few rows
head(counts_sort)
Code bewerken en uitvoeren