We have a dataset one screentime and numbber of episode for every character starred in Game Of Thrones. Tyron Lannister is both the character with the most screentime and appearing in most episode. One outlier has a 100 minutes screentime in only a few episodes - who is this guy??
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
library("ggrepel")
Warning: package 'ggrepel' was built under R version 4.3.3
#load the data setscreentimes <-read_csv("GOT_screentimes_1.csv")
Rows: 191 Columns: 6
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (4): name, imdb_url, portrayed_by_name, portrayed_by_imdb_url
dbl (2): screentime, episodes
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# Select the character with the highest screenstimesscreentimes_high <-top_n(screentimes, 10, screentime)# Make a scatterplot screentime vs. episodes.# Label the characters with the highets screentimes ggplot(screentimes, aes(screentime, episodes)) +geom_point() +geom_text_repel(data = screentimes_high,aes(label = name),min.segment.length =0)