Week beginning 5th January 2015

This was my first week back after my Christmas holiday.  The holiday was lovely but despite being two whole weeks it did seem to zip by rather too speedily.  This week I split my time primarily over three projects – Mapping Metaphor, Burns and the Scottish Corpus.  For Mapping Metaphor I returned to the task I had begun before Christmas but hadn’t quite managed to complete – the updating of all of the database queries in the site from dedicated MySQL functions to PDO style functions.  This was a rather tedious task, but I managed to get it completed and thoroughly tested this week.  Using PDO will make the site more future-proof and should also help boost security too.

The next task I completed this week was the Advanced Search functionality.  The Quick Search performs a search for categories, while the advanced search is intended to search for metaphor connections.  A document stating what search facilities were required had been prepared a while ago and I worked through this, implementing all of the desired search options.  I also implemented wildcard searching for both the quick and advanced searches.  This facility is the same as is offered on the Historical Thesaurus website, enabling a user to place an asterisk at the start and/or end of their search term in order to run a partial match search for the beginning, middle or end of words.  The advanced search options that are now available enable a user to search for category names or keywords, select one or more level 2 categories in which to search (with an option to state whether the search should be limited to connections purely within these categories or just involving one of the categories), specifying a date of metaphor inception, metaphor strength and directionality.  I think this covers all of the search options that the project requires, and will users to perform searches such as ‘show all of the bi-directional, strong metaphors that began in the 19th century’ or ‘show all strong metaphor connections within 1E Animals and 2D Emotion that began before 1200’.  The advanced search results are displayed using the visualisation interface, and as with all of the metaphor browse options, users can also then choose to display the results as a table or cards.  I think it’s working rather well at the moment, but I’m still awaiting feedback from the team.

After completing the advanced search I made another few tweaks to the site, for example I added in a print CSS file so the pages now print a bit more nicely.  I also made the interface ‘responsive’ – i.e. it resizes to fit different screen widths.  This works ok, but the visualisation itself still doesn’t resize.  I’m not sure I am going to make it resize, as squashing it down to fit on a small screen it going to impede the usability of the visualisation.  I think it might be preferable to just have the visualisation scroll off the user’s screen and make them move their view.  The only major tasks I have left to develop for the project now are the timeline view of the data and the content management system.

For Burns I began to work with the leaflet.js based historical maps of Burns’s tours that the NLS people had very kindly prepared for us last year.  Just before Christmas Pauline had sent me a document containing a few of the items that we will ‘pin’ to the map so I added these to see how they will look.  I’ve made two styles of ‘pop-up’ for the map – a default one that is used for shorter items and a bigger one that is used for longer items.  The latter featured scrollbars so that long items can be read without the pop-up spilling out over the map.  It’s all looking promising but I need to get more content before I can proceed further.  Pauline was off sick this week so couldn’t get this to me, but hopefully all can be completed next week.  I also tweaked the timeline as well, removing the image bar at the top of the timeline as this was taking up too much space and didn’t really add much to the look of the timeline (images of old pages tend to look the same as thumbnails – boring beige squares).  We hope to launch both the timeline and the interactive tour maps next week.

My final task of the week was to being phase two of the redevelopment of the Scottish Corpus website.  This phase involves migrating the audio and video of the site away from using the proprietary Quicktime plugin and instead using standard HTML5 audio and video.  Currently audio and video files open up in a new browser window and the files only work if the user’s computer has the Quicktime plugin installed.  This is causing problems for some users, plus it makes accessing the files on tablets and smartphones rather tricky.  In migrating the files to HTML5 I had a few tasks to consider:

  1. Migrating the audio files to MP3
  2. Replacing the ‘new window’ with a jQuery UI in-page dialog box
  3. Adding in the HTML5 audio / video player
  4. Updating the site’s Javascript so that the synchronisation of audio and the highlighting of transcript sections continues to function.

I wasn’t sure how long these tasks might take, or even if I’d be able to complete them, but thankfully my experiments were rather successful.  I set up a test version of the ‘document’ page for one of the documents that had audio and a synchronised transcription and then added the necessary jQuery UI code to enable a dialog box to appear when the ‘play audio’ link is pressed.  Within this I added the HTML audio tag, linking to my newly migrated MP3 file.  I did have to do some fairly major reworking of the Javascript that synchronises the audio to the text, but I managed to get this working.  I’m hoping to be able to replace the old Quicktime version with the new HTML5 version next week, all being well.