library("readr")
library("ggplot2")
library("dplyr")
library("ggrepel")Game of Thrones Analysis
Here, we analyse the screen times of all characters in the HBO TV Series Game of Thrones (a pretty good really brutal series, btw). Watch it on your own risk. j,m
Importing the dataset with the screentimes of the characters into the script
screentimes <- read_csv("data/GOT_screentimes_1.csv")Creating new dataset with the top 10 observations in the column “screentime”
screentimes_high <- top_n(screentimes, 10, screentime)Making a plot where screentime and episodes are x and y axes Using geom_point to put dots on the plot Labeling the characters that have high screentime
ggplot(screentimes, aes(screentime, episodes)) +
geom_point() +
geom_text_repel(data = screentimes_high,aes(label = name),min.segment.length = 0)