Weeknotes: Books and places for Open Correspondence

Progress on the next version of Open  Correspondence has been a bit slower than I would have like. Sleep is, however, useful to being alert enough to write code.

I’ve gone back to the some of the work that I was doing for the first version of the site way back last year. As part of the move to Linked Data, I’ve been working on a URI for places and books. Places, asn oted in previous posts, has come together and is just in need of some tidying up. I’ve managed to create an index page from the RDF endpoint using rdflib to parse the triples looking for the geo: namespace and then putting the items into a set to remove the duplicates. This needs changing as sets are unordered and I’d like the page to be ordered so that a pace can be found quickly. Perhaps a better option would be to place the raw data into a dictionary and cast to a list to sort at the last moment (or more simply sort the keys in the dictionary…) and then to remove the duplicates such as Gad’s Hill which is analogous to Gadshill. Both are used but refer to the same entity, so I need to do a difference pn the string (probably using difflib or a variant)¬† to identify the changes and clean up the URIs.

With the books, I had created a table of the publication dates and the titles, so all I need to do is to map the book’s variant titles, such as the “The Adventures of Nicholas Nickleby” is better known as “Nicholas Nickelby” or plain “Nickleby” in the letters. It might be easiest to put this into a dictionary at the moment rather than another table and to call that. I would also need to get some sort of introduction (and perhaps in the future create an Open Dickens site for the novels).

I’m sure I can do this in a few hours and to get it working. Must make the time now I’ve had a small break.