4.17 Labels & Annotations: Exercise (3)

  1. Use the code from Figure 4.6 and try to built the figure that you see below.
    • Hint: The graph only shows labels for persons that have high values on both axes (but not necessarily the other one). Use the code below to keep last names for the respective persons (it creates a new variable last_name2 that then replaces the old last_name):
## Parsed with column specification:
## cols(
##   screen_name = col_character(),
##   n_retweets = col_double(),
##   followers_count = col_double(),
##   party = col_character(),
##   party_color = col_character(),
##   first_name = col_character(),
##   account_created_at = col_datetime(format = ""),
##   account_age_months = col_double(),
##   account_age_years = col_double(),
##   last_name = col_character(),
##   female = col_double()
## )
## Warning: Removed 498 rows containing missing values (geom_text_repel).
Labels and annotations

Figure 4.7: Labels and annotations