As part of a personal data science project, and as a fun way to contribute to IF writing tools and research on IF narrative structure, I’ve developed a tool (twine-graph) for producing structured json files and automatically laid-out graphviz visualizations of link structure from html Twine stories.
The project (twine-story-clustering) culminated in using the tool to create a research corpus of Twine stories that have been entered over the years into IFComp and Spring Thing (159 total), in both json and pdf formats, and writing a Jupyter notebook that runs a clustering analysis to visualize which stories are similar according to structural features.
My hope is for the tool and corpus to be useful to the community in a couple of different ways. The tool might be relevant to command-line savvy authors as a way to visualize in-progress or completed story structure through graphviz’s smart, automatic layout algorithm. The corpus, meanwhile, could be an interesting resource for ongoing research into the use of narrative structure in Twine stories—trends in narrative approaches over time, differences across competitions, and more.
Any feedback is appreciated. Cheers!