Week Beginning 26th February 2024
I spent much of Monday this week continuing to migrate the Anthology of 16th and Early 17th Century Scots Poetry to TEI XML. I’ve now migrated 43 poems, so I think I’m about a third of the way there. It’s still going to take quite some time, but I’ll just keep tackling a few when I find the time, until they’re all done.
I spent the rest of the week continuing to work on the new Speak For Yersel regions. I’m starting with the Republic of Ireland as my test area for the development of a more generic tool that can then be used to create similar surveys in other geographical areas. Last week my data import script spotted a few errors with the geographical data for ROI and thankfully the team was able to address these and get an updated dataset to me this week. When I ran my setup script again the areas (used for deciding where a user’s answer marker should appear on the maps) imported successfully and I could then move onto developing the front-end.
Developing the front-end has involved rationalising the code I’d originally written for the Speak For Yersel website (https://speakforyersel.ac.uk/). This website has a broader focus than the new surveys will have, involving two additional survey types, plus quizzes and additional activities. It was also very much an active research project and the code I wrote needed to be updated significantly as the project developed and our ideas and understanding changes. This meant the code ended up a bit tangled and messy.
My task in developing the front-end for the new survey areas was to extract only those parts of the code that were relevant to the three survey types that will be included and to rationalise it – straightening it out and making it less tangled. The new code also had to work with configuration variables set during the creation of the resource (e.g. database table prefixes, site subdirectories).
I began developing the scripts to handle the layout and the connections to the config options and the database, generating placeholder pages for things like the homepage and the ‘About’ pages. I then developed the user registration facility, which I connected to the ROI geographical data thus enabling a user to begin typing the name of their settlement and for possible matches to be displayed in a drop-down list. Users are then saved in the database and stored using HTML5 Local Storage, including the GeoJSON shape associated with their chosen location, thus enabling markers to be generated within this area at random locations each time the user answers a survey question. The screenshot below shows the user details registered for a test user I created:
I then began working on the display of the surveys, completing the scripts that list the available surveys, display the intro text for a selected survey, load and display a question for each survey type and handle the progress bar. I also ensured that images can be displayed for questions in each survey type (if supplied) and have ensured that any associated audio files will play.
The screenshot below shows a ‘phonology’ question, with an associated image, just for test purposes (it’s of no relevance to the question). I also decided to move the ‘question number’ to the top right of the main pane, which I think helps declutter things a bit (for SFY it was below the progress bar and above the question). I also made the audio ‘play’ button a fixed width as previously the width was slightly different depending on whether ‘play’ or ‘stop’ was displayed, which made the adjacent button jump slightly during playback.
With this in place I then moved onto the processing of submitted answers. This has included saving all answers (including where multiple answer options are allowed), displaying the maps, dealing with map filters (e.g. respondent age group) and loading the next question, as you can see in the following screenshot:
I also created the ‘survey complete’ page and have ensured that the system logs which surveys a user has completed (including adding a tick to the survey button of completed surveys on the survey index page). I still need to create the maps page, add in the map attribution popup and develop the staff page with CSV download options, which I will start on next week.


