Week Beginning 19th October 2014

I spent some time this week on the Scots Thesaurus project, creating a couple of example visualisations using the Golf data that Magda has been compiling.  I created these using the d3.js library which I’m pretty familiar with due to my work on the Mapping Metaphor project.  I created two versions, both of which allow you to select a part of speech to view the categories contained within it.  They each have orange circles to represent main categories and grey circles to represent subcategories.  In both versions circle size reflects the number of words found within a category and you can click on a circle to open a pop-up that lists the words and provides links to the DSL.

Version 1 is radial, displays category names as well as circles and is currently static (i.e. there’s no way to interact with the visualisation other than clicking on the circles or labels).  It could be adapted to make it more interactive, e.g. click on a circle to make it the centre of a new visualisation, or click a circle to expand / collapse child categories.  Adding in facilities to rotate the visualisation wouldn’t be too difficult either.

Version 2 is a sort of cluster arrangement and currently doesn’t display what the categories represent until you move your mouse over one (which is a bit flickery at the moment).  You can update the layout of this version by dragging circles about the place.  This might look interesting but I’m not sure how useful it really is.  It should be possible to add ‘always visible’ labels to this visualisation, although it will obviously make it a bit more cluttered. Options to expand / collapse child categories or focus the visualisation on a category could also be added to this version.

I can’t really share the links to the visualisations yet as I haven’t had any feedback from Susan about them.  Also this week I properly set up the project website.  I set up a default WordPress site for the project back in May but is has been sitting there with its ‘Hello world’ sample page since then.  This week I provided a simple site structure (e.g. ’home’, ’about’, ‘contact’ etc) and installed a sample theme.  Hopefully some real content will be added to the site soon and we can start to publish the URL.

I spent a little time this week on AHRC duties, looking over yet another two technical plans I’ve been asked to review.  I haven’t completed the reviews yet but aim to do so next week.  I also attended a meeting about the Hansard subproject of the SAMUELS project, but there’s nothing I need to do for this for the time being.  I also returned to the DSL this week, fixing a few issues that had been spotted (e.g. there was a problem with the non-predictive bibliography search) and I also set up a password protected development version of the site that connects to the version of the API that resides in Edinburgh.  This will allow Peter to test out updates to API functionality without affecting the live site.  I also went through all the feedback I’ve received about the Scots School Dictionary app and compiled a ‘to do’ list of things that I’ll need to update.  I hope to be able to start on this next week.

The rest of the week was spent on Mapping Metaphor duties and was mostly spent addressing issues with the underlying code rather than adding much in the way of new bells and whistles.  I’d spotted a problem with the SVG versions of the visualisations that were being generated when a use selects the ‘download diagram’ option.  Some of the colours were wrong and other updates that I’d made such as line thickness were not being carried over.  After delving into the code I realised this is because the stylesheet for the downloaded SVG is embedded in the code that generates the SVG for download and I’d forgotten to update this.  A few tweaks later and the downloadable versions of the visualisations were looking the same as the new ‘in browser’ versions.  I also replaced the dialog boxes used for displaying metaphor card pop-ups and other info boxes.  Previously I was using ones I’d created myself just using d3, but there were some issues with these, for example they were a fixed height, meaning on less tall displays the pop-ups were being cut off and there was no way to scroll to them as they were fixed on screen.  Instead of my own cobbled together dialog boxes I decided to use the jQuery UI dialog boxes.  I’m already using jQuery UI components in the site (e.g. the ‘metaphor strength’ buttons) so it wasn’t too tricky to add in the dialog component.  The new pop-ups work a lot better, enabling users to move and resize them.

I spent some time this week investigating whether I could handle all user actions on the client side and only reload fresh data into the visualisation via d3 and AJAX rather than submitting page requests and reloading the whole page.  I managed to get this working for the selection of ‘metaphor strength’, so now only the visualisation updates.  This is nice in some ways as it means the page doesn’t reload so the user’s position on the page doesn’t change.  It does however mean that users can no longer copy the page URL and use it to reload the exact same visualisation at a later point.  I’ll have to think about setting up a persistent URL option for this.

What I was really hoping to do was to be able to dynamically load data into the visualisation, only updating those nodes and lines that change from the current data to the new data that is loaded in, with a view eventually to animate the transitions between states.  This is something that d3 is set up to do very elegantly using the .enter() and .exit() functions.  Unfortunately after spending several hours on this task I wasn’t able to get it working quite right.  Nodes were being added and removed but the positioning was all off and data and labels were being overlaid where they shouldn’t be.  I may return to this at a later point if there’s time but for now there are just too many other tasks needing my attention.

I did have some success in other areas though.  I’ve managed to remove the ‘reset’ option from the left-hand info box as I have now made it so that if you click on a selected node it now deselects it (i.e. resets the diagram).  This works really nicely and I don’t know why I didn’t think to implement this before.  I also removed the ‘centre on category’ button from the info box when the user is already looking at the l2 category in question as it was unnecessary.  I’ve also made it so that if a L3 category is selected and the user clicks on a L2 category to open its linked L3 categories then the selected L3 category continues to be selected.  Also, when viewing the visualisation showing all L3 categories linked to from a particular L3 it no longer defaults to having all links selected, as this wasn’t very helpful.  I still need to make some tweaks to the way L3 categories are expanded when links within the popups are clicked and also add in the ‘centre on category’ links when viewing the connections between two L2 categories.  Plus the other 50 or so other outstanding tasks on my Mapping Metaphor ‘to do’ list.


Week Beginning 13th October 2014

This was my first full week back after my holiday last week and my time was divided up between quite a number of projects.  I engaged in correspondence with the SLD people about the Scots School Dictionary that I’ve developed a prototype of.  We’re starting to get some feedback from teachers and other prospective users about this now, which is very helpful.  I’m hoping to be able to update the prototype based on the feedback next week.  I also responded to Megan Coyer about her Medical Humanities project.  She’s been speaking to other people in the School and has received some advice on the direction she should take with her project and I have said I will help out with the technical side of things.

I also spent some time this week working on the Scots Thesaurus project.  Susan has asked whether I would be able to formally be involved with the project to provide developer effort as her previous attempts at securing such effort have unfortunately not come to anything.  I have agreed to work one day a week on the project until it ends next year, and I’m hopeful that this will be sufficient time to successfully tackle at least some of the technical aspects of the project.  I met with Susan on Thursday to discuss this, and also to have a look at the DSL source files to see how we might go about automatically extracting relevant information.

Magda also emailed me a spreadsheet containing the data she has so far compiled for the category ‘Golf’.  We are currently following the same structure and in many cases categories as defined in the Historical Thesaurus of English and Magda’s spreadsheet was structured in such a way as to make it relatively easy for me to create a script that could extract categories and lexemes from the spreadsheet and upload them to a database structured like the HTE, with one table for categories and another for lexemes.  I created such a script, and a database for the Scots Thesaurus, and we now have the beginnings of a thesaurus, currently consisting of 70 categories (10 main, 60 sub) and 231 words.

Although we are currently recording the data in a relational database I am also investigating other mechanisms for recording thesaurus data such as SKOS (Simple Knowledge Organisation System), an RDF based standard for storing thesaurus data.  I am hoping to try and migrate the data to this format to investigate its suitability for a historical thesaurus.  As of yet I’ve not found any elements within SKOS that could be used to record dates of usage, which could be something of a sticking point.

I spent some time working on the Historical Thesaurus of English this week as well, adding in a little feature that allows a user to convert a category number from version 1 of the data (as found in the printed edition) to version 4 of the data (currently available online).  As documented in earlier posts, the HT categories went through a large scale renumbering process so the category numbers in the printed version (e.g. water) are different to the online version (01.05.05).  This means using the ‘jump to category’ option on the search page doesn’t necessarily find the category if you’re using the version 1 numbers.  I have now added a converter to the bottom of the ‘versions and changes’ page (accessed from the ‘Thesaurus database version’ link in the footer) that allows you to enter a number in either version 1 or version 4 format and at the press of a button see what this number is in the other format.  You can use it here: http://historicalthesaurus.arts.gla.ac.uk/versions-and-changes/#converter


I also helped Helen Mclaughlin with an issue she was having with the Cogtop WordPress powered website.  I had implemented multilingual support on this website in the same way as I had done for the ICOS conference website, using the qtranslate plugin.  However, this plugin hasn’t been updated in a while and doesn’t work with the more recent versions of WordPress.  After some investigation I discovered a new fork of the plugin called ztranslate that does work with the new WordPress versions and after some tweaking I managed to migrate the website across to using the new version.

The rest of the week was spent getting on with Mapping Metaphor duties.  Due to my holiday and the AHRC workshop the week before it had actually been a couple of weeks since I had worked with the code and it took me a while to get back into things.  Previously I had managed to get circles to appear in the node labels when a node is clicked on but I hadn’t found a way of getting these to dynamically change size based on the number of metaphorical connections between the categories.  This was the task that I worked on this week and I’m very pleased to say that I managed to find a solution.  Now when a category is clicked on in the visualisation an AJAX call is made, passing the ID of the category that was clicked on. This queries the database and brings back a JSON file containing the IDs of all of the categories connected to the passed category and counts of all of the L3 connections.  This data is then passed to the ‘update nodes’ function which then decides which size of circle to display depending on the number of connections returned.  I think this really improves the visualisations as it presents more information, showing where the most numerous metaphorical connections can be found.  I also managed to update the links on the circles so that they now open up the metaphor card when clicked on, which should help people who may have found clicking on the connecting lines tricky.


Week Beginning 6th October 2014

A very brief report this week as I was on holiday for four days out of the five.  The one day I was working was mostly spent writing the technical plan for Wendy’s follow-on project, which I managed to complete.  I spent a little further time on the plan throughout the week based on feedback from Wendy.  Other than that I made a couple of tweaks to the Burns website and replied to a few emails regarding the DSL and the Scots School Dictionary app.  I’m back working a full week next week so there should be more to report then.

Week Beginning 29th September 2014

This week was a pretty hectic one that mainly centred around the AHRC.  On Thursday I attended a day-long AHRC Peer Review College training workshop in Edinburgh, at which the attendees had to report on a review they had undertaken of one proposal and participate in a mock panel session where a further 7 proposals, their reviews and the PI responses were to be ranked.  There was an awful lot of material to read in preparation for the event, and somewhat foolishly I had left it until the start of the week to tackle it, assuming that between starting on Monday and attending the event on Thursday I would have ample time to prepare.  I rather underestimated the amount of time it would take to read through these 8 bids and prepare for the exercises, and had to spend quite a lot of extra time in the evenings going through everything.  Thankfully by Thursday I had completed all of the preparations and I felt confident that I would be able to participate in the event.  Although I am a technical reviewer for the AHRC I wasn’t attending the event in this capacity, which was rather unexpected.  Instead, I was to act as an academic reviewer.  I did question whether I should even really attend the event but the person at the AHRC that I spoke to said that it would be good experience for me to attend and she was right.  I really feel like I know a lot more about the AHRC and the peer review process after Thursday’s event.  Of course, I can’t go into any details about what actually took place during the day, but I did feel quite engaged with the whole process, which was encouraging.

Other than preparing and attending the AHRC event I was also involved in further AHRC project business.  I had hoped that I would be able to continue with the development of the visualisations for the Mapping Metaphor project but alas there were just too many other tasks to perform.  I met with Susan Rennie and her RA on Monday to discuss the data for the Scots Thesaurus project and helped them to define a structure for the data that will be fairly straightforwardly machine readable once a sufficient amount of data has been gathered.  I also met with Megan Coyer who is wanting to put together a Medical Humanities project and discussed with her a few ideas for the technical side of her project.  I still need to get back to her with some further suggestions.

On Tuesday I met with Wendy and Ellen to discuss the follow-on funding bid they are putting together for Mapping Metaphor and I’ll have a technical plan to complete for this bid in the next week or so.  On Wednesday I met had a conference call with Katie to discuss the technical plan for her Aelfric project.  This was a useful call and we managed to agree on how the technical aspects of the project should all fit together.  On Friday I completed an updated version of the technical plan for the project and sent it to Katie.  I’ll be on holiday for most of next week so there won’t be too much to report.