Week Beginning 3rd October 2022

The Speak For Yersel project launched this week and is now available to use here: https://speakforyersel.ac.uk/.  It’s been a pretty intense project to work on and has required much more work than I’d expected, but I’m very happy with the end result.  We didn’t get as much media attention as we were hoping for, but social media worked out very well for the project and in the space of a week we’d had more than 5,000 registered users completing thousands of survey questions.  I spent some time this week tweaking things after the launch.  For example, I hadn’t added the metadata tags required by Twitter and Facebook / WhatsApp to nicely format links to the website (for example the information detailed here https://developers.facebook.com/docs/sharing/webmasters/) and it took a bit of time to add these in with the correct content.

I also gave some advice to Anja Kuschmann at Strathclyde about applying for a domain for the new VARICS project I’m involved with and investigated a replacement batch of videos that Eleanor had created for the Seeing Speech website.  I’ll need to wait until she gets back to me with files that match the filenames used on the existing site before I can take this further, though.  I also fixed an issue with the Berwickshire place-names website which has lost its additional CSS and investigated a problem with the domain for the Uist Saints website that has still unfortunately not been resolved.

Other than these tasks I spent the rest of the week continuing to develop the front-end for the Books and Borrowing project.  I completed an initial version of the ‘page’ view, including all three views (image, text and image and text).  I added in a ‘jump to page’ feature, allowing you (as you might expect) to jump directly to any page in the register when viewing a page.  I also completed the ‘text’ view of the page, which now features all of the publicly accessible data relating to the records – borrowing records, borrowers, book holding and item records and any associated book editions and book works, plus associated authors.  There’s an awful lot of data and it took quite a lot of time to think about how best to lay it all out (especially taking into consideration screens of different sizes), but I’m pretty happy with how this first version looks.

Currently the first thing you see for a record is the transcribed text, which is big and green.  Then all fields relating to the borrowing appear under this.  The record number as it appears on the page plus the record’s unique ID are displayed in the top right for reference (and citation).  Then follows a section about the borrower, with the borrower’s name in green (I’ve used this green to make all of the most important bits of text stand out from the rest of the record but the colour may be changed in future).  Then follows the information about the book holding and any specific volumes that were borrowed.  If there is an associated site-wide book edition record (or records) these appear in a dark grey box, together with any associated book work record (although there aren’t many of these associations yet).  If there is a link to a library record this appears as a button on the right of the record.  Similarly, if there’s an ESTC and / or other authority link for the edition these appear to the right of the edition section.

Authors now cascade down through the data as we initially planned.  If there’s an author associated with a work it is automatically associated with and displayed alongside the edition and holding.  If there’s an author associated with an editon but not a work it is then associated with the holding.  If a book at a specific level has an author specified then this replaces any cascading author from this point downwards in the sequence.  Something that isn’t in place yet are the links from information to search results, as I haven’t developed the search yet.  But eventually things like borrower name, author, book title etc will be links allowing you to search directly for the items.

One other thing I’ve added in is the option to highlight a record.  Press anywhere in a record and it is highlighted in yellow.  Press again to reset it.  This can be quite useful as you’re scrolling through a page with lots of records on if there are certain records you’re interested in.  You can highlight as many records as you want.  It’s possible that we may add other functionality to this, e.g. the option to download the data for selected records.  Here’s a screenshot of the text view of the page:

I also completed the ‘image and text’ view.  This works best on a large screen (i.e. not a mobile phone, although it is just about possible to use it on one, as I did test this out).  The image takes up about 60% of the screen width and the text takes up the remaining 40%.   The height of the records section is fixed to the height of the image area and is scrollable, so you can scroll down the records whilst still viewing the image (rather than the whole page scrolling and the image disappearing off the screen).  I think this view works really well and the records are still perfectly usable in the more confined area and it’s great to be able to compare the image and the text side by side.  Here’s a screenshot of the same page when viewing both text and image:

I tested the new interface out with registers from all of our available libraries and everything is looking good to me.  Some registers don’t have images yet, so I added in a check for this to ensure that the image views and page thumbnails don’t appear for such registers.  After that I moved onto developing the interface to browse book holdings when viewing a library.  I created an API endpoint for returning all of the data associated with holding records for a specified library.  This includes all of the book holding data, information about each of the book items associated with the holding record (including the number of borrowing records for each), the total number of borrowing records for the holding, any associated book edition and book work records (and there may be multiple editions associated with each holding) plus any authors associated with the book.  Authors cascade down through the record as they do when viewing borrowing records in the page.  This is a gigantic amount of information, especially as libraries may have many thousands of book holding records.  The API call loads pretty rapidly for smaller libraries (e.g. Chambers Library with 961 book holding records) but for larger ones (e.g. St Andrews with over 8,500 book holding records) the API call takes too long to return the data (in the latter case it takes about a minute and returns a JSON file that’s over 6Mb in size).  The problem is the data needs to be returned in full in order to do things like order it by largest number of borrowings.  Clearly dynamically generating the data each time is going to be too slow so instead I am going to investigate caching the data.  For example, that 6Mb JSON file can just site there as an actual file rather than being generated each time.  Instead I will write a script to regenerate the cached files and I can run this whenever data gets updated (or maybe once a week whilst the project is still active).  I’ll continue to work on this next week.