Monday this week was the spring bank holiday so it was a four-day week for me. I split my time this week over three main projects. Firstly, I set up an initial project website for Jane Stuart-Smith’s SPADE project. We’d had some difficulty in assigning the resources for this project but thankfully this week we were given some web space and I managed to get a website set up, create a skeleton structure for it and create the user accounts that will allow the project team to manage the content. I also had some email discussions with the project partners about how best to handle ‘private’ pages that should be accessible to the team but no-one else. There is still some work to be done on the website, but for the time being my work is done.
I also continued this week to work on the public interface for the database of poems for The People’s Voice project. Last week I started on the search facility, but only progressed as far as allowing a search for a few fields, with the search results page displaying nothing more than the number of matching poems. This week I managed to pretty much complete the search facility. Users can now search for any combination of search boxes and on the search results page there is now a section above the results that lists what you’ve searched for. This also includes a ‘refine your search’ button that takes the user back to the search page. The previously selected options are now ‘remembered’ by the form, allowing the user to update what they’ve searched for. There is also a ‘clear search boxes’ button so the user can start a fresh search.
Search results are now paginated. Twenty results are displayed per page and if there are more results than this then ‘next’, ‘previous’ and ‘jump to page’ links are displayed above and below your search results. If there are lots of pages some ‘jump to page’ links are omitted to stop things getting too cluttered. Search results display the poem title, date (or ‘undated’ if there is no date), archive / library, franchise and author. Clicking on a result will lead to the full record, but this is still to do. I also haven’t added in the option to order the results by anything other than poem title, as I’m not sure whether this will really be of much use and it’s going to require a reworking of the way search results are queried if I am to implement it. I still have the ‘browse’ interface to work on and the actual page that displays the poem details, and I’ll continue with this next week.
I met with Bryony Randall this week to discuss some final tweaks to the digital edition of the Virginia Woolf short story that I’ve been working on. I made a few changes to the transcription, updated how we label ‘sic’ and ‘corr’ text in the ‘edition settings’ (these are now called ‘original’ and ‘edited’) and I changed which edition settings are selected by default. Where previously the original text was displayed we now display the ‘edited’ text with only line breaks from the ‘original’ retained. Bryony is going to ask for feedback from members of the Network and we’re going to aim to get things finalised by the end of the month.
I spent the rest of the week working on the Historical Thesaurus. Last week I met with Marc and Fraser to discuss updates to the website that we were going to try and implement before ‘Kay Day’ at the end of the month. One thing I’ve wanted to try to implement for a while now is a tree-based browse structure. I created a visual tree browse structure using the D3.js library for the Scots Thesaurus project and doing so made me realise how useful having such a speedy way to browse the full thesaurus structure would be.
I tried a few jQuery ‘tree’ plugins and in the end I went with FancyTree (https://github.com/mar10/fancytree) because it clearly explained how to load data into nodes via AJAX when a user opens the node. This is important for us as we can’t load all 235,000 categories into the tree at once (well, we could but it would be a bad idea). I created a PHP script (that I will eventually integrate with the HT API) that you can pass a catid to and it will spit out a JSON file containing all of the categories and subcategories that are one level down from it. It also checks whether each of these have child categories. If there are child categories then the tree knows to place the little ‘expand’ icon next to the category. When the user clicks on a category this fires off a request for the category’s children and these are then dynamically loaded into the tree. Here’s a screenshot of my first attempt at using FancyTree:
Subcategories are highlighted with a grey background and in this version you can’t actually view the words in a category. Also, only nouns are currently represented. I thought at this stage that we might have to have separate trees for each part of speech, but then realised that the other parts of speech don’t have a full hierarchy so the tree would be missing lots of branches and would therefore not work. In this version the labels only show the category heading and catnum / subcat, but I can update the labels to display additional information. We could for example show the number of categories within each category, or somehow represent the number of words contained in the category so you can see where the big categories are. I should also be able to override the arrow icons with font awesome icons.
After creating this initial version I realised there was still a lot to be done. For example, if we’re using this browser then we need to ensure that when you open a category the tree loads with the correct part opened. This might be tricky to implement. Also there’s the issue of dealing with different parts of speech.