Skip to content

andrewheiss/Harry-Potter-aggression

Repository files navigation

Harry Potter Aggression Data

Someone collected a fantastic dataset of all the instances where characters in the Harry Potter books acted aggressively, resulting in lots of interesting data visualizations. For instance, it appears that Harry is quite a sociopath, with more aggressive actions than any other character:

Top 5 aggressive characters

However, this does not account for the actual time the characters appear in the books. Harry is the subject of the series and the whole narrative centers around him, so it's logical that he would have the most aggressive actions.

We can adjust for "screen time" by counting the number of mentions each character gets in the series. I downloaded the full text of the Harry Potter series and did a crude search to find the number of paragraphs each character was mentioned in each book (raw data). With this data on mentions, we can calculate the proportion of aggressive actions per mention in the books.

Using this data, the top 5 from before are far less aggressive. More obviously bad characters like boggarts, the basilisk, Nagini, and random death eaters are the most aggressive:

Aggression adjusted for mentions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published