On Monday this week I attended the ‘Data Hack’ event organised by the SCOSYA project. This was a two-day event, with day one being primarily lectures while on the second day the participants could get their hands on some data and create things themselves. I only attended the first day and enjoyed hearing the speakers talk. It was especially useful to hear the geospatial visualisation speaker, and also to get a little bit of hands-on experience with R. Unfortunately during a brief and unscheduled demonstration of the SCOSYA ‘expert atlas’ interface the search for multiple attributes failed to work. I spent some time frantically trying to figure out why, as I hadn’t changed any of the code. It turned out that (unbeknownst to me) the version of PHP on the server had recently been updated and one tiny and seemingly insignificant bit of code was no longer supported in the newer version and instead caused a fatal error. is it’s no longer possible to set a variable as an empty string and then to use it as an array later on. For example, $varname = “”; and then later on $varname = “value”. Doing this in the newer version causes the script to stop running. Once I figured this out it was very easy to fix, but going through the code to identify what was causing the problem took quite a while.
Once I’d discovered the issue I checked with Arts IT support and they confirmed that they had upgraded the server. It would have been great if they’d let me know. I then had to go through all of the other sites that are hosted on the server to check if the error appeared anywhere else, which unfortunately it did. I think I’d managed to fix everything by the end of the week, though.
Also for SCOSYA I continued to work on the public atlas interface, this time focussing on the ‘stories’ (now called ‘Learn more’). Previously these appeared in a select box, and once you selected a story from the drop-down list and pressed a ‘show’ button the story would load. This was all a bit clunky, so I’ve now replaced it with a more nicely formatted list of stories, as with the ‘examples’. Clicking on one of these automatically loads the relevant story, as the screenshot below demonstrates:
Due to the asynchronous nature of AJAX calls, it’s not possible to just set up the click event once as it needs to be set up as a result of the data finishing loading. If it was set up independently the next slide would load before data was pulled in from the server and would therefore display nothing. However, after further thought I realised that the issue wasn’t occurring when the initial slide was loaded, only when the user presses the buttons. As this will only ever happen once the AJAX data has loaded (because otherwise the button isn’t there for the user to press) it should be ok to have the click event initiated outside of the ‘load data’ function. Thankfully I managed to get this issue sorted by Friday, when the project team was demonstrating the feature at another event. I also managed to sort the issue with the side panel not scrolling on mobile screens, which was being caused by ‘pointer events’ being set to none on the element that was to be scrolled. On regular screens this worked fine, as the scrollbar gets added in, but on touchscreens this caused issues.
For the rest of the week I worked on several different projects. I continued with the endless task of linking up the HT and OED datasets. This involved ticking off lexemes in matched categories based on comparing the stripped forms of the lexeme on their own. This resulted in around 32,000 lexeme matches being ticked off. It also uncovered an instance where an OED category has been linked to two different HT categories, which is clearly an error. I wrote a script to look into the issue of duplicate matches for both categories and lexemes, which shows 28 (so 14 incorrect) category matches and 136 (so 68 incorrect) lexeme matches. I also created a new stats page that displays statistics about both matched and unmatched categories and lexemes. I also ‘deticked’ a few category and lexeme matches that Fraser had sent to me in spreadsheets.
I continued to work with the new DSL data this week too. This included checking through some of the supplemental entry data from the server that didn’t seem to do exactly what the DSL people were expecting. I also set up a new subdomain where I’m replicating the functionality of the main DSL website, but using the new data exported from the server. This means it is now possible to compare the live data (using Peter’s original API) with the V2 data (extracted and saved fully assembled from Peter’s API, rather than having bits injected into it every time an entry is requested) and the V3 data (from the DSL people’s editor server), which should hopefully be helpful in checking the new data. I also continued to work on the new API, for both V2 and V3 versions of the data, getting the search results working with the new API. Next for me to do is add Boolean searching to the headword search, remove headword match type as discussed and then develop the full text searches (full / without quotes / quotes only). After that comes the bibliography entries.
Also this week I made another few tweaks to the RNSN song stories, gave access to the web stats for Seeing Speech and Dynamic Dialects to Fraser Rowan, who is going to do some work on them and met with Matthew Sangster to discuss a pilot website I’m going to put together for him about books and borrowing records in the 18th century at Glasgow. I also attended a meeting on Friday afternoon with the Anglo-Norman dictionary people, who were speaking to various people including Marc and Fraser, about redeveloping their online resource.