try:
import IPython
except:
%pip install IPython
import IPython
from IPython.display import display, IFrame, HTML, Javascript
from IPython.core.display import display, HTML
HTML("""<link rel="stylesheet" type="text/css" href="src/css/notebook.css"/>""")
This notebook provides a guided step through the process of transforming Cultural Heritage collections data to Linked Art JSON-LD.
The Ashmolean Museum in Oxford, UK holds many artworks by the artist John Ruskin. At present, to retrieve collection data for the artworks it was necessary to screenscrape the web pages for the artworks. This was achieved with the Python library BeautifulSoup
. From the documentation:
Beautiful Soup is a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide idiomatic ways of navigating, searching, and modifying the parse tree.
The HTML was derived from a collections search via https://collections.ashmolean.org/collection/search with the HTML page saved locally to a data file.
outputdir = "./data/ruskin/output/json/"
try:
import pandas as pd
except:
!pip install pandas
import pandas as pd
import requests
try:
from bs4 import BeautifulSoup
except:
%pip install bs4
from bs4 import BeautifulSoup
import re
#cromulent
from cromulent.model import factory
# custom linked art coding
from lib import linkedart as la
selectOptions = []
selectOptions.append(("Please select an artwork", ""))
baseURI = "https://collections.ashmolean.org/collection/"
ash_file = './data/ashmolean/ash.html'
# open HTML file
html_text = open(ash_file, 'r').read()
# create soup
soup = BeautifulSoup(html_text, 'html.parser')
# iterate through artwork descriptions in HTML
for artwork in soup.find_all('div',attrs={"class":"list-inner"}):
# title
title = artwork.find('h3').string
# id
id = artwork.find('h3').find('a').get('href')
id = id[-6:]
# creator
creator = [{"id": "https://collections.ashmolean.org/collection/search/trigger/person_id/value/7800", "name":"John Ruskin","role":"Artist"}]
# accession number
accession_number = artwork.find('span').string
accession_number = accession_number.replace("Accession no. ", "")
# image url
image_url = artwork.find("img").get("src")
# date created
date_created = artwork.find("p").string
date_created = date_created.replace("Date: ","")
objProp = {
"classification":"",
"homepage":"https://collections.ashmolean.org/collection/browse-9148/object/" + id,
"id":id,
"title":title,
"creator":creator,
"accession_number":accession_number,
"image_url":image_url,
"date_created":date_created,
"current_owner" : {"name":"Ashmolean Museum",
"location":"Oxford, England, UK",
"type": "http://vocab.getty.edu/aat/300312281" ,
"type_label": ""}
}
# look for year in value
years = re.findall('(\d{4})', date_created)
if len(years) == 1:
objProp["date_created_earliest"] = years[0]
objProp["date_created_latest"] = years[0]
elif len(years) == 2:
objProp["date_created_earliest"] = years[0]
objProp["date_created_latest"] = years[1]
else:
# use Ruskins birth/death years
objProp["date_created_earliest"] = 1819
objProp["date_created_latest"] = 1900
object_uri = baseURI + id
# create drop down options for jsonld vis
title = objProp["title"] + " (" + objProp["id"] + ".json)"
selectOptions.append((title, objProp["id"] + ".json"))
objLA = la.createObjDesc(objProp,la.objTypes,object_uri)
# write to file
text_file = open(outputdir + objProp["id"] + ".json", "wt")
n = text_file.write(factory.toString(objLA, compact=False))
text_file.close()
display(objProp["title"])
display(pd.DataFrame(objProp, index=[0]))
'The Tower of Gloucester Cathedral'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159710 | The Tower of Gloucester Cathedral | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.RUD.087 | https://collections.ashmolean.org/media/ashmol... | 1832 | NaN | 1832 | 1832 |
'Near Bassano, Brenner'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | /48683 | Near Bassano, Brenner | {'id': 'https://collections.ashmolean.org/coll... | WA1949.253 | https://collections.ashmolean.org/media/ashmol... | 1835 | NaN | 1835 | 1835 |
'Bergamo and the Alps, from the road to Brescia'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | /48682 | Bergamo and the Alps, from the road to Brescia | {'id': 'https://collections.ashmolean.org/coll... | WA1949.252 | https://collections.ashmolean.org/media/ashmol... | 1835 | NaN | 1835 | 1835 |
'Bellagio, Lago di Como'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | /48685 | Bellagio, Lago di Como | {'id': 'https://collections.ashmolean.org/coll... | WA1949.255 | https://collections.ashmolean.org/media/ashmol... | 1835 | NaN | 1835 | 1835 |
'End of the Lake of Lecco'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | /48684 | End of the Lake of Lecco | {'id': 'https://collections.ashmolean.org/coll... | WA1949.254 | https://collections.ashmolean.org/media/ashmol... | 1835 | NaN | 1835 | 1835 |
'Axmouth Landslip from Dolands Farm'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 125702 | Axmouth Landslip from Dolands Farm | {'id': 'https://collections.ashmolean.org/coll... | WA2000.86 | https://collections.ashmolean.org/media/ashmol... | c. 1839 | NaN | 1839 | 1839 |
'Study for Detail of the Piazza delle Erbe, Verona'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159601 | Study for Detail of the Piazza delle Erbe, Verona | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.REF.062 | https://collections.ashmolean.org/media/ashmol... | 19 May 1841 | NaN | 1841 | 1841 |
'The Palazzo Contarini-Fasan, Venice'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159604 | The Palazzo Contarini-Fasan, Venice | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.REF.065 | https://collections.ashmolean.org/media/ashmol... | 6 - 16 May 1841 | NaN | 1841 | 1841 |
'Outline of Leaves of Oak, touched with Colour'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159452 | Outline of Leaves of Oak, touched with Colour | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.253.a | https://collections.ashmolean.org/media/ashmol... | 1842 - 1844 | NaN | 1842 | 1844 |
'Quick Study of Leaf Contour: Bramble'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159803 | Quick Study of Leaf Contour: Bramble | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.RUD.280 | https://collections.ashmolean.org/media/ashmol... | probably 1843 | NaN | 1843 | 1843 |
'Leaf Contour: Laburnum'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159804 | Leaf Contour: Laburnum | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.RUD.281 | https://collections.ashmolean.org/media/ashmol... | probably 1843 | NaN | 1843 | 1843 |
'Stone Pines at Sestri, Gulf of Genoa'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159365 | Stone Pines at Sestri, Gulf of Genoa | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.022 | https://collections.ashmolean.org/media/ashmol... | 30 April 1845 | NaN | 1845 | 1845 |
'Part of the Façade of the destroyed Church of San Michele in Foro, Lucca, as it appeared in 1845'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159407 | Part of the Façade of the destroyed Church of ... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.083 | https://collections.ashmolean.org/media/ashmol... | May 1845 | NaN | 1845 | 1845 |
'Rough Sketch of Tree Growth: Macugnaga'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159476 | Rough Sketch of Tree Growth: Macugnaga | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.RUD.296.a | https://collections.ashmolean.org/media/ashmol... | 4 August 1845 | NaN | 1845 | 1845 |
"Drawing of the Background of Raphael's 'Virgin and Child with the Infant Saint John' (The 'Madonna del Cardellino')"
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159572 | Drawing of the Background of Raphael's 'Virgin... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.269 | https://collections.ashmolean.org/media/ashmol... | probably June 1845 | NaN | 1845 | 1845 |
'Study of the Marble Inlaying on the Front of the Casa Loredan, Venice'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159660 | Study of the Marble Inlaying on the Front of t... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.RUD.022 | https://collections.ashmolean.org/media/ashmol... | September - October 1845 | NaN | 1845 | 1845 |
'The Gryphon bearing the south Shaft of the west Entrance of the Duomo, Verona'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159405 | The Gryphon bearing the south Shaft of the wes... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.081 | https://collections.ashmolean.org/media/ashmol... | 11 May 1846 | NaN | 1846 | 1846 |
'Part of the Façade of the destroyed Church of San Michele in Foro, Lucca, sketched in colour'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159408 | Part of the Façade of the destroyed Church of ... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.084 | https://collections.ashmolean.org/media/ashmol... | 30 June - 1 July 1846 | NaN | 1846 | 1846 |
'Lateral View of the Façade San Michele in Foro, Lucca'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159409 | Lateral View of the Façade San Michele in Foro... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.085 | https://collections.ashmolean.org/media/ashmol... | 30 June - 1 July 1846 | NaN | 1846 | 1846 |
'The Sculpture of a Dragon filling a Quatrefoil on the North Entrance of Rouen Cathedral'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159671 | The Sculpture of a Dragon filling a Quatrefoil... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.RUD.042.a | https://collections.ashmolean.org/media/ashmol... | October 1848 | NaN | 1848 | 1848 |
'Euphemia (Effie) Ruskin'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 101252 | Euphemia (Effie) Ruskin | {'id': 'https://collections.ashmolean.org/coll... | WA1961.37 | https://collections.ashmolean.org/media/ashmol... | 1846 - 1851 | NaN | 1846 | 1851 |
"Ivy-Leaved Toadflax ('Oxford Ivy')"
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159362 | Ivy-Leaved Toadflax ('Oxford Ivy') | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.019 | https://collections.ashmolean.org/media/ashmol... | 1852 | NaN | 1852 | 1852 |
'Part of the Palazzo Priuli, Venice'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159536 | Part of the Palazzo Priuli, Venice | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.210 | https://collections.ashmolean.org/media/ashmol... | probably 1852 | NaN | 1852 | 1852 |
'Study for Detail of the Sarcophagus and Canopy of the Tomb of Mastino II della Scala at Verona'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159598 | Study for Detail of the Sarcophagus and Canopy... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.REF.059 | https://collections.ashmolean.org/media/ashmol... | 1852 | NaN | 1852 | 1852 |
'The Exterior of the Ducal Palace, Venice'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159606 | The Exterior of the Ducal Palace, Venice | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.REF.067 | https://collections.ashmolean.org/media/ashmol... | 1852 | NaN | 1852 | 1852 |
'Study of the North Gable of the Tomb of Mastino II della Scala, Verona'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159712 | Study of the North Gable of the Tomb of Mastin... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.RUD.095 | https://collections.ashmolean.org/media/ashmol... | probably June 1852 | NaN | 1852 | 1852 |
'Study of one of the Pinnacles of the Tomb of Mastino II della Scala, Verona'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159714 | Study of one of the Pinnacles of the Tomb of M... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.RUD.097.a | https://collections.ashmolean.org/media/ashmol... | probably January 1852 | NaN | 1852 | 1852 |
'John Ruskin'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | /59248 | John Ruskin | {'id': 'https://collections.ashmolean.org/coll... | WA2013.67 | https://collections.ashmolean.org/media/ashmol... | 1853 - 1854 | NaN | 1853 | 1854 |
"Etching of Turner's Drawing of 'Rietz, near Saumur'"
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159417 | Etching of Turner's Drawing of 'Rietz, near Sa... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.101 | https://collections.ashmolean.org/media/ashmol... | before 1860 | NaN | 1860 | 1860 |
'Pine Forest on Mont Cenis'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159576 | Pine Forest on Mont Cenis | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.275 | https://collections.ashmolean.org/media/ashmol... | 1854 - 1856 | NaN | 1854 | 1856 |
'Design for a Window in the University Museum, Oxford'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 176324 | Design for a Window in the University Museum, ... | {'id': 'https://collections.ashmolean.org/coll... | WA1931.47 | https://collections.ashmolean.org/media/ashmol... | c. 1855 | NaN | 1855 | 1855 |
'Design for a window in the University Museum, Oxford'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 176325 | Design for a window in the University Museum, ... | {'id': 'https://collections.ashmolean.org/coll... | WA1931.49 | https://collections.ashmolean.org/media/ashmol... | c. 1855 | NaN | 1855 | 1855 |
'Design for a window in the University Museum, Oxford'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 176326 | Design for a window in the University Museum, ... | {'id': 'https://collections.ashmolean.org/coll... | WA1931.51 | https://collections.ashmolean.org/media/ashmol... | c. 1855 | NaN | 1855 | 1855 |
'Design for a window in the University Museum, Oxford'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 176327 | Design for a window in the University Museum, ... | {'id': 'https://collections.ashmolean.org/coll... | WA1931.52 | https://collections.ashmolean.org/media/ashmol... | c. 1855 | NaN | 1855 | 1855 |
'Design for a window in the University Museum, Oxford'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 176328 | Design for a window in the University Museum, ... | {'id': 'https://collections.ashmolean.org/coll... | WA1931.53 | https://collections.ashmolean.org/media/ashmol... | c. 1855 | NaN | 1855 | 1855 |
'Design for a window in the University Museum, Oxford'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 176329 | Design for a window in the University Museum, ... | {'id': 'https://collections.ashmolean.org/coll... | WA1931.54 | https://collections.ashmolean.org/media/ashmol... | c. 1855 | NaN | 1855 | 1855 |
'Design for a window in the University Museum, Oxford'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 176330 | Design for a window in the University Museum, ... | {'id': 'https://collections.ashmolean.org/coll... | WA1931.55 | https://collections.ashmolean.org/media/ashmol... | c. 1855 | NaN | 1855 | 1855 |
'Design for a window in the University Museum, Oxford'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 176331 | Design for a window in the University Museum, ... | {'id': 'https://collections.ashmolean.org/coll... | WA1931.56 | https://collections.ashmolean.org/media/ashmol... | c. 1855 | NaN | 1855 | 1855 |
'Design for a window in the University Museum, Oxford'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 176332 | Design for a window in the University Museum, ... | {'id': 'https://collections.ashmolean.org/coll... | WA1931.50 | https://collections.ashmolean.org/media/ashmol... | c. 1855 | NaN | 1855 | 1855 |
"Study in Neutral Tint of Turner's 'The Pass of Faido'"
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159582 | Study in Neutral Tint of Turner's 'The Pass of... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.287 | https://collections.ashmolean.org/media/ashmol... | 1846 - 1865 | NaN | 1846 | 1865 |
'Study of a few Blades of Grass as they Grew'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159350 | Study of a few Blades of Grass as they Grew | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.006 | https://collections.ashmolean.org/media/ashmol... | probably spring 1856 | NaN | 1856 | 1856 |
'Fribourg, Switzerland: Pen sketch'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159427 | Fribourg, Switzerland: Pen sketch | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.114.a | https://collections.ashmolean.org/media/ashmol... | July or August - September 1856 | NaN | 1856 | 1856 |
'Study of Young Leaves of Plane, in Light and Shade'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159453 | Study of Young Leaves of Plane, in Light and S... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.254 | https://collections.ashmolean.org/media/ashmol... | probably 1857 | NaN | 1857 | 1857 |
'Finished Study of Agrimony Leaves'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159454 | Finished Study of Agrimony Leaves | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.255.a | https://collections.ashmolean.org/media/ashmol... | probably 1857 | NaN | 1857 | 1857 |
"Tracing of Turner's 'Hospice of the Great Saint Bernard'"
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159730 | Tracing of Turner's 'Hospice of the Great Sain... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.RUD.150 | https://collections.ashmolean.org/media/ashmol... | probably 1857 | NaN | 1857 | 1857 |
'The Courtyard of a Late Gothic Wooden House at Abbeville'
classification | homepage | id | title | creator | accession_number | image_url | date_created | current_owner | date_created_earliest | date_created_latest | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | https://collections.ashmolean.org/collection/b... | 159340 | The Courtyard of a Late Gothic Wooden House at... | {'id': 'https://collections.ashmolean.org/coll... | WA.RS.ED.062 | https://collections.ashmolean.org/media/ashmol... | 1858 | NaN | 1858 | 1858 |
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-5-9a551ebd26b0> in <module> 94 95 # create drop down options for jsonld vis ---> 96 title = objProp["title"] + " (" + objProp["id"] + ".json)" 97 selectOptions.append((title, objProp["id"] + ".json")) 98 TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
The Linked Art JSON-LD representation can be viewed in a data visualisation below. Select an artwork from the dropdown menu.
try:
import ipywidgets
except:
%pip install ipywidgets
import ipywidgets
from ipywidgets import Layout, FileUpload
from IPython.display import display, IFrame, HTML, Image, Javascript
try:
import json
except:
!pip install json
import json
def dropdown_eventhandler_tate(change):
with open('./src/js/visld.js', 'r') as _jscript:
outputdir = "./data/ruskin/output/json/"
code = _jscript.read() + "var file = '" + outputdir + change.new + "';var selector = '#visash';visjsonld(file, selector); "
display(Javascript(code))
with open( outputdir + change.new) as json_file:
artwork = json.load(json_file)
if ("representation" in artwork):
image = artwork["representation"][0]["id"]
display(Javascript("document.getElementById('artworkash').src = '" + image + "';"))
else:
display(Javascript("document.getElementById('artworkash').src = '';"))
selectObject = ipywidgets.Dropdown(options=selectOptions)
selectObject.observe(dropdown_eventhandler_tate, names='value')
display(selectObject)
Dropdown(options=(('Please select an artwork', ''), ('The Tower of Gloucester Cathedral (159710.json)', '15971…