Game of Thrones Characters

Author

Ramona Davuke

Introduction

In our analysis of game of thrones dataset, we compare screentime and number of starred episodes for all characters. We then label all characters with a high screentime (top 10).

Results

Using {#sec-results} will mark this section in the R document, when used “@”. Like this: Section 2

library("readr")
library("ggplot2")
library("dplyr")
library("ggrepel")

#Imports the GOT dataset (source: www.imbd.com)
screentimes <- read_csv("GOT_screentimes_1.csv")

#Extract characters with the most screentime, bevause we want to lable them in ggplot
screentimes_high <- top_n(screentimes, 10, screentime) # top_n() shows highest 10
# the above code with label will mark this figure in the Quarto document as Figure 1. 

# show data as a scatter plot: screentime vs. number of episodes watched
# and label characters with high screentime 
ggplot(screentimes, aes(screentime, episodes)) +
  geom_point() +
  geom_text_repel(data = screentimes_high,aes(label = name),min.segment.length = 0)
Warning: Removed 15 rows containing missing values or values outside the scale range
(`geom_point()`).
Figure 1

Figure 2 shows the coat of arms of house Baratheon. And the scatterplot is shown in Figure 1, see Section 2.

Figure 2: The coat of arms of House Baratheon from A Song of Ice and Fire

create subfigure:

(a) House Baratheon
(b) House Arryn
(c) House Baylish
(d) House Bolton
Figure 3: A collection of different coats of arms from the book ‘A song of Ice and Fire’, created by dezzzart published on deviantart.com