The Wandering Inn (Statistics)

Project

The Wandering Inn (TWI) is a webnovel or web serial if you prefer. In fact it's one of the longest you'll find. At the time of this writing, the word count clocks in at over 13 million. For the record, that's over 27 times the length of The Lord of the Rings and almost 3 times the length of The Wheel of Time. Personally I love the story, but I'm not hear to talk about that today. Instead we're going to take a look at a data visualization project I've been working on.

Due to its length, TWI has a vast collection of characters, locations, magical items etc. that are mentioned by name throughout the story. Not only that, the story also includes references to [Classes], [Skills], [Spells] and some other things in brackets. To understand why would require that we delve into the lore a bit, but suffice to say, all these references make up some interesting data points to analyze in terms of their frequency, location on the timeline, and relationships with one another.

TWI Stats is a project that aims to let anyone explore interesting stats related to all the items above via various tables and interactive charts and graphs.

The code can be found at https://github.com/cblanken/wandering-inn-stats

Check out the live deployment at https://twi-stats.cblanken.dev

i !
Warning

At the time of this writing, the application only includes statistics up through volume 9. No chapters of volume 10 have been analyzed yet. During development, the wiki underwent significant changes and development which broke much of the web scraping required to keep the database current with all the characters, [Classes], and [Skills] etc. The wiki data collection modules are currently being refactored to accommodate the new wiki and extract data via the MediaWiki API to be more robust in the future.

Word counts

Of course, we have word counts. Even if they aren't particularly interesting, they're fun to keep track of. That way we can at least compare the length to other works.

Word count by chapter

word count by chapter Current interactive version

Cumulative word count over time

Amazingly, the author's pace hasn't flagged at any point over the last several years of writing.

word count over time Current interactive version

Word counts by book

These books actually refer to the audiobook releases of the serial.

word count by book Current interactive version

Word counts by volume

Volumes are the original demarcation of major plot points of the web serial. As you can see, they keep getting longer 👀.

word count by volume Current interactive version

Mentions

There are several important reference types that warrant tracking mentions. These include:

  1. Characters
  2. [Classes]
  3. [Skills]
  4. [Spells]
  5. [Locations]
i !
Note

There are some other types that would be interesting to track as well, but they're still under development. These will include things like named magical items and monsters.

Here's an example of the chart for the most referenced [Classes].

class mentions Current interactive version

Additionally each of these reference types has a breakdown with a few more charts describing how often they're mentioned across chapters and the chapters with the most references for each type.

For example, the [Mage] class has the following charts.

[Mage] mention count (cumulative)

mage cumulative mention count Current interactive version

[Mage] mention count (chronological)

mage chronological mention count Current interactive version

[Mage] most mentioned chapters

mage most mentioned chapters Current interactive version

There are few more stats that are tracked as well, but they're specific to each individual reference type and I won't go into detail here. You can check them out on their respective pages of the application.

Technology

The TWI Stats project is built with the following open source software:

Attributions

Author

A huge thanks to Pirateaba for writing such a wonderful web serial and keeping all the ducks fed for so many years.

Wiki

This project wouldn't be possible without all the awesome folks maintaining the TWI Wiki and tracking the thousands of various characters, [Classes], [Skills] etc.

Boggler

Project

Boggle is an excellent little word game. If you haven't played before, here are some details on how to play.

Each round is played on a board of dice arranged in a square. Each player writes down as many words as they can composed of the connected letters on the board. Longer words are worth more points. Play lasts until a player reaches an agreed upon score or time limit is reached.

A board would look something like this. boggle board example

Anyway, I enjoyed playing the game a lot with my family growing up and it was always fun finding new or absurdly long words. Unfortunately after a round ends, the board is re-rolled never to be seen again leaving all those potential words lost to time. This is where the Boggler comes in.

If you don't care too much about the details, you can check out the live application at boggler.cblanken.dev. Have fun!

Features

The Boggler is first and foremost an application for solving Boggle boards. Just enter all the letters from your game board and click "solve". The application will check several dictionaries to provide you with a searchable table of all the available words from the board. This is great for finding the longest words or words that used a particular set of letters that you're interested in.

To follow along with the examples below, you can find the interactive board at https://boggler.cblanken.dev/board/solved/6dc8aaa7cb8bc0b12be3e8aeafcede64

Solved board table

Each solved board has an interactive board page where you can peruse all the available words in a table and filter the results however you see fit.

For example the word table for the example board above looks like this.

boggler table

You can see in this example that the table is sorted by word length. A great way to find some of the cool words you might have missed.

Dictionaries

You'll notice there is also a series of dictionaries available to select from just above the table. If there are any you'd prefer not to use for your games, simply uncheck them from here.

solved board dictionaries

Personally, I've found them all to be relatively reliable with the exception of the dwyl dictionary. It's an open source English dictionary which you can read more about here. Unfortunately, it also contains many words that are invalid for Boggle. To read more about the other dictionaries, please see the Dictionary section on the homepage.

Heatmap

One of my favorite features is the heatmap. The heatmap displays how many times a letter was used by all the available words making it possible to pick out hotspots and identify some of the more useful letter combinations and patterns.

boggler board heatmap

Filtering

There are a few methods for filtering the results of the solved board. The first being the aforementioned dictionary list. Words are only shown if at least one of the enabled dictionaries contains the word.

Another is the search bar available above the word table. table search

It isn't necessary to search for full words, you might have noticed searching for "rod" also shows words like "trod" and "trode". Words with the target letter sequence will be shown regardless of where the letters appear in the word.

And finally, the board itself also functions as a filter. To enable this, click on any letter in the board to filter for words that pass through that letter. board letter filter

Clicking the red "filter" button below the board will remove the filter.

In this example, the letter "I" in the first row is selected, which is indicated by the red background color and blue border around the selected letter. The word table reflects all the words that pass through that "I".

i !
Note

Only a single letter can be filtered with this method. To find more complex letter combinations, you'll need to resort to using the table's search bar. However, they can be used in tandem.

Path tracing

Each word has a unique path on the board and clicking a word in the table will render that path. For example one of the longest words for this board is "indirect". The first letter of the word is indicated by a darker background color. word path

Saved boards

Solved boards are all saved in a database and can be viewed at https://boggler.cblanken.dev/solved. This means you can easily share any solved boards. Each solved board has a unique URL and you can either copy the URL directly or click the "Share" button above the board to automatically copy it to your clipboard.

The example we've been looking at is available at https://boggler.cblanken.dev/board/solved/6dc8aaa7cb8bc0b12be3e8aeafcede64

Technology

Boggler uses HTML and Flask's Jinja templating engine for composing content.

The board and dictionary data are backed by a SQLite database.

The styling uses custom CSS and some Bootstrap for a couple components.

Vanilla JavaScript is used in conjunction with the following JavaScript libraries for dynamic interaction with the board and tables.

  1. DataTables to display word and board tables
  2. LeaderLine to render the word path overlays