Week Beginning 24th July 2017

I spent Monday this week creating the Android version of the ‘Basics of English Metre’ app, which took a little bit of time as the workflow for creating and signing apps for publication had completely changed since the last time I created an app.  The process now uses Android Studio, and once I figured out how it all worked it was actually a lot easier than the old way that used to involve several command-line tools such as zipalign.  By the end of the day I had submitted the app and on Tuesday both the iOS and the Android version had been approved and had been added to the respective stores.  You can see the iOS version here: https://itunes.apple.com/us/app/the-basics-of-english-metre/id1262414928?mt=8 and the Android version here: https://play.google.com/store/apps/details?id=com.gla.stella.metre&hl=en_GB&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1.  The Web version is also available here: http://www.arts.gla.ac.uk/stella/apps/web/metre/.

On Friday I met with Stuart Gillespie in English Literature to discuss a new website he requires.  He has a forthcoming monograph that will be published by OUP and he needs a website to host an ‘Annexe’ for this publication.  Initially it will just be a PDF but it might develop into something bigger with online searches later on.  Also this week I had a further email conversation with Thomas Clancy about some potential place-name projects that might use the same system as the REELS project and I had a chat with someone from the KEEP archive if Suffolk about hosting the Woolf short story digital edition I’ve created.

I spent the rest of the week getting back into the visualisations I’ve been making using data from the Historical Thesaurus for the Linguistic DNA project.  It took me some time to read through all of the documentation again, look through previously sent emails and my existing code and figure out where I’d left things off several weeks ago.  I created a little ‘to do’ list of things I need to do with the visualisations.  My ‘in progress’ versions of the sparklines went live when the new version of the Historical Thesaurus was launched at the end of June (see http://historicalthesaurus.arts.gla.ac.uk/sparklines/) but these still need quite a bit of work, firstly to speed up their generation and secondly to make sure the data actually makes sense when a period other than the full duration is specified.  The pop-ups that appear on the visualisations also need to be reworked when looking at shorter periods too as the statistics contained currently refer to the full duration.

I didn’t actually tackle any of the above during this week as instead I decided to look into creating a new set of visualisations for ‘Deviation in the LDNA period’ instead.  Marc had created a sort of heatmap for this data in Excel and what I needed to do was create a dynamic, web-based version of this.  I decided to use the always useful D3.js library for these and rather handily I found an example heatmap that I could use as a basis for further work:  http://bl.ocks.org/tjdecke/5558084.  Also via this I found some very handy colour scales that I could use for the heatmap and I’ll no doubt use for future visualisations: https://bl.ocks.org/mbostock/5577023

The visualisation I created is pretty much the same as the spreadsheet – increasingly darker shades of green representing positive numbers and increasingly darker shades of blue representing negative numbers.  There are columns for each decade in the LDNA period and rows for each Thematic Heading.

I’ve split the visualisation up based on the ‘S1’ code.  It defaults to just showing the ‘AA’ headings but using the drop-down list you can select another heading, e.g. ‘AB’ and the visualisation updates, replacing the data.  This calls a PHP script that generates new data from the database and formats it as a CSV file.  We could easily offer up the CSV files to people too if they would want to reuse the data.

Note that not all of the ‘S1’ Thematic Headings appear in the spreadsheet or have ‘glosses’.  E.g. ‘AJ Matter’ is not in the spreadsheet and has no ‘gloss’ so I’ve had to use ‘AJ01 Alchemy’ as the ‘group’ in the drop-down list, which is probably not right.  Where there is no ‘S1’ heading (or no ‘S1’ heading that has a ‘gloss’) the ‘S2’ heading appears instead.

Here’s a screenshot of the visualisation, showing Thematic Heading group ‘AE Animals’:

In the ‘live’ visualisation (which I can’t share the URL of yet) if you hover over a thematic heading code down the left-hand edge of the visualisation a pop-up appears containing the full ‘gloss’ so you can tell what it is you’re looking at.  Similarly, if you hover over one of the cells a pop-up appears, this time containing the decade (helpful if you’ve scrolled down and the column headings are not visible) and the actual value contained within the cell.

Rather than make the cells square boxes as in the example I started with, I’ve made the boxes rectangles, with the intention of giving more space between rows and hopefully making it clearer that the data should primarily be read across the way.  I have to say I rather like the look of the visualisation as it brings to mind DNA sequences, which is rather appropriate for the project.

I experimented with a version of the page that had a white background and another that had a black background.  I think the white background actually makes it easier to read the data, but the black background looks more striking and ‘DNA sequency’ so I’ve added in an option to switch from a ‘light’ theme to a ‘dark’ theme, with a nice little transition between the two.  Here’s the ‘dark’ theme selected for ‘AB Life’:

There’s still probably some further work to be done on this, e.g. allowing users to in some way alter the cell values based on limits applied, or allowing users to click through from a cell pop-up to some actual words in the HT or something.  I could also add in a legend that shows what values the different shades represent.  I wasn’t sure whether this was really needed as you can tell by hovering over the boxes anyway.  I’ll see what Marc and Fraser suggest when they have a chance to use the visualisations.