Skip to content
master
Switch branches/tags
Code

README.md

Game of Thrones Datasets and Visualizations

  1. About this Project
  2. Visualizations
    1. Interfaces
    2. Narrative Charts
    3. Screen Time
    4. Cumulative Time
    5. Wordcount & Language
    6. Co-Occurrence
    7. Relationships
    8. Actor Relationships
    9. Lands of Ice and Fire Geography
    10. Prediction
    11. Other People's
  3. Data
  4. Use, Licensing, Attribution

About this Project

Articles on Medium

Data Visualization Episode Recaps

Interfaces

Episode Viewer: episode/

Script Search: search/mongodb/

  • A simple search interface to explore the words spoken on Game of Thrones, including who says each line and text and translations in Dothraki, Valyrian, etc.
    Search the database || Explore the code

Visualizations

Narrative Charts

Narrative Chart: map/

  • A visualization of when each character is on-screen throughout the show, where they are, with whom they are, when they die, and more.
    View the visualization || Explore the code
    • process.html: Builds keyValues.json from episodes.json by adding y-values and additional location-specific information and outputs the data for keyValues.json.
    • index.html: Builds the visualization using d3.js and outputs the Game of Thrones narrative chart.

Game of Thrones Narrative Chart

Note: map contains spoilers.


Heatmap / Flattened Narrative Chart: heatmap/

  • A visualization of how many characters are in locations throughout the show.
    View the visualization || Explore the code
    • includes a calcData parameter that pre-processes the data for data/heatmap.json.

Game of Thrones Heatmap

Inspired by Hubble Image of Galaxy Cluster Converted Into Sound.


Screen Time

Characters On Screen: scenes-character/

Game of Thrones Characters On Screen


Locations On Screen: scenes-location/

Game of Thrones Locations On Screen


More-Specific Locations On Screen: scenes-sublocation/

Game of Thrones Sublocations On Screen


Special Scenes On Screen: scenes-special/

Game of Thrones Special Scenes On Screen


Deaths On Screen: bubble-death/

Game of Thrones Deaths On Screen


Weapons On Screen: scenes-weapons/

Game of Thrones Weapons On Screen


Houses On Screen: scenes-house/

Game of Thrones Houses On Screen


Number of Characters Per Scene: characters-per-scene/

Game of Thrones Number of Characters Per Scene


Continuous Screen Time: bubble-character/

Game of Thrones Continuous Screen Time

Circles are color-coded by House.


Cumulative Time

Supercut Duration: duration-character/

Game of Thrones Supercut Duration

Based on Andrew Reid's Horizontal Stacked Bar Chart.


Screen Time Per Season: duration-per-season/

Game of Thrones Screen Time Per Season

Based on Andrew Reid's Horizontal Stacked Bar Chart.


Character On Screen Time Per Episode: episode-character/

Game of Thrones Character On Screen Time Per Episode

Based on Harry Stevens's Linear Regression for Scatter Plot.


Screen Time Per Location: duration-per-location/

Game of Thrones Screen Time Per Location

Based on Andrew Reid's Horizontal Stacked Bar Chart.


Screen Time Per More-Specific Location: duration-per-sublocation/

Game of Thrones Screen Time Per More-Specific Location

Based on Andrew Reid's Horizontal Stacked Bar Chart.


Character Time Percentage Per Season: duration-percent/

Game of Thrones Character Time Percentage Per Season

Based on Mike Bostock's Normalized Stacked Bar Chart.


Overall Character Time (Treemap): duration-treemap/

Game of Thrones Overall Character Time (Treemap)

Based on takayuki's Treemap in d3 v4.


Screen Time Per House: duration-house/

Game of Thrones Screen Time Per House

Based on Andrew Reid's Horizontal Stacked Bar Chart.


Travelling Characters: region-percent/

Game of Thrones Travelling Characters

Based on Mike Bostock's Normalized Stacked Bar Chart.


Screen Time in Locations Per Episode: location-per-episode/

Game of Thrones Screen Time in Locations Per Episode

Based on Andrew Reid's Horizontal Stacked Bar Chart.


Screen Time Per Gender By Season: duration-gender-season/

Game of Thrones Screen Time Per Gender By Season

Based on wpoely86's Diverging Stacked Bar Chart.


Screen Time Per Gender By Episode: duration-gender-episode/

Game of Thrones Screen Time Per Gender By Episode

Based on wpoely86's Diverging Stacked Bar Chart.


Screen Time Per Gender By Episode (Percent): duration-gender-percent/

Game of Thrones Screen Time Per Gender By Episode (Percent)

Based on wpoely86's Diverging Stacked Bar Chart.


Wordcount & Language

Character Wordcount: wordcount-character/

Game of Thrones Character Wordcount

Based on Andrew Reid's Horizontal Stacked Bar Chart.


Character Wordcount By Season: wordcount-per-season/

Game of Thrones Character Wordcount By Season

Based on Andrew Reid's Horizontal Stacked Bar Chart.


Wordcount Per House: wordcount-house/

Game of Thrones Wordcount Per House

Based on Andrew Reid's Horizontal Stacked Bar Chart.


Wordcount Per Gender By Season: wordcount-gender-season/

Game of Thrones Wordcount Per Gender By Season

Based on wpoely86's Diverging Stacked Bar Chart.


Wordcount Per Gender By Episode: wordcount-gender-episode/

Game of Thrones Wordcount Per Gender By Episode

Based on wpoely86's Diverging Stacked Bar Chart.


Wordcount Per Gender By Episode (Percent): wordcount-gender-percent/

Game of Thrones Wordcount Per Gender By Episode (Percent)

Based on wpoely86's Diverging Stacked Bar Chart.


Languages Spoken Per Character: language-character/

Game of Thrones Languages Spoken Per Character

Based on Andrew Reid's Horizontal Stacked Bar Chart.


Languages Spoken Per Episode: language-episode

Game of Thrones Languages Spoken Per Episode

Based on Andrew Reid's Horizontal Stacked Bar Chart.


Co-Occurrence

Character Co-Occurrence Matrix: matrix/

Game of Thrones Co-Occurrence Matrix

Based on Mike Bostock's Les Misérables Co-occurrence.


Force-Directed On-Screen Co-Occurrence: force-directed/

Game of Thrones Force-Directed On-Screen Co-Occurrence

Based on heybignick's d3 v4 force-directed graph.


Chord Diagram of On-Screen Co-Occurrence: matrix-chord/

Game of Thrones Chord Diagram of On-Screen Co-Occurrence

Based on HenryLau's chord diagram on JSFiddle.


Relationships

Force-Directed Relationships: relations-force/

Game of Thrones Force-Directed Relationships

Parent-child (solid gray), spouse (dashed blue), and killed by (solid black arrow) relationships shown. Based on Mike Bostock's Labeled Force Layout.


Circle-based Relationships: relations-circle/

Game of Thrones Circle-based Relationships

Parent-child (solid gray), spouse (dashed blue), and killed by (solid black arrow) relationships shown. Based on an HBO infographic.


Force-Directed Sexual Relationships: relations-force-sex/

Game of Thrones Force-Directed Sexual Relationships

Based on a Cool Material infographic.


Actor Relationships

Costars List: costars-list/

Game of Thrones Costars List

Data last pulled following Season 7.


Costars Matrix: costars-matrix/

Game of Thrones Costars Matrix

Data last pulled following Season 7. Based on Mike Bostock's Les Misérables Co-occurrence.


Lands of Ice and Fire Geography

Force-Directed Network of Opening Sequence Locations: opening-locations-force/

Game of Thrones Force-Directed Network of Opening Sequence Locations

Based on heybignick's d3 v4 force-directed graph.


Geographic Network of Opening Sequence Locations: opening-locations-fixed/

Game of Thrones Geographic Network of Opening Sequence Locations

Based on the A Song of Ice and Fire Wiki geography.


Locations on a Globe: geography-locations/

Game of Thrones Locations on a Globe

Adapted from Jason Davies' "Rotate the World".


Opening Sequence Locations: opening-seq-arcs/

Game of Thrones Opening Sequence Locations

Adapted from Andrew Mollica's "World Tour along Flying Arcs".


Opening Sequence Locations (with Underlying Matrix): opening-seq-matrix/

  • A geographic visualization of the Game of Thrones opening sequence locations on a globe with an underlying matrix showing the frequency of opening sequence paths between locations.
    View the visualization || Explore the code

Game of Thrones Opening Sequence Locations (with Underlying Matrix)

Adapted from Andrew Mollica's "World Tour along Flying Arcs".


Character Travel Paths: character-arcs/

Game of Thrones Character Travel Paths

Adapted from Andrew Mollica's "World Tour along Flying Arcs".


Prediction

Simple Cluster Analysis (for Prediction?): episode-character-scatter/

  • A simple cluster analysis plotting the slope and y-intercept of the linear regression of time spent on-screen in each episode. We'll see whether it's predictive at all.
    View the visualization || Explore the code

Game of Thrones Simple Cluster Analysis (for Prediction?)

Adapted from Harry Stevens's Linear Regression for Scatter Plot.


Other People's

Data

data/episodes.json

{
  "episodes": [
    {
      "seasonNum": integer,
      "episodeNum": integer,
      "episodeTitle": "string", // from imdb
      "episodeLink": "string", // endpoint: www.imdb.com
      "episodeAirDate": "string", // from imdb
      "episodeDescription": "string", // from imdb
      "openingSequenceLocations": [
        "string",
        ...
      ],
      "scenes":[
        {
          "sceneStart": "string",
          "sceneEnd": "string",
          "location": "string",
          "subLocation": "string",
          "altLocation": "string",
          "flashback": Boolean,
          "greensight": Boolean,
          "warg": Boolean,
          "characters": [
            {
              "name": "string",
              "title": "Hand | Khal | Khaleesi | King",
              "alive": Boolean,
              "born": Boolean,
              "weapon": [
                {
                  "action": "string",
                  "name": "string"
                }
              ],
              "sex": {
                "with": [
                  "string"
                ],
                "when": "string",
                "type": "string"
              },
              "married": {
                "to": "string",
                "when": "string",
                "type": "string",
                "consummated": Boolean
              },
              "mannerOfDeath": "string",
              "killedBy": [
                "string"
              ]
            },
            ...
          ]
        },
        ...
      ]
    },
    ...
  ]
}

data/characters.json

{
  "characters":[
    {
      "characterName": "string",
      "characterLink": "string", // endpoint: www.imdb.com
      "characterImageThumb": "string",
      "characterImageFull": "string",
      "actorName": "string", // OR actors: []
      "actors": [
        {
          "actorName":"Richard Dormer",
          "actorLink":"/name/nm0233807/",
          "seasonsActive":[
            integer,
            ...
          ]
        },
        ...
     ],
      "actorLink": "string", // endpoint: www.imdb.com
      "houseName": [
        "string", // just string if single value
        ...
      ],
      "nickname": "string",
      "royal": Boolean,
      "kingsguard": Boolean,
      "parents": [
        "string",
        ...
      ],
      "parentOf": [
        "string",
        ...
      ],
      "guardianOf": [
        "string",
        ...
      ],
      "guardedBy": [
        "string",
        ...
      ],
      "siblings": [
        "string",
        ...
      ],
      "marriedEngaged": [
        "string",
        ...
      ],
      "allies":[
        "string",
        ...
      ],
      "abducted":[
        "string",
        ...
      ],
      "killed": [
        "string", 
        ...
      ],
      "killedBy": [
        "string",
        ...
      ],
      "serves": [
        "string",
        ...
      ]
      "servedBy": [
        "string",
        ...
      ]
    },
    ...
  ]
}

data/characters-groups.json

{
  "group": [
    {
      "name": "string",
      "characters": [
        "string",
        ...
      ]
    },
    ...
  ]
}

data/characters-include.json

{
  "include":[
    {
      "name": "string",
      "include": Boolean
    },
    ...
  ]
}

data/locations.json

{
  "regions":[
    {
      "location": "string",
      "subLocation": [
        "string",
        ...
      ]
    },
    ...
  ]
}

data/characters-gender-all.json

{
  "male": [
    "string",
    ...
  ],
  "female": [
    "string",
    ...
  ]
}

data/characters-gender.json

{
  "gender": [
    {
      "gender":"male",
      "characters": [
        "string",
        ...
      ]
    },
    {
      "gender":"female",
      "characters": [
        "string",
        ...
      ]
    }
  ]
}

data/colors.json

{
  "colors": [
    {
      "name": "string",
      "hexadecimal": "string",
      "webSafe": "string",
      "basic": "string",
      "rgb": "string",
      "class": [
        "string"
      ],
      "css": {
        "stroke-width": "string",
        "stroke-dasharray": "string",
        "stroke-linecap": "string"
      }
    },
    ...
  ]
}

data/costars.json

{
  "IMDB_ID": {
    "imdb_id": "string",
    "title": "string",
    "year": "string",
    "actors": [
      {
        "personID": "string",
        "actorName": "string",
        "characterName": "string"
      },
      ...
    ]
  },
  ...
}

data/heatmap.json

A pre-processed file for the heatmap/ visualization:

[
  {
    "name": "string",
    "count": [
      {
        "x1": integer,
        "x2": integer,
        "z": integer
      },
      ...
    ]
  },
  ...
]

data/keyValues.json

A pre-processed file for the map/ visualization:

{
  "characters": {
    "CharacterName": {
      "key": "string",
      "values": [
        {
          "s": integer,
          "e": integer,
          "y": integer
        },
        ...
      ]
    },
    ...
  },
  "episodes": [
    {
      "seasonNum": integer,
      "length": integer,
      "shift": integer,
      "episodes":[
        {
          "episodeNum": integer,
          "length": integer,
          "episodeTitle": "string",
          "shift": integer
        },
        ...
      ]
    },
    ...
  ],
  "locations": [
    {
      "name": "string",
      "max": integer,
      "middle": integer
    },
    ...
  ],
  "sublocations": [
    {
      "name": "string",
      "max": integer,
      "middle": integer
    },
    ...
  ]
}

data/lands-of-ice-and-fire.json

A GeoJSON file for geographic visualizations.

// It's better to just go look at the file if you're curious.

data/opening-locations.json

A data file for the opening-locations-fixed/ visualization:

{
  "note": "string",
  "locations": [
    {
      "name": "string",
      "fx": float,
      "fy": float
    },
    ...
  ]
}

data/wordcount-gender.json

{
  "male": [
    "string",
    ...
  ],
  "female": [
    "string",
    ...
  ],
  "crowd": [
    "string",
    ...
  ]
}

data/wordcount-synonyms.json

A working file to rename characters in the script.

{
  "synonyms": [
    {
      "accepted": "string",
      "alt": [
        "string",
        ...
      ]
    },
    ...
  ],
  "groups": [
    "string",
    ...
  ], 
  "others": [
    "string",
    ...
  ]
}

data/wordcount.json

{
  "count": [
    {
      "episodeAlt": "string",
      "seasonNum": integer,
      "episodeNum": integer,
      "episodeTitle": "string",
      "text": [
        {
          "name": "string",
          "count": integer,
          "lang": "string", // optional
          "type": "string" // optional
        },
        ...
      ]
    },
    ...
  ]
} 

data/script-bag-of-words.json

{
  "count": [
    {
      "episodeAlt": "string",
      "seasonNum": integer,
      "episodeNum": integer,
      "episodeTitle": "string",
      "text": [
        {
          "name": "string",
          "text": "string",
          "lang": "string", // optional
          "translation": "string", //optional
          "type": "string" // optional
        },
        ...
      ]
    },
    ...
  ]
} 

Use, Licensing, Attribution

Feel free to take an use this data however you'd like. It's provided as is, is a creative work, and is probably not perfectly accurate.

I only ask that you cite this repository if you do post/publish/share something you make using the data, and that you let me know (on Github or by email) about what you've made.

About

Game of Thrones Datasets and Visualizations

Resources

Releases

No releases published

Packages

No packages published

Languages