4.19 Facetting: Exercise (2)

  1. Load the data: data <- read_csv("data_twitter_influence.csv") (you can download the data here).

  2. What do you think happens if you try to facet by a continuous variable like followers_count? What about party? What’s the key difference?

  3. Take the subset of politicians that have less then 50000 followers (data %>% filter(followers_count<50000)) and use facetting (+ facet_grid(var1 ~ var2)) to explore the four-way relationship between account_age_years, followers_count, female and party

  4. Read the documentation for facet_wrap() (?facet_wrap()). What arguments can you use to control how many rows and columns appear in the output?

  5. What does the scales argument in facetwrap() do? When might you use it?29


  1. Determines whether scales are fixed across all plots or not.