+1 (315) 557-6473 

Decoding Literary Styles: Stylometric Analysis of Young Adult Authors

Embark on a journey through the intricate tapestry of literary craftsmanship as we employ stylometric analysis to unravel the distinct writing styles of renowned young adult authors. This exploration delves into the worlds crafted by J.K. Rowling, Suzanne Collins, and Rick Riordan, employing the R programming language to dissect their works and draw compelling comparisons. From word frequencies to lexical diversity, join us in deciphering the nuanced artistry that defines each author's literary signature.

Problem Description:

In this Data analysis assignment delves into the fascinating world of stylometry, a technique employed to dissect and compare the writing styles of three prominent young adult authors: J.K. Rowling, Suzanne Collins, and Rick Riordan. Using a carefully curated corpus of their works, the analysis employs the R programming language to uncover distinctive patterns and nuances in their literary expressions.


Stylometry, the art of scrutinizing authorial writing styles, serves as the foundation for this analysis. Our focus narrows to the works of J.K. Rowling, Suzanne Collins, and Rick Riordan, where we explore the intricacies of their literary craftsmanship through the lens of stylometric analysis.


Employing the versatile R programming language, we meticulously selected a corpus of 17 texts, comprising iconic series such as Harry Potter, The Hunger Games, and Percy Jackson. Additional excerpts, including "A Cuckoo’s Calling" by Robert Galbraith and "Harry Potter and Leopard-Walks-Up-To-Dragon" by J.K. Rowling, enriched our dataset.

We initiated the exploration by extracting word frequencies from the Harry Potter series, both with and without stopwords. The subsequent visualizations, encompassing tables, ggplot bar graphs, and wordclouds, artfully present the distinctive elements of each book, laying the groundwork for insightful comparisons.


The analysis unfolds through captivating visual aids, such as tables showcasing the top 10 words in the Harry Potter series, revealing intriguing patterns with and without stopwords. Graphical representations unravel the unique word frequencies for each book in the series, providing a visual narrative of the evolution of writing styles within the wizarding world.

Juxtaposing the writing styles of J.K. Rowling and Suzanne Collins through scatterplots not only highlights the distinctiveness of their word choices but also opens a window into the thematic landscapes they traverse. Lexical diversity measures further enrich our understanding, offering nuanced insights into the authors' choices and preferences.

Graph from Stylometric Analysis

Authorship Determination:

The journey takes an intriguing turn as we venture into the realm of authorship determination. Two additional excerpts, Galbraith_Cuckoo.txt and Rowling_Leopard.txt, are subjected to meticulous stylometric analyses. The findings suggest a probable connection between Robert Galbraith and J.K. Rowling, underscoring the potential of stylometry in unmasking pseudonymous identities.


In summation, our exploration into stylometry not only unravels the distinct writing styles of celebrated authors but also ventures into the realm of authorship attribution. While our findings offer compelling insights and educated guesses, they also underscore the nuanced nature of stylometric analysis—a powerful tool that beckons further exploration and validation in the ever-evolving landscape of literary analysis.