Tag Archives: GLAMWiki

Posted - 20-04-2018

#LoveMaps / Collections / Digitisation / Research

Old Periodicals, a New Datatype and Spiderfied Query Results in Wikidata

Several years ago the National Library of Wales appointed the Worlds first Wikidata Visiting Scholar. The volunteer, Simon Cobb, has worked with the library ever since to share, enrich and explore the library’s data using Wikidata – a massive open access linked data repository which contains tens of millions of pieces of data on just about every subject imaginable. In this guest blog, Simon presents his recent work, using open library data on periodicals, publishers and printers in conjunction with the latest Wikidata visualization tools. Jason Evans, National Wikimedian.

Recent developments in Wikidata have made it possible to display more items from the National Library of Wales’ collections on a map. A cluster feature in the Wikidata Query Service map view has enhanced geolocation data visualisation and the new geoshape datatype provides access points for content discovery.

Previously, the display of geolocated images was hampered by only one item per coordinate location being shown on the map. Since a SPARQL query can return multiple results with an identical location this was never an ideal situation. The problem is, in fact, inherent to linked data because every item with a specific relationship to a place will appear at exactly the same point on the map. This is due to the coordinates being attached to the place rather than each individual item.

If the item is an image of Aberystwyth Castle, it depicts the castle and, conversely, the castle is depicted by the image. This is a semantic relationship between the subject (image) and object (castle). The location of the castle is recorded as latitude and longitude coordinates, and thus a query to show on a map the location that the image depicts will use these coordinates. Other images that depicts Aberystwyth Castle will also have these exact coordinates.

 

The marker cluster plugin was implemented to address this problem and it is now possible to view two or more items with the same coordinates. Nearby map markers are grouped using an animated clustering functionality to display an increasing number of clusters, with fewer markers in each, as one zooms in closer. The real gamechanger, however, is the spiderfied markers. Rather than having a solitary marker at a shared location, multiple markers now spiral outwards from a central point, with legs being used to retain their attachment to the precise location and thus show all items in situ.

 

Spiderfied markers of periodicals published in Carmarthen. Unexpanded clusters and single markers are also shown. Each marker contains the periodical’s title, place of publication and cover image (if available). This map is available at: http://tinyurl.com/ycnjsylv.

 

Carmarthen is an important town in the early history of printing in Wales. Some twenty-eight titles in the Welsh Journals and Welsh Newspapers Online digital collections were printed in the town, with twenty-six being first issued before 1900. These periodicals have the same place of publication (i.e. Carmarthen), and thus appear on the map at their shared coordinates. The markers are spiderfied, colour coded according to decade of publication and arranged in a chronologically ordered spiral, starting in the centre with the earliest publication.

In late 2017, a new geoshape datatype was implemented in Wikidata. As the name suggests, it is for storing geographic information in a manner that will produce shapes on a map. Geoshape data can be a single marker at a specific point, a line between two or more points, or a shape, known as a polygon, which is the area enclosed by a point-to-point line, traversing at least four points, with the first and last point being identical. A line or shape is created by structuring geocoordinates to represent the relationship between a series of points; somewhat like a dot-to-dot puzzle. Additional data about a place, such as the address, postcode, website or Wikipedia article, can be attached to a geoshape.

 

The National Library of Wales was the UK’s first Wikidata geoshape. The popup information box includes an image, link to the NLW Wikipedia article and SPARQL queries of the Library’s collections. Markers indicate features of interest and provide images from different vantage points.

 

Since a geoshape can contain multiple points, lines and polygons, it is possible to store data about a group of related locations like, for example, buildings with a similar use. This is a great way to visualise the booktrade locations in Wales that have been added to Wikidata.

Multipolygon geoshape data showing book trade locations in Carmarthen, past and present. These locations and those in other parts of Wales are stored as a single geoshape in Wikimedia Commons (see https://commons.wikimedia.org/wiki/Data:Book_trade_in_Wales.map).

Whilst the book trade locations geoshapes are relatively simple and, therefore, not burdensome to create manually, others, like, for instance, those of castles depicted in the Welsh Landscape Collection, are much more complex. The intricate geoshapes that are formed by sections of perimeter wall between towers or bastions and surrounding the bailey and keep of a castle can be slow and fiddly to make but, luckily, we can draw on linked data instead. A link is forged when an OpenStreetMap feature is tagged with a Wikidata ID and this enables a SPARQL query to retrieve OpenStreetMap data about Wikidata items in the results. Such linking can make a large amount of existing geoshape data accessible.

 

Geoshapes of buildings shown in the Welsh Landscape Collection prints shown in the historic counties of Wales. The buildings are OpenStreetMap features, tagged with the qid of a Wikidata item returned by a SPARQL query, imported as geoshape data and combined with historic county geoshapes from Wikimedia Commons.

 

Geoshapes of buildings shown in the Welsh Landscape Collection prints shown in the historic counties of Wales. The buildings are OpenStreetMap features, tagged with the qid of a Wikidata item returned by a SPARQL query, imported as geoshape data and combined with historic county geoshapes from Wikimedia Commons.

The results of a SPARQL query to retrieve images from the Welsh Landscape Collection can be visualised on a map with geoshapes to represent the building depicted. Shown above, the results for Tintern Abbey are spiderfied to expand a cluster of images with an identical geocoordinates from a single point within the geoshape. Previously, it was only possible to display one of these images on the map view results.

 

Simon Cobb, Wikidata Visiting Scholar at the National Library of Wales

Tags: , , , , , , , ,

Categories

Search

Archives

About this blog

A blog about the work and collections of the National Library of Wales.

Due to the more personal nature of blogs it is the Library's policy to publish postings in the original language only. An equal number of blog posts are published in both Welsh and English, but they are not the same postings. For a translation of the blog readers may wish to try facilities such as Google Translate.

About the blog