What do you think this is?

Just thoughts of a restless mind...

Who will sit on the Iron Throne?

Chances are you are familiar with the phenomenon called Game of Thrones. I expect that everybody who watches the series has a perspective and a preference on the person they wish to sit in the Iron Throne. But let's be honest; only science can forecast the outcome!

So here is a (funny and totally unscientific of course) analysis on the subject:

Methodology

The methodology is inspired by Michal Špaček and his blog about the Top 10 coffee brands. We count the support of the people for the Houses of the seven kingdoms, based on how many people have used the House's name as their password.

Data collection

The names of the Houses in the series are taken by A Very Official Game Of Thrones Houses Power Ranking For Season 8 written by Sydney Bucksbaum. Spoiler alert: Sorry Sydney, science contradicts your rating!

The number of the people having used the name of one of the Houses as their password, is estimated by querying the frequency of password presence in one of the breaches, as maintained by Troy Hunt. We use the Have I Been Pwned API for that. I won't get into technical details, but if you're interested, the API is well documented.

Data analysis

Instead of using just the name of the House, we do expect that people use variations of it. As such the data analysis takes into account six variations of the names: The name in singular and plural, in all capitals and all lower case, as well as the name in singular and plural with the first letter capitalized.

Results

Following this method, we reach the following results: House Arryn 41 House Greyjoy 69 House Baratheon 79 House Targaryen 145 House Lannister 353 House Tully 828 House Stark 3190 House Tyrell 6548

The script that collects data and generates these results follows:

#!/usr/bin/perl use strict; use warnings; use Digest::SHA1 qw(sha1_hex); use LWP::Simple; my %houses = (Targaryen => 0, Stark => 0, Lannister => 0, Greyjoy => 0, Arryn => 0, Baratheon => 0, Tully => 0, Tyrell => 0, ); for (sort keys %houses) { my $original=$_; my @variations=($original, $original.'s', lcfirst($original), lcfirst($original).'s', uc($original), uc($original.'s')); foreach (@variations) { my $hash=uc(sha1_hex($_)); my $content = get('https://api.pwnedpasswords.com/range/' . substr($hash, 0, 5)); if (defined $content) { my @lines = split(/\n/, $content); foreach (@lines) { my ($thash, $cnt) = split(/:/, $_); if ($hash eq substr($hash, 0, 5).$thash) { $houses{$original} += $cnt; last; } } } sleep(15); } } for(keys %houses) { print("$houses{$_} people support the House $_ for the Iron Throne\n"); }

Conclusions

It is obvious (!!!) that people want House Tyrell to win! Unfortunately this won't happen, as we all know that House Tyrell has no living survivors since season 7. I am surprised by Sydney's analysis that thinks that House Targaryen is the strongest one. Obviously people are not happy with Targaryens as their rulers.

Finally, considering all the ways that George R.R. Martin has been consistently killing our favourite characters in the past, we can (safely?) conclude that the Iron Throne will be conquered by the least possible candidate. In this case, as the data suggests, this place is occupied by the leader of House Arryn, the (not so) great and (definitely not) mighty Lord Robin Arryn.

Postscriptum

You know, all trademarks belong to their holders etc. Nothing serious about this blog post people, and unless Lord Robin Arryn really gets the throne (now THAT would be a surprise), you can assume this post is humorous and satirical.