I completed an initial version of the Chambers Library map for the Books and Borrowing project this week. It took quite a lot of time and effort to implement the subscription period range slider. Searching for a range when the data also has a range of dates rather than a single date means we needed to make a decision about what data gets returned and what doesn’t. This is because the two ranges (the one chosen as a filter by the user and the one denoting the start and end periods of subscription for each borrower) can overlap in many different ways. For example, the period chosen by the user is 05 1828 to 06 1829. Which of the following borrowers should therefore be returned?
- Borrowers range is 06 1828 to 02 1829: Borrower’s range is fully within the period so should definitely be included
- Borrowers range is 01 1828 to 07 1828: Borrower’s range extends beyond the selected period at the start and ends within the selected period. Presumably should be included.
- Borrowers range is 01 1828 to 09 1829: Borrower’s range extends beyond the selected period in both directions. Presumably should be included.
- Borrowers range is 05 1829 to 09 1829: Borrower’s range begins during the selected period and ends beyond the selected period. Presumably should be included.
- Borrowers range is 01 1828 to 04 1828: Borrower’s range is entirely before the selected period. Should not be included
- Borrowers range is 07 1829 to 10 1829: Borrower’s range is entirely after the selected period. Should not be included.
Basically if there is any overlap between the selected period and the borrower’s subscription period the borrower will be returned. But this means most borrowers will always be returned a lot of the time. It’s a very different sort of filter to one that purely focuses on a single date – e.g. filtering the data to only those borrowers whose subscription periods *begins* between 05 1828 and 06 1829.
Based on the above assumptions I began to write the logic that would decide which borrowers to include when the range slider is altered. It was further complicated by having to deal with months as well as years. Here’s the logic in full if you fancy getting a headache:
if(((mapData[i].sYear>startYear || (mapData[i].sYear==startYear && mapData[i].sMonth>=startMonth)) && ((mapData[i].eYear==endYear && mapData[i].eMonth <=endMonth) || mapData[i].eYear<endYear)) || ((mapData[i].sYear<startYear ||(mapData[i].sYear==startYear && mapData[i].sMonth<=startMonth)) && ((mapData[i].eYear==endYear && mapData[i].eMonth >=endMonth) || mapData[i].eYear>endYear)) || ((mapData[i].sYear==startYear && mapData[i].sMonth<=startMonth || mapData[i].sYear>startYear) && ((mapData[i].eYear==endYear && mapData[i].eMonth <=endMonth) || mapData[i].eYear<endYear) && ((mapData[i].eYear==startYear && mapData[i].eMonth >=startMonth) || mapData[i].eYear>startYear)) || (((mapData[i].sYear==startYear && mapData[i].sMonth>=startMonth) || mapData[i].sYear>startYear) && ((mapData[i].sYear==endYear && mapData[i].sMonth <=endMonth) || mapData[i].sYear<endYear) && ((mapData[i].eYear==endYear && mapData[i].eMonth >=endMonth) || mapData[i].eYear>endYear)) || ((mapData[i].sYear<startYear ||(mapData[i].sYear==startYear && mapData[i].sMonth<=startMonth)) && ((mapData[i].eYear==startYear && mapData[i].eMonth >=startMonth) || mapData[i].eYear>startYear)))
I also added the subscription period to the popups. The only downside to the range slider is that the occupation marker colours change depending on how many occupations are present during a period, so you can’t always tell an occupation by its colour. I might see if I can fix the colours in place, but it might not be possible.
I also noticed that the jQuery UI sliders weren’t working very well on touchscreens so installed the jQuery TouchPunch library to fix that (https://github.com/furf/jquery-ui-touch-punch). I also made the library marker bigger and gave it a white border to more easily differentiate it from the borrower markers.
I then moved onto incorporating page images in the resource too. Where a borrower has borrower records the relevant pages where these borrowing records are found now appear as thumbnails in the borrower popup. These are generated by the IIIF server based on dimensions passed to it, which is much nicer than having to generate and store thumbnails directly. I also updated the popup to make it wider when required to give more space for the thumbnails. Here’s a screenshot of the new thumbnails in action:
Clicking on a thumbnail opens a further popup containing a zoomable / pannable image of the page. This proved to be rather tricky to implement. Initially I was going to open a popup in the page (outside of the map container) using a jQuery UI Dialog. However, I realised that this wouldn’t work when the map was being viewed in full-screen mode, as nothing beyond the map container is visible in such circumstances. I then considered opening the image in the borrower popup but this wasn’t really big enough. I then wondered about extending the ‘Map options’ section and replacing the contents of this with the image, but this then caused issues for the contents of the ‘Map options’ section, which didn’t reinitialise properly when the contents were reinstated. I then found a plugin for the Leaflet mapping library that provides a popup within the map interface (https://github.com/w8r/Leaflet.Modal) and decided to use this. However, it’s all a little complex as the popup then has to include another mapping library called OpenLayers that enables the zooming and panning of the page image, all within the framework of the overall interactive map. It is all working and I think it works pretty well, although I guess the map interface is a little cluttered, what with the ‘Map Options’ section, the map legend, the borrower popup and then the page image popup as well. Here’s a screenshot with the page image open:
All that’s left to do now is add in the introductory text once Alex has prepared it and then make the map live. We might need to rearrange the site’s menu to add in a link to the Chambers Map as it’s already a bit cluttered.
Also for the project I downloaded images for two further library registers for St Andrews that had previously been missed. However, there are already records for the registers and pages in the CMS so we’re going to have to figure out a way to work out which image corresponds to which page in the CMS. One register has a different number of pages in the CMS compared to the image files so we need to work out how to align the start and end and if there are any gaps or issues in the middle. The other register is more complicated because the images are double pages whereas it looks like the page records in the CMS are for individual pages. I’m not sure how best to handle this. I could either try and batch process the images to chop them up or batch process the page records to join them together. I’ll need to discuss this further with Gerry, who is dealing with the data for St Andrews.
Also this week I prepared for and gave a talk to a group of students from Michigan State University who were learning about digital humanities. I talked to them for about an hour about a number of projects, such as the Burns Supper map (https://burnsc21.glasgow.ac.uk/supper-map/), the digital edition I’d created for New Modernist Editing (https://nme-digital-ode.glasgow.ac.uk/), the Historical Thesaurus (https://ht.ac.uk/), Books and Borrowing (https://borrowing.stir.ac.uk/) and TheGlasgowStory (https://theglasgowstory.com/). It went pretty and it was nice to be able to talk about some of the projects I’ve been involved with for a change.
I also made some further tweaks to the Gentle Shepherd Performances page which is now ready to launch, and helped Geert out with a few changes to the WordPress pages of the Anglo-Norman Dictionary. I also made a few tweaks to the WordPress pages of the DSL website and finally managed to get a hotel room booked for the DHC conference in Sheffield in September. I also made a couple of changes to the new Gaelic Tongues section of the Seeing Speech website and had a discussion with Eleanor about the filters for Speech Star. Fraser had been in touch with about 500 Historical Thesaurus categories that had been newly matched to OED categories so I created a little script to add these connections to the online database.
I also had a Zoom call with the Speak For Yersel team. They had been testing out the resource at secondary schools in the North East and have come away with lots of suggested changes to the content and structure of the resource. We discussed all of these and agreed that I would work on implementing the changes the week after next.
Next week I’m going to be on holiday, which I have to say I’m quite looking forward to.
I worked for several different projects this week. For the Books and Borrowing project I processed and imported a further register for the Advocates library that had been digitised by the NLS. I also continued with the interactive map of Chambers library borrowers, although I couldn’t spend as much time on this as I’d hoped as my access to Stirling University’s VPN had stopped working and without VPN access I can’t connect to the database and the project server. It took a while to resolve the issue as access needs to be approved by some manager or other, but once it was sorted I got to work on some updates.
One thing I’d noticed last week was that when zooming and panning the historical map layer was throwing out hundreds of 403 Forbidden errors to the browser console. This was not having any impact on the user experience, but was still a bit messy and I wanted to get to the bottom of the issue. I had a very helpful (as always) chat with Chris Fleet at NLS Maps, who provided the historical map layer and he reckoned it was because the historical map only covers a certain area and moving beyond this was still sending requests for map tiles that didn’t exist. Thankfully an option exists in Leaflet that allows you to set the boundaries for a map layer (https://leafletjs.com/reference.html#latlngbounds) and I updated the code to do just that, which seems to have stopped the errors.
I then returned to the occupations categorisation, which was including far too many options. I therefore streamlined the occupations, displaying the top-level occupation only. I think this works a lot better (although I need to change the icon colour for ‘unknown’). Full occupation information is still available for each borrower via the popup.
I also had to change the range slider for opacity as standard HTML range sliders don’t allow for double-ended ranges. We require a double-ended range for the subscription period and I didn’t want to have two range sliders that looked different on one page. I therefore switched to a range slider offered by the jQuery UI interface library (https://jqueryui.com/slider/#range). The opacity slider still works as before, it just looks a little different. Actually, it works better than before, as the opacity now changes as you slide rather than only updating after you mouse-up.
I then began to implement the subscription period slider. This does not yet update the data. It’s been pretty tricky to implement this. The range needs to be dynamically generated based on the earliest and latest dates in the data, and dates are both year and month, which need to be converted into plain integers for the slider and then reinterpreted as years and months when the user updates the end positions. I think I’ve got this working as it should, though. When you update the ends of the slider the text above that lists the months and years updates to reflect this. The next step will be to actually filter the data based on the chosen period. Here’s a screenshot of the map featuring data categorised by the new streamlined occupations and the new sliders displayed:
For the Speak For Yersel project I made a number of tweaks to the resource, which Jennifer and Mary are piloting with school children in the North East this week. I added in a new grammatical question and seven grammatical quiz questions. I tweaked the homepage text and updated the structure of questions 27-29 of the ‘sound about right’ activity. I ensured that ‘Dumfries’ always appears as ‘Dumfries and Galloway’ in the ‘clever’ activity and follow-on and updated the ‘clever’ activity to remove the stereotype questions. These were the ones where users had to rate the speakers from a region without first listening to any audio clips and Jennifer reckoned these were taking too long to complete. I also updated the ‘clever’ follow-on to hide the stereotype options and switched the order of the listener and speaker options in the other follow-on activity for this type.
For the Speech Star project I replaced the data for the child speech error database with a new, expanded dataset and added in ‘Speaker Code’ as a filter option. I also replicated the child speech and normalised speech databases from the clinical website we’re creating on the more academic teaching site we’re creating and also pulled in the IPA chart from Seeing Speech into this resource too. Here’s a screenshot of how the child speech error database looks with the new ‘speaker code’ filter with ‘vowel disorder’ selected:
I also made a couple of tweaks to the DSL this week, installing the TablePress plugin for the ancillary pages and creating a further alternative logo for the DSL’s Facebook posts. I also returned to going some work for the Anglo-Norman Dictionary, offering some advice to the editor Geert about incorporating publications and overhauling how cross references are displayed in the Dictionary Management System.
I updated the ‘View Entry’ page in the DMS. Previously it only included cross references FROM the entry you’re looking at TO any other entries. I.e. it only displayed content when the entry was of type ‘xref’ rather than ‘main’. Now in addition to this there’s a further section listing all cross references TO the entry you’re looking at from any entry of type ‘xref’ that links to it.
In addition there is a button allowing you to view all entries that include a cross reference to the current entry anywhere in their XML – i.e. where an <xref> tag that features the current entry’s slug is found at any level in any other main entry’s XML. This code is hugely memory intensive to run, as basically all 27,464 main entries need to be pulled into the script, with the full XML contents of each checked for matching xrefs. For this reason the page doesn’t run the code each time the ‘view entry’ page is loaded but instead only runs when you actively press the button. It takes a few seconds for the script to process, but after it does the cross references are listed in the same manner as the ‘pure’ xrefs in the preceding sections.
Finally I participated in a Zoom-based focus group for the AHRC about the role of technicians in research projects this week. It was great to participate to share my views on my role and to hear from other people with similar roles at other organisations.
I’d taken Monday off this week to have an extra-long weekend following the jubilee holidays on Thursday and Friday last week. On Tuesday I returned to another meeting for Speak For Yersel and a list of further tweaks to the site, including many changes to three of the five activities and a new set of colours for the map marker icons, which make the markers much more easy to differentiate.
I spent most of the week working on the Books and Borrowing project. We’d been sent a new library register from the NLS and I spent a bit of time downloading the 700 or so images, processing them and uploading them into our system. As usual, page numbers go a bit weird. Page 632 is written as 634 and then after page 669 comes not 670 but 700! I ran my script to bring the page numbers in the system into line with the oddities of the written numbers. On Friday I downloaded a further library register which I’ll need to process next week.
My main focus for the project was the Chambers Library interactive map sub-site. The map features the John Ainslie 1804 map from the NLS, and currently it uses the same modern map as I’ve used elsewhere in the front-end for consistency, although this may change. The map defaults to having a ‘Map options’ pane open on the left, and you can open and close this using the button above it. I also added a ‘Full screen’ button beneath the zoom buttons in the bottom right. I also added this to the other maps in the front-end too. Borrower markers have a ‘person’ icon and the library itself has the ‘open book’ icon as found on other maps.
By default the data is categorised by borrower gender, with somewhat stereotypical (but possibly helpful) blue and pink colours differentiating the two. There is one borrower with an ‘unknown’ gender and this is set to green. The map legend in the top right allows you to turn on and off specific data groups. The screenshot below shows this categorisation:
The next categorisation option is occupation, and this has some problems. The first is there are almost 30 different occupations, meaning the legend is awfully long and so many different marker colours are needed that some of them are difficult to differentiate. Secondly, most occupations only have a handful of people. Thirdly, some people have multiple occupations, and if so these are treated as one long occupation, so we have both ‘Independent Means > Gentleman’ and then ‘Independent Means > Gentleman, Politics/Office Holders > MP (Britain)’. It would be tricky to separate these out as the marker would then need to belong to two sets with two colours, plus what happens if you hide one set? I wonder if we should just use the top-level categorisation for the groupings instead? This would result in 12 groupings plus ‘unknown’, meaning the legend would be both shorter and narrower. Below is a screenshot of the occupation categorisation as it currently stands:
The next categorisation is subscription type, which I don’t think needs any explanation. I then decided to add in a further categorisation for number of borrowings, which wasn’t originally discussed but as I used the page I found myself looking for an option to see who borrowed the most, or didn’t borrow anything. I added the following groupings, but these may change: 0, 1-10, 11-20, 21-50, 51-70, 70+ and have used a sequential colour scale (darker = more borrowings). We might want to tweak this, though, as some of the colours are a bit too similar. I haven’t added in the filter to select subscription period yet, but will look into this next week.
At the bottom of the map options is a facility to change the opacity of the historical map so you can see the modern street layout. This is handy for example for figuring out why there is a cluster of markers in a field where ‘Ainslie Place’ was presumably built after the historical map was produced.
I decided to not include the marker clustering option in this map for now as clustering would make it more difficult to analyse the categorisation as markers from multiple groupings would end up clustered together and lose their individual colours until the cluster is split. Marker hover-overs display the borrower name and the pop-ups contain information about the borrower. I still need to add in the borrowing period data, and also figure out how best to link out to information about the borrowings or page images. The Chambers Library pin displays the same information as found in the ‘libraries’ page you’ve previously seen.
Also this week I responded to a couple of queries from the DSL people about Google Analytics and the icons that gets used for the site when posting on Facebook. Facebook was picking out the University of Glasgow logo rather than the DSL one, which wasn’t ideal. Apparently there’s a ‘meta’ tag that you need to add to the site header in order for Facebook to pick up the correct logo, as discussed here: https://stackoverflow.com/questions/7836753/how-to-customize-the-icon-displayed-on-facebook-when-posting-a-url-onto-wall
I also created a new user for the Ayr place-names project and dealt with a couple of minor issues with the CMS that Simon Taylor had encountered. I also investigated a certificate error with the ohos.ac.uk website and responded to a query about QR codes from fellow developer David Wilson. Also, Craig Lamont in Scottish Literature got in touch about a spreadsheet listed Burns manuscripts that he’s been working on with a view to turning it into a searchable online resource and I gave him some feedback about the structure of the spreadsheet.
Finally, I did a bit of work for the Historical Thesaurus, working on a further script to match up HT and OED categories based on suggestions by researcher Beth Beattie. I found a script I’d produced in from 2018 that ran pattern matching on headings and I adapted this to only look at subcats within 02.02 and 02.03, picking out all unmatched OED subcats from these (there are 627) and then finding all unmatched HT categories where our ‘t’ numbers match the OED path. Previously the script used the HT oedmaincat column to link up OED and HT but this no longer matches (e.g. HT ‘smarten up’ has ‘t’ nums 02.02.16.02 which matches OED 02.02.16.02 ‘to smarten up’ whereas HT ‘oedmaincat’ is ’02.04.05.02’).
The script lists the various pattern matches at the top of the page and the output is displayed in a table that can be copied and pasted into Excel. Of the 627 OED subcats there are 528 that match an HT category. However, some of them potentially match multiple HT categories. These appear in red while one to one matches appear in green. Some of these multiple matches are due to Levenshtein matches (e.g. ‘sadism’ and ‘sadist’) but most are due to there being multiple subcats at different levels with the exact same heading. These can be manually tweaked in Excel and then I could run the updated spreadsheet through a script to insert the connections. We also had an HT team meeting this week that I attended.
I spent most of the week continuing with the Speak For Yersel website, which is now nearing completion. A lot of my time was spent tweaking things that were already in place, and we had a Zoom call on Wednesday to discuss various matters too. I updated the ‘explore more’ age maps so they now include markers for young and old who didn’t select ‘scunnered’, meaning people can get an idea of the totals. I also changed the labels slightly and the new data types have been given two shades of grey and smaller markers, so the data is there but doesn’t catch the eye as much as the data for the selected term. I’ve updated the lexical ‘explore more’ maps so they now actually have labels and the ‘darker dots’ text (which didn’t make much sense for many maps) has been removed. Kinship terms now allow for two answers rather than one, which took some time to implement in order to differentiate this question type from the existing ‘up to 3 terms’ option. I also updated some of the pictures that are used and added in an ‘other’ option to some questions. I also updated the ‘Sounds about right’ quiz maps so that they display different legends that match the question words rather than the original questionnaire options. I needed to add in some manual overrides to the scripts that generate the data for use in the site for this to work.
I also added in proper text to the homepage and ‘about’ page. The former included a series of quotes above some paragraphs of text and I wrote a little script that highlighted each quote in turn, which looked rather nice. This then led onto the idea of having the quotes positioned on a map on the homepage instead, with different quotes in different places around Scotland. I therefore created an animated GIF based on some static map images that Mary had created and this looks pretty good.
I then spent some time researching geographical word clouds, which we had been hoping to incorporate into the site. After much Googling it would appear that there is no existing solution that does what we want, i.e. take a geographical area and use this as the boundaries for a word cloud, featuring different coloured words arranged at various angles and sizes to cover the area. One potential solution that I was pinning my hopes on was this one: https://github.com/JohnHenryEden/MapToWordCloud which promisingly states “Turn GeoJson polygon data into wordcloud picture of similar shape.”. I managed to get the demo code to run, but I can’t get it to actually display a word cloud, even though the specifications for one are in the code. I’ve tried investigating the code but I can’t figure out what’s going wrong. No errors are thrown and there’s very little documentation. All that happens is a map with a polygon area is displayed – no word cloud.
The word cloud aspects of the above are based on another package here: https://npm.io/package/wordcloud and this package allows you to specify a shape to use as an outline for the cloud, and one of the examples shows words taking up the shape of Taiwan: https://wordcloud2-js.timdream.org/#taiwan However, this is a static image not an interactive map – you can’t zoom into it or pan around it. One possible solution may be to create images of our regions, generate static word cloud images as with the above and then stitch the images together for form a single static map of Scotland. This would be a static image, though, and not comparable to the interactive maps we use elsewhere in the website. Programmatically stitching the individual region images together might also be quite tricky. I guess another option would be to just allow users to select an individual region and view the static word cloud (dynamically generated based on the data available when the user selects to view it) for the selected region, rather than joining them all together.
I also looked at some further options that Mary had tracked down. The word cloud on a leaflet map (http://hourann.com/2014/js-devs-dont-get-lost/leaflet-wordcloud.html?sydney) only uses a circle for the boundaries of the word cloud. All of the code is written around the use of a circle (e.g. using diameters to work out placement) so couldn’t really be adapted to work with a complex polygon. We could work out a central point for each region and have a circular word cloud positioned at that point, but we wouldn’t be able to make the words fill the entire region. The second of Mary’s links (https://www.jasondavies.com/wordcloud/) as far as I can tell is just a standard word cloud generator with no geographical options. The third option (https://github.com/peterschretlen/leaflet-wordcloud) has no demo or screenshot or much information about it and I’m afraid I can’t get it to work.
The final option (https://dagjomar.github.io/Leaflet.ParallaxMarker/) is pretty cool but it’s not really a word cloud as such. Instead it’s a bunch of labels set to specific lat/lng points and given different levels which sets their size and behaviour on scroll. We could use this to set the highest rated words to the largest level with lower rated words at lower level and position each randomly in a region, but it’s not really a word cloud and it would be likely that words would spill over into neighbouring regions.
Based on the limited options that appear to be out there, I think creating a working, interactive map-based word cloud would be a research project in itself and would take far more time than we have available.
Later on in the week Mary sent me the spreadsheet she’d been working on to list settlements found in postcode areas and to link these areas to the larger geographical regions we use. This is exactly what we needed to fill in the missing piece in our system and I wrote a script that successfully imported the data. For our 411 areas we now have 957 postcode records and 1638 settlement records. After that I needed to make some major updates to the system. Currently a person is associated with an area (e.g. ‘Aberdeen Southwest’) but I need to update this so that a person is associated with a specific settlement (e.g. ‘Ferryhill, Aberdeen’), which is then connected to the area and from the area to one of our 14 regions (e.g. ‘North East (Aberdeen)’).
I updated the system to make these changes and updated the ‘register’ form, which now features an autocomplete for the location – start typing a place and all matches appear. Behind the scenes the location is saved and connected up to areas and regions, meaning we can now start generating real data, rather than a person being assigned a random area. The perception follow-on now connects the respondent up with the larger region when selecting ‘listener is from’, although for now some of this data is not working.
I then needed to further update the registration page to add in an ‘outside Scotland’ option so people who did not grow up in Scotland can use the site. Adding in this option actually broke much of the site: registration requires an area with a geoJSON shape associated with the selected location otherwise it fails and the submission of answers requires this shape in order to generate a random marker point and this then failed when the shape wasn’t present. I updated the scripts to fix these issues, meaning an answer submitted by an ‘outside’ person has a zero for both latitude and longitude, but then I also needed to update the script that gets the map data to ensure that none of these ‘outside’ answers were returned in any of the data used in the site (both for maps and for non-map visualisations such as the sliders). So, much has changed and hopefully I haven’t broken anything whilst implementing these changes. It does now mean that ‘outside’ people can now be included and we can export and use their data in future, even though it is not used in the current site.
Further tweaks I implemented this week included: changing the font sizes of some headings and buttons; renaming the ‘activities’ and ‘more’ pages as requested; adding ‘back’ buttons from all ‘activity’ and ‘more’ pages back to the index pages; adding an intro page to the click exercise as previously it just launched into the exercise whereas all others have an intro. I also added summary pages to the end of the click and perception activities with links through to the ‘more’ pages and removed the temporary ‘skip to quiz’ option. I also added progress bars to the click and perception activities. Finally, I switched the location of the map legend from top right to top left as I realised when it was in the top right it was always obscuring Shetland whereas there’s nothing in the top left. This has meant I’ve had to move the region label to the top right instead.
Also this week I continued to work on the Allan Ramsay ‘Gentle Shepherd’ performance data. I added in faceted browsing to the tabular view, adding in a series of filter options for location, venue, adaptor and such things. You can select any combination of filters (e.g. multiple locations and multiple years in combination). When you select an item of one sort the limit options of other sorts update to only display those relevant to the limited data. However, the display of limiting options can get a bit confusing once multiple limiting types have been selected. I will try and sort this out next week. There are also multiple occurrences of items in the limiting options (e.g. two Glasgows) because the data has spaces in some rows (‘Glasgow’ vs ‘Glasgow ‘) and I’ll need to see about trimming these out next time I import the data.
Also this week I arranged for the old DSL server to be taken offline, as the new website has now been operating successfully for two weeks. I also had a chat with Katie Halsey about timescales for the development of the Books and Borrowers front-end. Finally, I imported a new disordered paediatric speech dataset into the Speech Star website. This included around double the number of records, new video files and a new ‘speaker code’ column. Finally, I participated in a Zoom call for the Scottish Place-Names database where we discussed the various place-names surveys that are in progress and the possiblity of created an overarching search across all systems.
We launched the new version of the DSL website on Tuesday this week, which involved switching the domain name to point at the new server where I’d been developing the new site. When we’ve done this previously (e.g. for the Anglo-Norman Dictionary) the switchover has been pretty speedy, but this time it took about 24 hours for the DNS updates to propagate, during which time the site was working for some people and not for others. This is because there is a single SSL certificate for the dsl.ac.uk domain and as it was moved to the new server, the site on the old server (which was still being accessed by people whose ISP’s had not updated their domain name servers) was displaying a certificate error. This was all a bit frustrating as the problem was out of our hands, but thankfully everything was working normally again by Wednesday.
I made a few final tweaks to the site this week too, including updating the text that is displayed when too many results are returned, updating the ‘cite this entry’ text, fixing a few broken links and fixing the directory permissions on the new site to allow file uploads. I also gave some advice about the layout of a page for a new Scots / Polish app that the DSL people are going to publish.
I spent almost all of the rest of the week working on the Speak For Yersel project, for which I still have an awful lot to do in a pretty short period of time, as we need to pilot the resource in schools during the week of the 13th of June and need to sent it out to other people for testing and to populate it with initial data before then. We had a team meeting on Thursday to go through some of the outstanding tasks, which was helpful.
This week I worked on the maps quite a bit, making the markers smaller and giving them a white border to help them stand out a bit. I updated the rating colours as suggested, although I think we might need to change some of the shades used for ratings and words as after using the maps quite a bit I personally find it almost impossible to differentiate some of the shades, as you can see in the screenshot below. We have all the colours of the rainbow at our disposal and while I can appreciate why shades are preferred from an aesthetical point of view, in terms of usability it seems a bit silly to me. I remember having this discussion with SCOSYA too. I think it is MUCH easier to read the maps when different colours are used, as with Our Dialects (e.g. https://www.ourdialects.uk/maps/bread/).
As you can also see from the above screenshot, I implemented the map legends as well, with only the options that have been chosen and have data appearing in the legend. Options appear with their text, a coloured spot so you can tell which option is which, and a checkbox that allows you to turn on / off a particular answer, which I think will be helpful in differentiating the data once the map fills up. For the ‘sound choice’ questions a ‘play’ button appears next to each option in the legend. I then ensured that the maps work for the quiz questions too: rather than showing a map of answers submitted for the quiz question the maps now display the data for the associated questionnaire (e.g. the ‘Gonnae you’ map). Maps are also now working for the ‘Explore more’ section too. I also added in the pop-up for ‘Attribution and Copyright’ (the link in the bottom right of the map).
I then added further quiz questions to the ‘Give your word’ exercise, but the final quiz question in the document I was referencing had a very different structure, with multiple specific answer options from several different questions on the same map. I spent about half a day making updates to the system to allow for such a question structure. I needed to update the database structure, the way data is pulled into the website, the way maps are generated, how quiz questions are displayed and how they are processed.
The multi-choice quiz works in a similar way to the multi-choice questionnaire in that you can select more than one answer. Unlike the questionnaire there is no limit to the number of options you can select. When at least one choice is selected a ‘check your answers’ button appears. The map displays all of the data for each of the listed words, even though these come from different questionnaires (this took some figuring out). There are 9 words here and we only have 8 shades so the ninth is currently appearing as red. The map legend lists the words alphabetically, which doesn’t match up with the quiz option order, but I can’t do anything about this (at least not without a lot of hacking about). You can turn off/on map layers to help see the coverage.
When you press on the ‘Check your answers’ button all quiz options are greyed out and your selection is compared to the correct answers. You get a tick for a correct one and a cross for an incorrect one. In addition, any options you didn’t select that are correct are given a tick (in the greyed out button) so you can see what was correct that you missed. If you selected all of the correct answers and didn’t select any incorrect answers then the overall question is marked as correct in the tally that gives your final score. If you missed any correct answers or selected any incorrect ones then this question is not counted as correct overall. Below is a screenshot showing how this type of question works:
Unfortunately, when we met on Thursday it turned out that Jennifer and Mary were not wanting this question to be presented on one single map, but instead for each answer option to have its own map, meaning the time I spent developing the above was wasted. However, it does mean the question is much more simple, which is probably a good thing. We decided to split the question up into individual questions to make things more straightforward for users and to ensure that getting one of the options incorrect didn’t mean they were marked as getting the entire multi-part question wrong.
Also this week I began implementing the perception questionnaire with seven interactive sliders allowing the user to rate an accent. Styling the sliders was initially rather tricky but thankfully I found a handy resource that allows you to customise a slider and generates the CSS for you (https://www.cssportal.com/style-input-range/). Below is a screenshot of the perception activity as it currently stands:
I also replaced one of the sound recordings and fixed the perception activity layout on narrow screens (as previously on narrow screens the labels ended up positioned at the wrong ends of the slider). I added a ‘continue’ button under the perception activity that is greyed out and added a check to see whether the user has pressed on every slider. If they have then the ‘continue’ button text changes and is no longer greyed out. I also added area names to the top-left corner of the map when you hover over an area, so now no-one will confuse Orkney and Shetland!
We had also agreed to create a ‘more activities’ page and to have follow-on activities and the ‘explore more’ maps situated there. I created a new top-level menu item currently labelled ‘More’. If you click on this you find an index page similar to the ‘Activities’ page. Press on an option (only the first page options work so far) and you’re given the choice to either start the further activities (not functioning yet) or explore the maps. The latter is fully functional. In the regular activities page I then removed the ‘explore more stage’ so that now when you finish the quiz the button underneath your score leads you to the ‘More’ page for the exercise in question. Finally, I began working on the follow-on activities that display age-based maps, but I’ll discuss these in more detail next week.
I also spoke to Laura Rattray and Ailsa Boyd about a proposal they are putting together and arranged a Zoom meeting with them in a couple of weeks and spoke to Craig Lamont about the Ramsay project I’m hopefully going to be able to start working on next week.
I divided most of my time between the Speak For Yersel project and the Dictionaries of the Scots Language this week. For Speak For Yersel I continued to work on the user management side of things. I implemented the registration form (apart from the ‘where you live’ bit, which still requires data) and all now works, uploading the user’s details to our database and saving them within the user’s browser using HTML5 Storage. I added in checks to ensure that a year of birth and gender must be supplied too.
I then updated all activities and quizzes so that the user’s answers are uploaded to our database, tracking the user throughout the site so we can tell which user has submitted what. For the ‘click map’ activity I also record the latitude and longitude of the user’s markers when they check their answers, although a user can check their answers multiple times, and each time the answers will be logged, even if the user has pressed on the ‘view correct locations’ first. Transcript sections and specific millisecond times are stored in our database for the main click activity now, and I’ve updated the interface for this so that the output is no longer displayed on screen.
With all of this in place I then began working on the maps, replacing the placeholder maps and their sample data with maps that use real data. Now when a user selects an option a random location within their chosen area is generated and stored along with their answer. As we still don’t have selectable area data at the point of registration, whenever you register with the site at the moment you are randomly assigned to one or our 411 areas, so by registering and answering some questions test data is then generated. My first two test users were assigned areas south of Inverness and around Dunoon.
With location data now being saved for answers I then updated all of the maps on the site to remove the sample data and display the real data. The quiz and ‘explore’ maps are not working properly yet but the general activity ones are. I replaced the geographical areas visible on the map with those as used in the click map, as requested, but have removed the colours we used on the click map as they were making the markers hard to see. Acceptability questions use the four rating colours as were used on the sample maps. Other questions use the ‘lexical’ colours (up to 8 different ones) as specified.
The markers were very small and difficult to spot when there are so few of them so I placed a little check that alters their size depending on the number of returned markers. If there are less than 100 then each marker is size 6. If there are 100 or more then the size is 3. Previously all markers were size 2. I may update the marker size or put more granular size options in place in future. The answer submitted by the current user appears on the map when they view the map, which I think is nice. There is still a lot to do, though. I still need to implement a legend for the map so you can actually tell which coloured marker refers to what, and also provide links to the audio clips where applicable. I also still need to implement the quiz question and ‘explore’ maps as I mentioned. I’ll look into these issues next week.
For the DSL I processed the latest data export from the DSL’s editing system and set up a new version of the API that uses it. The test DSL website now uses this API and is pretty much ready to go live next week. After that I spent some time tweaking the search facilities of the new site. Rhona had noticed that searches involving two single character wildcards (question marks) were returning unexpected results and I spent some time investigating this.
A second thing was causing further problems: A quick search by default performs an exact match search (surrounded by double quotes) if you ignore the dropdown suggestions and press the search button. But an exact match was set up to be just that – single wildcard characters were not being treated as wildcard characters, meaning a search for “sc??m” was looking for exactly that and finding nothing. I’ve fixed this now, allowing single character wildcards to appear within an exact search.
After fixing this we realised that the new site’s use of the asterisk wildcard didn’t match its use in the live site. Rhona was expected a search such as ‘sc*m’ to work on the new site, returning all headwords beginning ‘sc’ and ending in ‘m’. However, in the new site the asterisk wildcard only matches the beginning or end of words, e.g. ‘wor*’ finds all words beginning with ‘wor’ and ‘*ord’ finds all words ending with ‘ord’. You can combine the two with a Boolean search, though: ‘sc* AND *m’ and this will work in exactly the same way as ‘sc*m’.
However, I decided to enable the mid-wildcard search on the new site in addition to using Boolean AND, because it’s better to be consistent with the old site, plus I also discovered that the full text search in the new site does allow for mid-asterisk searches. I therefore spent a bit of time implementing the mid-asterisk search, both in the drop-down list of options in the quick search box as well as the main quick search and the advanced search headword search.
Rhona then spotted that a full-text mid-asterisk search was listing results alphabetically rather than by relevance. I looked into this and it seems to be a limitation with that sort of wildcard search in the Solr search engine. If you look here https://solr.apache.org/guide/8_7/the-standard-query-parser.html#differences-between-lucenes-classic-query-parser-and-solrs-standard-query-parser the penultimate bullet point says “Range queries (“[a TO z]”), prefix queries (“a*”), and wildcard queries (“a*b”) are constant-scoring (all matching documents get an equal score).”
I’m guessing the original API that powers the live site uses Lucene rather than Solr’s indexing system, but I don’t really know for certain. Also, while the live site’s ordering of mid-asterisk wildcard searches is definitely not alphabetical, it doesn’t really seem to be organising properly by relevance either. I’m afraid we might just have to live with alphabetical ordering for mid-asterisk search results, and I’ll alter the ‘Results are ordered’ statement in such cases to make it clearer that the ordering is alphabetical.
My final DSL tasks for the week were to make some tweaks to the XSLT that processes the layout of bibliographical entries. This involved fixing the size of author names, ensuring that multiple authors are handled correctly and adding in editors’ names for SND items. I also spotted a few layout issues that are still cropping up. The order of some elements is displayed incorrectly and some individual <bibl> items have multiple titles and the stylesheet isn’t expecting this so only displays the first ones. I think I may need to completely rewrite the stylesheet to fix these issues. As there were lots of rules for arranging the bibliography I wrote the stylesheet to pick out and display specific elements rather than straightforwardly going through the XML and transforming each XML tag into a corresponding HTML tag. This meant I could ensure (for example) authors always appear first and titles each get indented, but it is rather rigid – any content that isn’t structured as the stylesheet expects may get displayed in the wrong place or not at all (like the unexpected second titles). I’m afraid I’m not going to have time to rewrite the stylesheet before the launch of the new site next week and this update will need to be added to the list of things to do for a future release.
Also this week I fixed an issue with the Historical Thesaurus which involved shifting a category and its children one level up and helped sort out an issue with an email address for a project using a top-level ‘ac.uk’ domain. Next week I’ll hopefully launch the new version of the DSL on Tuesday and press on with the outstanding Speak For Yersel exercises.
I was back at work on Monday this week after a lovely week off last week. It was only a four-day week, however, as the week ended with the Good Friday holiday. I’ll also be off next Monday too. I had rather a lot to squeeze into the four working days. For the DSL I did some further troubleshooting for integrating Google Analytics with the DSL’s new https://macwordle.co.uk/ site. I also had discussions about the upcoming switchover to the new DSL website, which we scheduled in for the week after next, although later in the week it turned out that all of the data has already been finalised so I’ll begin processing it next week.
I participated in a meeting for the Historical Thesaurus on Tuesday, after which I investigated the server stats for the site, which needed fixing. I also enquired about setting up a domain URL for one of the ‘ac.uk’ sites we host, and it turned out to be something that IT Support could set up really quickly, which is good to know for future reference. I also had a chat with Craig Lamont about a database / timeline / map interface for some data for the Allan Ramsay project that he would like me to put together to coincide with a book launch at the end of May. Unfortunately they want this to be part of the University’s T4 website, which makes development somewhat tricky but not impossible. I had to spend some time familiarising myself with T4 again and arranging for access to the part of the system where the Ramsay content resides. Now I have this sorted I’ve agreed to look into developing this in early May. I also deleted a couple of unnecessary entries from the Anglo-Norman Dictionary after the editor requested their removal and created a new version of the requirements document for the front-end for the Books and Borrowing project following feedback form the project team on the previous version.
The rest of my week was spent on the Speak For Yerself project, for which I still have an awful lot to do and not much time to do it in. I had a meeting with the team on Monday to go over some recent developments, and following that I tracked down a few bugs in the existing code (e.g. a couple of ‘undefined’ buttons in the ‘explore’ maps). I then replaced all of the audio files in the ‘click’ exercise as the team had decided to use a standardised sentence spoken by many different regional speakers rather than having different speakers saying different things. As the speakers were not always from the same region as the previous audio clips I needed to change the ‘correct’ regions and also regenerated the MP3 files and transcript data.
The next step will be to populate the table holding specific locations within a postcode area once this data is available. After that I’ll be able to create the user information form and then I’ll need to update the activities so the selected options are actually saved. In the meantime I began to implement the user management system. A user icon now appears in the top right of every page, either with a green background and a tick if you’ve registered or a red background and a cross if you haven’t. I haven’t created the registration form yet, but have just included a button to register, and when you press this you’ll be registered and this will be remembered in your browser even if you close your browser or turn your device off. Press on the green tick user icon to view the details recorded about the registered person (none yet) and find an option to sign out if this isn’t you or you want to clear your details. If you’re not registered and you try to access the activities the page will redirect you to the registration form as we don’t want unregistered people completing the activities. I’ll continue with this next week, hopefully getting to the point where the choices a user makes are actually logged in the database. After that I’ll be able to generate maps with real data, which will be an important step.
I was on strike last week, and I’m going to be on holiday next week, so I had a lot to try and cram into this week. This was made slightly harder when my son tested positive for Covid again on Tuesday evening. It’s his fourth time, and the last bout was only seven weeks ago. Thankfully he wasn’t especially ill, but he was off school from Wednesday onwards.
I worked on several different projects this week. For the Books and Borrowing project I updated the front-end requirements document based on my discussions with the PI and Co-I and set it on for the rest of the team to give feedback on. I also uploaded a new batch of register images from St Andrews (more than 2,500 page images taking up about 50Gb) and created all of the necessary register and page records. I also did the same for a couple of smaller registers from Glasgow. I also exported spreadsheets of authors, edition formats and edition languages for the team to edit too.
For the Anglo-Norman Dictionary I fixed an issue with the advanced search for citations, where entries with multiple citations were having the same date and reference displayed for each snippet rather than the individual dates and references. I also updated the display of snippets in the search results so they appear in date order.
I also responded to an email from editor Heather Pagan about how language tags are used in the AND XML. There are 491 entries that have a language tag and I wrote a little script to list the distinct languages and a count of a number of times each appears. Here’s the output (bearing in mind that an entry may have multiple language tags):
[Latin] => 79
[M.E.] => 369
[Dutch] => 3
[Arabic] => 12
[Hebrew] => 20
[M.L.] => 4
[Greek] => 2
[A.F._and_M.E.] => 3
[Irish] => 2
[M.E._and_A.F.] => 8
[A-S.] => 3
[Gascon] => 1
There seem to be two ways the language tag appears. One in a sense, and these appear in the entry, e.g. https://anglo-norman.net/entry/Scotland and one in <head> and these don’t currently seem to get displayed. E.g. https://anglo-norman.net/entry/ganeir has:
<head> <language lang=”M.E.”/>
But ‘M.E’ doesn’t appear anywhere. I could probably write another little script that moves language to the head as above, and then I could update the XSLT so that this type of language tag gets displayed. Or I could update the XSLT first so we can see how it might look with entries that already have this structure. I’ll need to hear back from Heather before I do more.
For the Dictionaries of the Scots Language I spent quite a bit of time working with the XSLT for the display of bibliographies. There are quite a lot of different structures for bibliographical entries, sometimes where the structure of the XML is the same but a different layout is required, so it proved to be rather tricky to get things looking right. By the end of the week I think I had got everything to display as requested, but I’ll need to see if the team discover any further quirks.
I also wrote a script that extracts citations and their dates from DSL entries. I created a new citations table that stores the dates, the quotes and associated entry and bibliography IDs. The table has 747,868 rows in it. Eventually we’ll be able to use this table for some kind of date search, plus there’s now an easy to access record of all of the bib IDs for each entry / entry IDs for each bib, so displaying lists of entries associated with each bibliography should also be straightforward when the time comes. I also added new firstdate and lastdate columns to the entry table, picking out the earliest and latest date associated with each entry and storing these. This means we can add first dates to the browse, something I decided to add in for test purposes later in the week.
I added the first recorded date (the display version not the machine readable version) to the ‘browse’ for DOST and SND. The dates are right-aligned and grey to make them stand out less than the main browse label. This does however make the date of the currently selected entry in the browse a little hard to read. Not all entries have dates available. Any that don’t are entries where either the new date attributes haven’t been applied or haven’t worked. This is really just a proof of concept and I will remove the dates from the browse before we go live, as we’re not going to do anything with the new date information until a later point.
I also processed the ‘History of Scots’ ancillary pages. Someone had gone through these to add in links to entries (hundreds of links), but unfortunately they hadn’t got the structure quite right. The links had been added in Word, meaning regular double quotes had been converted into curly quotes, which are not valid HTML. Also the links only included the entry ID, rather than the path to the entry page. A couple of quick ‘find and replace’ jobs fixed these issues, but I also needed to update the API to allow old DSL IDs to be passed without also specifying the source. I also set up a Google Analytics account for the DSL’s version of Wordle (https://macwordle.co.uk/)
For the Speak For Yersel project I had a meeting with Mary on Thursday to discuss some new exercises that I’ll need to create. I also spent some time creating the ‘Sounds about right’ activity. This had a slightly different structure to other activities in that the questionnaire has three parts with an introduction for each part. This required some major reworking of the code as things like the questionnaire numbers and the progress bar relied on the fact that there was one block of questions with no non-question screens in between. The activity also featured a new question type with multiple sound clips. I had to process these (converting them from WAV to MP3) and then figure out how to embed them in the questions.
Finally, for the Speech Star project I updated the extIPA chart to improve the layout of the playback speed options. I also made the page remember the speed selection between opening videos – so if you want to view them all ‘slow’ then you don’t need to keep selecting ‘slow’ each time you open one. I also updated the chart to provide an option to switch between MRI and animation videos and added in two animation MP4s that Eleanor had supplied me with. I then added the speed selector to the Normalised Speech Database video popups and then created a new ‘Disordered Paediatric Speech Database’, featuring many videos, filters to limit the display of data and the video speed selector. It was quite a rush to get this finished by the end of the week, but I managed it.
I will be on holiday next week so there will be no post from me then.
With the help of Raymond at Arts IT Support we migrated the test version of the DSL website to the new server this week, and also set up the Solr free-text indexes for the new DSL data too. This test version of the site will become the live version when we’re ready to launch it in April and the migration all went pretty smoothly, although I did encounter an error with the htaccess script that processed URLs for dictionary pages due to underscores not needing to be escaped on the old server but requiring a backslash as an escape character on the new server.
I also replaced the test version’s WordPress database with a copy of the live site’s WordPress database, plus copied over some of the customisations from the live site such as changes to logos and the content of the header and the footer, bringing the test version’s ancillary content and design into alignment with the live site whilst retaining some of the additional tweaks I’d made to the test site (e.g. the option to hide the ‘browse’ column and the ‘about this entry’ box).
One change to the structure of the DSL data that has been implemented is that dates are now machine readable, with ‘from’, ‘to’ and ‘prefix’ attributes. I had started to look at extracting these for use in the site (e.g. maybe displaying the earliest citation date alongside the headword in the ‘browse’ lists) when I spotted an issue with the data: Rather than having a date in the ‘to’ attribute, some entries had an error code – for example there are 6,278 entries that feature a date with ‘PROBLEM6’ as a ‘to’ attribute. I flagged this up with the DSL people and after some investigation they figured out that the date processing script wasn’t expecting to find a circa in a date ending a range (e.g. c1500-c1512). When the script encountered such a case it was giving an error instead. The DSL people were able to fix this issue and a new data export was prepared, although I won’t be using it just yet, as they will be sending me a further update before we go live and to save time I decided to just wait until they send this on. I also completed work on the XSLT for displaying bibliography entries and created a new ‘versions and changes’ page, linking to it from a statement in the footer that notes the data version number.
For the ‘Speak For Yersel’ project I made a number of requested updates to the exercises that I’d previously created. I added a border around the selected answer and ensured the active state of a selected button doesn’t stay active and I added handy ‘skip to quiz’ and ‘skip to explore’ links underneath the grammar and lexical quizzes so we don’t have to click through all those questions to check out the other parts of the exercise. I italicised ‘you’ and ‘others’ on the activity index pages and I fixed a couple of bugs on the grammar questionnaire. Previously only the map rolled up and an issue was caused when an answer was pressed on whilst the map was still animating. Now the entire question area animates so it’s impossible to press on an answer when the map isn’t available. I updated the quiz questions so they now have the same layout as the questionnaire, with options on the left and the map on the right and I made all maps taller to see how this works.
For the ‘Who says what where’ exercise the full sentence text is now included and I made the page scroll to the top of the map if this isn’t visible when you press on an item. I also updated the map and rating colours, although there is still just one placeholder map that loads so the lexical quiz with its many possible options doesn’t have its own map that represents this. The map still needs some work – e.g. adding in a legend and popups. I also made all requested changes to the lexical question wording and made the ‘v4’ click activity the only version, making it accessible via the activities menu and updated the colours for the correct and incorrect click answers.
For the Books and Borrowing project I completed a first version of the requirements for the public website, which has taken a lot of time and a lot of thought to put together, resulting in a document that’s more than 5,000 words long. On Friday I had a meeting with PI Katie and Co-I Matt to discuss the document. We spent an hour going through it and a list of questions I’d compiled whilst writing it, and I’ll need to make some modifications to the document based on our discussions. I also downloaded images of more library registers from St Andrews and one further register from Glasgow that I will need to process when I’m back at work too.
I also spent a bit of time writing a script to export a flat CSV version of the Historical Thesaurus, then made some updates based on feedback from the HT team before exporting a further version. We also spotted that adjectives of ‘parts of insects’ appeared to be missing from the website and I investigated what was going on with it. It turned out that there was an empty main category missing, and as all the other data was held in subcategories these didn’t appear, as all subcategories need a main category to hang off. After adding in a maincat all of the data was restored.
Finally, I did a bit of work for the Speech Star project. Firstly, I fixed a couple of layout issues with the ExtIPA chart symbols. There was an issue with the diacritics for the symbol that looks like a theta, resulting in them being offset. I reduced the size of the symbol slightly and have adjusted the margins of the symbols above and below and this seems to have done the trick. In addition, I did a little bit of research into setting the playback speed and it looks like this will be pretty easy to do whilst still using the default video player. See this page: https://stackoverflow.com/questions/3027707/how-to-change-the-playing-speed-of-videos-in-html5. I added a speed switcher to the popup as a little test to see how it works. The design would still need some work (buttons with the active option highlighted) but it’s good to have a proof of concept. Pressing ‘normal’ or ‘slow’ sets the speed for the current video in the popup and works both when the video is playing and when it’s stopped.
Also, I was sure that jumping to points in the videos wasn’t working before, but it seems to work fine now – you can click and drag the progress bar and the video jumps to the required point, either when playing or paused. I wonder if there was something in the codec that was previously being used that prevented this. So fingers cross we’ll be able to just use the standard HTML5 video player to achieve everything the projects requires.
I’ll be participating in the UCU strike action for all of next week so it will be the week beginning the 28th of March before I’m back in work again.
This was my first five-day week after the recent UCU strike action and it was pretty full-on, involving many different projects. I spent about a day working on the Speak For Yersel project. I added in the content for all 32 ‘I would never say that’ questions and completed work on the new ‘Give your word’ lexical activity, which features a further 30 questions of several types. This includes questions that have associated images and questions where multiple answers can be selected. For the latter no more than three answers are allowed to be selected and this question type needs to be handed differently as we don’t want the map to load as soon as one answer is selected. Instead the user can select / deselect answers. If at least one answer is selected a ‘Continue’ button appears under the question. When you press on this the answers become read only and the map appears. I made it so that no more than three options can be selected – you need to deselect one before you can add another. I think we’ll need to look into the styling of the buttons, though, as currently ‘active’ (when a button is hovered over or has been pressed and nothing else has yet been pressed) is the same colour is ‘selected’. So if you select ‘ginger’ then deselect it the button still looks selected until you press somewhere else, which is confusing. Also if you press a fourth button it looks like it has been selected when in actual fact it’s just ‘active’ and isn’t really selected.
I also spent about a day continuing to work on the requirements document for the Books and Borrowing project. I haven’t quite finished this initial version of the document but I’ve made good progress and I aim to have it completed next week. Also for the project I participated in a Zoom call with RA Alex Deans and NLS Maps expert Chris Fleet about a subproject we’re going to develop for B&B for the Chambers Library in Edinburgh. This will feature a map-based interface showing where the borrowers lived and will use a historical map layer for the centre of Edinburgh.
Chris also talked about a couple of projects at the NLS that were very useful to see. The first one was the Jamaica journal of Alexander Innes (https://geo.nls.uk/maps/innes/) which features journal entries plotted on a historical map and a slider allowing you to quickly move through the journal entries. The second was the Stevenson maps of Scotland (https://maps.nls.uk/projects/stevenson/) that provides options to select different subjects and date periods. He also mentioned a new crowdsourcing project to transcribe all of the names on the Roy Military Survey of Scotland (1747-55) maps which launched in February and already has 31,000 first transcriptions in place, which is great. As with the GB1900 project, the data produced here will be hugely useful for things like place-name projects.
I also participated in a Zoom call with the Historical Thesaurus team where we discussed ongoing work. This mainly involves a lot of manual linking of the remaining unlinked categories and looking at sensitive words and categories so there’s not much for me to do at this stage, but it was good to be kept up to date.
I continued to work on the new extIPA charts for the Speech Star project, which I had started on last week. Last week I had some difficulties replicating the required phonetic symbols but this week Eleanor directed me to an existing site that features the extIPA chart (https://teaching.ncl.ac.uk/ipa/consonants-extra.html). This site uses standard Unicode characters in combinations that work nicely, without requiring any additional fonts to be used. I’ve therefore copied the relevant codes from there (this is just character codes like b̪ – I haven’t copied anything other than this from the site). With the symbols in place I managed to complete an initial version of the chart, including pop-ups featuring all of the videos, but unfortunately the videos seem to have been encoded with an encoder that requires QuickTime for playback. So although the videos are MP4 they’re not playing properly in browsers on my Windows PC – instead all I can hear is the audio. It’s very odd as the videos play fine directly from Windows Explorer, but in Firefox, Chrome or MS Edge I just get audio and the static ‘poster’ image. When I access the site on my iPad the videos play fine (as QuickTime is an Apple product). Eleanor is still looking into re-encoding the videos and will hopefully get updated versions to me next week.
I also did a bit more work for the Anglo-Norman Dictionary this week. I fixed a couple of minor issues with the DTD, for example the ‘protect’ attribute was an enumerated list that could either be ‘yes’ or ‘no’ but for some entries the attribute was present but empty, and this was against the rules. I looked into whether an enumerated list could also include an empty option (as opposed to not being present, which is a different matter) but it looks like this is not possible (see for example http://lists.xml.org/archives/xml-dev/200309/msg00129.html). What I did instead was to change the ‘protect’ attribute from an enumerated list with options ‘yes’ and ‘no’ to a regular data field, meaning the attribute can now include anything (including being empty). The ‘protect’ attribute is a hangover from the old system and doesn’t do anything whatsoever in the new system so it shouldn’t really matter. And it does mean that the XML files should now validate.
The AND people also noticed that some entries that are present in the old version of the site are missing from the new version. I looked through the database and also older versions of the data from the new site and it looks like these entries have never been present in the new site. The script I ran to originally export the entries from the old site used a list of headwords taken from another dataset (I can’t remember where from exactly) but I can only assume that this list was missing some headwords and this is why these entries are not in the new site. This is a bit concerning, but thankfully the old site is still accessible. I managed to write a little script that grabs the entire contents of the browse list from the old website, separating it into two lists, one for main entries and one for xrefs. I then ran each headword against a local version of the current AND database, separating out homonym numbers then comparing the headword with the ‘lemma’ field in the DB and the hom with the hom. Initially I ran main and xref queries separately, comparing main to main and xref to xref, but I realised that some entries had changed types (legitimately so, I guess) so stopped making a distinction.
The script outputted 1540 missing entries. This initially looks pretty horrifying, but I’m fairly certain most of them are legitimate. There are a whole bunch of weird ‘n’ forms in the old site that have a strange character (e.g. ‘nun⋮abilité’) that are not found in the new site, I guess intentionally so. Also, there are lots of ‘S’ and ‘R’ words but I think most of these are because of joining or splitting homonyms. Geert, the editor, looked through the output and thankfully it turns out that only a handful of entries are missing, and also that these were also missing from the old DMS version of the data so their omission occurred before I became involved in the project.
Finally this week I worked with a new dataset of the Dictionaries of the Scots Language. I successfully imported the new data and have set up a new ‘dps-v2’ api. There are 80,319 entries in the new data compared to 80,432 in the previous output from DPS. I have updated our test site to use the new API and its new data, although I have not been able to set up the free-text data in Solr yet so the advanced search for full text / quotations only will not work yet. Everything else should, though.
Also today I began to work on the layout of the bibliography page. I have completed the display of DOST bibs but haven’t started on SND yet. This includes the ‘style guide’ link when a note is present. I think we may still need to tweak the layout, however. I’ll continue to work with the new data next week.