Project 3 — TV Time
Amogh Silaparasetti, Anne Ning, Jonah Carter, Kevin Long
Game of Thrones is a long show. It has a lot of plot, characters, and episodes. Our app allows you to take a step back and look at some of the character and episode statistics in aggregate.
We believe you can draw some interesting conclusions from this analysis and therefore we set out to design an app and visualizations that was intuitive and easy to use for this very purpose.
View it Live | Source Code | Demo Video
The Data
Our script data are from a dataset by Gopinath K S on Kaggle. It included script data for almost all the episodes and crucially included speakers. We did a lot to clean this dataset up and then ran a preprocessing script over it to generate a file with just the data we needed to power each of our visualizations.
Of note, our method for determining who was being spoken to in each line of dialog was whether two characters have lines of dialog back to back. This is obviously an imperfect method, but we think it is at least accurate enough to provide interesting insights.
We also got a character list of the most important characters and their images from an official HBO Game of Thrones 15th anniversary site.
The data that powers the map part of our visualization comes from Jeffrey Lancaster on his Game of Thrones Datasets and Visualizations repository on GitHub. The geojson files for the map of Westeros and Essos were from Amy Lee Walton’s GOT Inspired Map repository on GitHub.
The synopsis and hero image are from TMDB.
The Visualizations
Landing Screen
The top image shown below is the initial landing page when the visualization is first opened. It shows a cool static background and the logo/name of the show. Scrolling down a bit will lead the user to a brief synopsis of the show and an index where you can navigate to the other pages. Scrolling down further will lead the user to the heatmap.
Character Dialogue Heatmap
This heatmap displays the number of words a character has said in any given episode from the series. Hovering over a cell shows a picture of the character, the season and episode, and how many words they said in the episode. This offers an interesting insight into the character's prevalence during different parts of the story, as well as how often they show up after their first appearance. Paying close enough attention, you can also be clued into important events, such as a character having a large amount of lines in one episode and then not appearing for the rest of the series.
Character Pages
The various character pages show the name and image of a character from Game of Thrones. This can be accessed from the character dialogue heatmap or by clicking a character on the BFFs chart. A dropdown filter at the top allows the user to select the seasons (or entire show) that they wish to view the data for. Additionally, the user can click on the arrows to navigate to the next season.
The top words chart shows the top 5 most used words and the occurrence count from that character in a specific season. One of the lines in which they use that word is also displayed as an example of it in a sentence. The BFF chart, which updates with the filters applied to the top words chart shows the top 5 characters the current character spoke to in the filtered season. Hovering over each character or link shows the number of lines and clicking on a character will take you to their corresponding character page.
Episode Treemap
Here, the user can see the characters and their word count based on the episodes they have selected. The user can select the seasons and then their desired combination of episodes. The characters' panels are ordered in descending order based on their word count. The size of the panel is based on the word count.
Map
The map features a map of Westeros and Essos, and a sidebar on the left which allows a user to see an action log and filter based on an episode, character, or character group. Zooming in will show location markers of more precise locations in the show. Most locations on the map including markers, rivers, lakes, and even general regions can be clicked to show a popup with the location’s name.
The first filter allows you to filter by episode. Filtering by an episode will show all the locations where that episode visited (which hops around due to multiple main characters). The green marks the opening scene while the red marks the location of the closing scene. Dotted crimson paths show the order in which locations were shown in the episode. The action log shows all relevant actions that occurred with any characters that appeared in that episode.
The character filter allows the user to filter by a specific character. The map shows the path taken by the character throughout the entire show if it exists in the data, starting at the green marker and ending at the red. A dotted line denotes the order of locations visited. In the action log, any significant actions taken by that character will be displayed, such as deaths and transfer of important weapons (like any Valyrian steel or dragonglass).
The final filter is the character group, which filters by a group of affiliated characters such as those who all belonged to the same faction (i.e. Dothraki) or a major house/family (i.e. Baratheon). It shows the locations visited by every member, as well as the order of location the members appeared at throughout the entire show. The action log shows significant actions involving every character that belongs to the selected group.
Design
We started our design process by going through the different levels to get a sense of what data and visualizations we would need. From there we sketched a few different layout and visualization ideas. A sample of which you will find below.
Once we had a final set of visualizations we prototyped some of them in Figma to get a general sense for the design and feel of the application.
Findings
Utilizing the character appearance heatmap, we can infer that the top characters who are most present on Game of Thrones seem to be Tyrion Lannister, Jon Snow, Daenerys Targaryen, Arya Stark, and Cersei Lannister. On the heatmap, those characters have the most squares filled in terms of episodes, as well as the darkest squares indicating many lines in the script.
One of the darkest squares on the heatmap belongs to Tyrion Lannister.
Furthermore, we also discovered that we can often tell when a character dies in the show based on which episodes onward no longer contain lines in the script. In the following image, the characters Khal Drogo, Robb Stark, Robert Baratheon, and Joffrey Baratheon (among others) have had a good amount of dialogue since the beginning of Season 1, which abruptly ends after a certain point. After it cuts off, every square after that episode is blank meaning that the character is gone. In the case of Game of Thrones, it is reasonable to infer that they are dead.
A few characters have tons of dialogue in early episodes which are suddenly cut short.
From the character page, specifically the BFFs chart, we can infer who the character is traveling with, as they often have dialogue with the people around them. For example, the image below shows that Tyrion is traveling with Bronn and Podrick.
The characters whom Tyrion interacts with the most in Season 4.
In each Game of Thrones episode, the show typically shifts between several rotating main characters at different locations. From the episode treemap, we can visualize which main characters were focused on within a certain episode. In the example below, we can see that Robb Stark and Catelyn Stark have the 2nd and 3rd most lines in Episode 9 of Season 3, so a good portion of the episode must focus on them. Background knowledge can confirm this for us, as this is the episode of the Red Wedding, where their deaths were a focal point.
Robb and Catelyn Stark with the 2nd/3rd most lines spoken (at The Red Wedding).
From the Game of Thrones map, we were able to discover which episodes have flashback scenes. When I stumbled onto the episode shown below, there was a log for the characters Lyanna and Rhaegar, whom I know were already dead prior to the start of the show. This, along with the location being in Dorne (where the Tower of Joy is), tells me that this is a flashback.
Lyanna Stark and Rhaegar Targaryen are already dead prior to the start of the show.
From the map’s action log and path on the map, we can discover what happens to the character throughout the entire series. From the map below, we learn that Bran travels north, even going beyond The Wall. From his one location down in Dorne (same location as the Tower of Joy above), he is in some way associated with the flashback.
Bran travels up north beyond The Wall, and eventually goes to King’s Landing for the finale.
From the character group filter on the map, we filtered for Dothraki, which shows the path of all Dothraki characters. As the lines seem to be overlapping (thick lines on map), we can guess that all Dothraki traveled together. Based on the path of the Dothrakis, we can guess that the army was eventually moved from Essos to Westeros.
Log and path for all Dothrakis.
Process
We used D3 for our visualizations. Additionally we used Vite without a framework to build and bundle our app and the data preprocessing was done using Python and Pandas.
We used Marcellus by Astigmatic for our display type and Overpass by Delve Withrington, Dave Bailey, and Thomas Jockin as our main typeface.
Responsibilities
Amogh Silaparasetti - I primarily worked implementing the episodes page where the user can select their own combination of episodes and see what characters have appeared and how many words they had.
Anne Ning - I mainly worked on the map of Westeros and Essos, as well as all functionalities on the map page. I created the map filters and the action log, and the methods of processing data for the map.
Jonah Carter - My main focus was the heatmap and ensuring the data was displayed in a way that showed a clear progression over the course of the show and allowed the user to get an idea of how prevalent certain characters are and when they show up together at a glance.
Kevin Long - I primarily worked on the character page and corresponding top word and BFF visualizations. I also helped work on the title page/screen.
AI Use
We used AI to write most of our Python data preprocessing scripts. We provided it with a list of the data we needed and a sample of the data and after a lot of finagling we got something that worked well enough for our purposes.
We also used AI to help with some of the debugging process.
Future Work
I think one thing we would have liked to do if given more time was to add a better way to link our visualizations together. We had plans for a dashboard with multiple tabs, but by the time we had all the visualizations done (the more important part of the project) we had essentially run out of time and had to scramble to get something done. We like what we have well enough and it serves its purpose but we had grander plans we didn’t have time to fully realize.
Some of the ideas included a music player with the theme and possible soundtrack related to different affiliations/regions, data visualizations based on the factions within the show such as the words spoken by each faction, and even a chart of common profanities (which there were many!).
