Skip to content

dh-nuigalway/Personae

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#Personae - A Character-Visualisation Tool for Dramatic Texts

Submitted for the NVS Challenge, 2016 - July, 2016

Created by David Kelly, Justin Tonra and Lindsay Ann Reid at the Moore Institute, NUI Galway.

##Objective

The aim of these visualisations is to use the XML files from the New Variorum Shakespeare edition of The Comedy of Errors to create a resource for exploring patterns of speeches by and mentions of characters in Shakespeare’s work. Visualising the frequency, extent, and position of dialogue relating to a particular character presents users with a simple and immediate measure of that character’s prominence within the play. The tool enables users to select and visualise individual characters’ involvement, producing a novel means of exploring large-scale structural, narrative, or character-focused patterns within the text.

See a live demo and read about the development rationale at http://www.davidkelly.ie/projects/personae

##Development Overview

The play-text XML is parsed using Python to extract a set of JSON files. These are used in a set of D3.js-based visualisations on the site's front-end.

###Usage

Here are some instructions if you want to build the visualisations from scratch:

####Backend

The Python script to process the XML relies on lxml. The data-processing/input directory contains the NVS repository files.

The default play to process is The Comedy of Errors - you can change this to The Winter's Tale by editing the play_prefix variable at the top of the data-processing/personae.py file.

Running python personae.py in data-processing/ will output a set of JSON files to frontend/app/data. It will also output a .csv file to data-processing/output containing a count of unique <name></name>s found, should you wish to identify locations to geo-code (this isn't handled by the software).

####Front-end requirements

The front-end of the site uses D3 (v4.1.1) for data visualisation, Leaflet.js for mapping, as well as Underscore and Bootstrap (v3.3.6) (LESS).

Building the front-end depends on Grunt and Bower.

Assuming these are installed, to install the project requirements run:

npm install
bower install

To build a production version of the front-end, run:

grunt

...this will output the production files to frontend/personae/.

To serve a preview of the front-end at http://localhost:9000/, run:

grunt serve

...this will automatically open the preview site in your browser.

##Issues or Contributions

Bug fixes or suggested improvements are welcome via the issues section, or as a pull-request.