In 2021, I decided to try my hand at a data analysis project for the first time. My subject was The Wandering Inn by pirateaba, a 30,000-word fantasy epic that I had been reading for the past couple years. I wanted to use my newfound knowledge of R and its corresponding frontend framework Shiny to give myself a sense of scale for the author's work.
For those unfamiliar, R is a simple interpreted programming language used by scientists and statisticians, while Shiny is a very high-level frontend framework used to deploy R visualizations to the Internet. It comes with a variety of pre-built menus and chart components that are designed to make deployment as painless (and as far away from JavaScript) as possible. Shiny is also reactive, meaning that charts can be re-rendered on the client side with the click of a button.
Unlike my other projects, which took multiple years to reach their final form, the Wandering Inn Visualization only took a couple of weeks to get off the ground. The only new tech I was working with was rvest, a web scraping package that was not all too dissimilar from the jsoup library I used in the Java Edition of my Popheads Chart project. This made the development process relatively simple.
This isn't to say that the process was entirely without snags. One issue was the sheer size of the text. I initially just scanned directly from the text on the client side within the app. But this quickly turned out to be a bad idea, and it was a good demonstration of why databases are necessary. I ended up storing the text in a big spreadsheet, but I would definitely store it in a database if I was doing the project over again.
Most of my page views are just straightforward Plotly visualizations that use Shiny to inject the chart with fields. One view that goes beyond this is the Chapters by Date page, which visualizes the word count in calendar format. I achieved this by introducing a special ggplot2 calendar theme.
In the end, this was the first coding project I was able to post publicly in its finished form. It felt great to ship something so quickly, which inspired me to take on more personal projects. While this particular project didn't teach me too much on the technical side, it did wonders for my imposter syndrome and motivated me to learn more about the world of web development.
—K, August 2023