{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 3. Curious Machines\n",
"\n",
"```{sidebar} Datasets\n",
" * [V&A](https://collections.vam.ac.uk/)\n",
"``` \n",
"\n",
"The [Living with Machines](https://livingwithmachines.ac.uk/) project at the [Turing Institute](https://www.turing.ac.uk/) and the [British Library](https://bl.uk/) is looking how our relationship with machines evolved in the period from 1780 to 1914, looking at newspaper reports and other documentary sources held in the British Library collections.\n",
"\n",
"As a companion piece to this serious project, let's also explore how machines are documented historically in the V&A collections. \n",
"\n",
"To do this, we need run a query for any objects containing the word \"machine\" from within the period. We're going to focus on 1780 to 1820, as there are many machine made objects from later in the century that obscure some of these earlier results (and as this is just an example demonstrating our [API](https://developers.vam.ac.uk/), the fact we cherry picking the data to ensure it's interesting for you the reader should not trouble us too much)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## V&A Collections"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To find the relevant records, we will need to pass the following parameters to the [API](https://developers.vam.ac.uk):\n",
"\n",
" * q=machine - We want to query for the word \"machine\" appearing anywhere in the record\n",
" * year_made_from=1780 - Showing objects made tom 1780\n",
" * year_made_to=1820 - To objects made upto 1820\n",
" \n",
"We also specify we want the results in CSV format for ease of use with [pandas](pandas.pydata.org/), and we want 80 results to give a good sample size."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" accessionNumber | \n",
" accessionYear | \n",
" systemNumber | \n",
" objectType | \n",
" _primaryTitle | \n",
" _primaryPlace | \n",
" _primaryMaker__name | \n",
" _primaryMaker__association | \n",
" _primaryDate | \n",
" _primaryImageId | \n",
" _sampleMaterial | \n",
" _sampleTechnique | \n",
" _sampleStyle | \n",
" _currentLocation__displayName | \n",
" _objectContentWarning | \n",
" _imageContentWarning | \n",
"
\n",
" \n",
" \n",
" \n",
" 30 | \n",
" T.289&A-1986 | \n",
" 1986 | \n",
" O353068 | \n",
" Pair of stockings | \n",
" NaN | \n",
" England | \n",
" Unknown | \n",
" NaN | \n",
" 19th century | \n",
" 2019LM2909 | \n",
" cotton (textile) | \n",
" machine knitted | \n",
" NaN | \n",
" In store | \n",
" False | \n",
" False | \n",
"
\n",
" \n",
" 49 | \n",
" T.279-1973 | \n",
" 1973 | \n",
" O142422 | \n",
" Evening dress | \n",
" NaN | \n",
" Great Britain | \n",
" Unknown | \n",
" NaN | \n",
" c.1820 | \n",
" 2015HN3034 | \n",
" silk satin | \n",
" hand sewing | \n",
" NaN | \n",
" In store | \n",
" False | \n",
" False | \n",
"
\n",
" \n",
" 41 | \n",
" T.278&A-1968 | \n",
" 1968 | \n",
" O354074 | \n",
" Pair of sleeves | \n",
" NaN | \n",
" England | \n",
" Unknown | \n",
" NaN | \n",
" 1815-1825 | \n",
" 2018LE8995 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" In store | \n",
" False | \n",
" False | \n",
"
\n",
" \n",
" 75 | \n",
" W.61-1989 | \n",
" 1989 | \n",
" O12610 | \n",
" Mould | \n",
" NaN | \n",
" London | \n",
" Unknown | \n",
" NaN | \n",
" 19th century | \n",
" 2017JY9997 | \n",
" Wood | \n",
" Hand carved | \n",
" NaN | \n",
" In store | \n",
" False | \n",
" False | \n",
"
\n",
" \n",
" 79 | \n",
" W.73A-1989 | \n",
" 1989 | \n",
" O18827 | \n",
" Mould | \n",
" NaN | \n",
" London | \n",
" Unknown | \n",
" NaN | \n",
" 19th century | \n",
" 2017JY9946 | \n",
" Wood | \n",
" Hand carved | \n",
" NaN | \n",
" In store | \n",
" False | \n",
" False | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" accessionNumber accessionYear systemNumber objectType \\\n",
"30 T.289&A-1986 1986 O353068 Pair of stockings \n",
"49 T.279-1973 1973 O142422 Evening dress \n",
"41 T.278&A-1968 1968 O354074 Pair of sleeves \n",
"75 W.61-1989 1989 O12610 Mould \n",
"79 W.73A-1989 1989 O18827 Mould \n",
"\n",
" _primaryTitle _primaryPlace _primaryMaker__name \\\n",
"30 NaN England Unknown \n",
"49 NaN Great Britain Unknown \n",
"41 NaN England Unknown \n",
"75 NaN London Unknown \n",
"79 NaN London Unknown \n",
"\n",
" _primaryMaker__association _primaryDate _primaryImageId _sampleMaterial \\\n",
"30 NaN 19th century 2019LM2909 cotton (textile) \n",
"49 NaN c.1820 2015HN3034 silk satin \n",
"41 NaN 1815-1825 2018LE8995 NaN \n",
"75 NaN 19th century 2017JY9997 Wood \n",
"79 NaN 19th century 2017JY9946 Wood \n",
"\n",
" _sampleTechnique _sampleStyle _currentLocation__displayName \\\n",
"30 machine knitted NaN In store \n",
"49 hand sewing NaN In store \n",
"41 NaN NaN In store \n",
"75 Hand carved NaN In store \n",
"79 Hand carved NaN In store \n",
"\n",
" _objectContentWarning _imageContentWarning \n",
"30 False False \n",
"49 False False \n",
"41 False False \n",
"75 False False \n",
"79 False False "
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import requests\n",
"import pandas as pd\n",
"lwm_df = pd.read_csv(\"https://api.vam.ac.uk/v2/objects/search?q=machine&page=1&year_made_from=1780&year_made_to=1820&response_format=csv&page_size=80\")\n",
"lwm_df.sample(5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Graphing Machines\n",
"\n",
"Let's look at that in a graph now to more easily see what types of object mentioning 'machine' were most popular from that time period."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
""
],
"text/plain": [
"alt.LayerChart(...)"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import requests\n",
"import altair as alt\n",
"import pandas as pd\n",
"\n",
"req = requests.get('https://api.vam.ac.uk/v2/objects/clusters/object_type/search?q=machine&year_made_from=1780&year_made_to=1820&cluster_size=100')\n",
"lwm_df = pd.DataFrame(req.json())\n",
"\n",
"bars = alt.Chart(lwm_df).mark_bar().encode(\n",
" x='count:Q',\n",
" y=\"value:O\"\n",
")\n",
"\n",
"text = bars.mark_text(\n",
" align='left', baseline='middle', dx=3\n",
").encode(\n",
" text='count:Q'\n",
")\n",
"\n",
"(bars + text).properties(height=1000, title=\"Objects mentioning machine from 1780 to 1820\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"So it seems likely that many of these objects were created using some form of machine ('mould' and 'dress fabric' for example), but there are some un-expected objects here that might perhaps be considered machines themselves, including an 'Exhibition Box' and a 'Deceptive Glass'.\n",
"\n",
"Let's look in more detail at the [Deceptive Glass](https://collections.vam.ac.uk/item/O3417/), retrieving the image."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Deceptive Glass"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" accessionNumber | \n",
" systemNumber | \n",
" objectType | \n",
" _primaryTitle | \n",
" _primaryPlace | \n",
" _primaryMaker__name | \n",
" _primaryMaker__association | \n",
" _primaryDate | \n",
" _primaryImageId | \n",
" _sampleMaterial | \n",
" _sampleTechnique | \n",
" _sampleStyle | \n",
" _currentLocation__displayName | \n",
" _objectContentWarning | \n",
" _imageContentWarning | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" C.210-1913 | \n",
" O3417 | \n",
" Deceptive glass | \n",
" NaN | \n",
" England | \n",
" Unknown | \n",
" NaN | \n",
" ca. 1820-1880 | \n",
" 2006AM3610 | \n",
" NaN | \n",
" NaN | \n",
" BRITAIN | \n",
" British Galleries, Room 122b | \n",
" False | \n",
" False | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" accessionNumber systemNumber objectType _primaryTitle _primaryPlace \\\n",
"0 C.210-1913 O3417 Deceptive glass NaN England \n",
"\n",
" _primaryMaker__name _primaryMaker__association _primaryDate \\\n",
"0 Unknown NaN ca. 1820-1880 \n",
"\n",
" _primaryImageId _sampleMaterial _sampleTechnique _sampleStyle \\\n",
"0 2006AM3610 NaN NaN BRITAIN \n",
"\n",
" _currentLocation__displayName _objectContentWarning _imageContentWarning \n",
"0 British Galleries, Room 122b False False "
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"req = pd.read_csv('https://api.vam.ac.uk/v2/objects/search?q=machine&year_made_from=1780&year_made_to=1820&kw_object_type=deceptive%20glass&response_format=csv&page_size=50')\n",
"req"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"tags": [
"hide-cell"
]
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "84a83c31874e4eb5813799d310439757",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"OSDViewer(layout=Layout(height='675px', width='75%'), url='https://framemark.vam.ac.uk/collections/2006AM3610/…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"## ipyosd not working yet\n",
"\n",
"from ipyosd import OSDViewer\n",
"from ipywidgets import Layout\n",
"OSDViewer(url=\"https://framemark.vam.ac.uk/collections/2006AM3610/info.json\", layout=Layout(width='75%', height='675px'))"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from IPython.display import Image\n",
"\n",
"Image(url = \"https://framemark.vam.ac.uk/collections/2006AM3610/full/600,/0/default.jpg\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Hmmm, it's not entirely clear what's machine like (or even deceptive) about this. Let's look at the object description:"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"\"Object Type
A modest, entirely plain glass used for ices, perhaps made by the newly invented ice cream-making 'machine'. Although in outline the same shape as a drinking glass, the bowl is all but solid, allowing only a minimal lick. Made in the mid-19th century, at a time when cheap, press-moulded glass was beginning to become the most available type, a hand-made but undecorated artefact such as this was still extremely marketable.
Ownership & Use
Used in cafes, seaside booths and places of entertainment, a smear of ice was spread on the surface and licked off by the customer. The glass was then returned to the seller for immediate use by the next customer.
Materials & Making
This 'lick' is made in strong, brilliantly clear lead glass. Hand-blown and tooled, the 'bowl' is virtually solid. Each section of the foot, stem and bowl is made from extra glass added at various stages, and probably at least two people were involved in the making of this glass.\""
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"req = requests.get('https://api.vam.ac.uk/v2/museumobject/O3417')\n",
"object_record = req.json()\n",
"object_record[\"record\"][\"summaryDescription\"]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"So, the glass was not made by a machine, but was perhaps designed for use with new ice cream-making \"machines\" from the mid-19th century. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```{note}\n",
"From lessons learn from recent world events, we do not advise sharing an ice cream licking glass without proper cleaning in-between.\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exhibition Box"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's go back to look at another of the possible machines from our search query, the \"Exhibition Box\""
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" accessionNumber | \n",
" systemNumber | \n",
" objectType | \n",
" _primaryTitle | \n",
" _primaryPlace | \n",
" _primaryMaker__name | \n",
" _primaryMaker__association | \n",
" _primaryDate | \n",
" _primaryImageId | \n",
" _sampleMaterial | \n",
" _sampleTechnique | \n",
" _sampleStyle | \n",
" _currentLocation__displayName | \n",
" _objectContentWarning | \n",
" _imageContentWarning | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P.44:1 to 4-1955 | \n",
" O118142 | \n",
" Exhibition box | \n",
" Showbox | \n",
" Great Britain | \n",
" Gainsborough, Thomas | \n",
" designer | \n",
" ca. 1781-1782 | \n",
" 2006AE7709 | \n",
" Oak | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" False | \n",
" False | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" accessionNumber systemNumber objectType _primaryTitle _primaryPlace \\\n",
"0 P.44:1 to 4-1955 O118142 Exhibition box Showbox Great Britain \n",
"\n",
" _primaryMaker__name _primaryMaker__association _primaryDate \\\n",
"0 Gainsborough, Thomas designer ca. 1781-1782 \n",
"\n",
" _primaryImageId _sampleMaterial _sampleTechnique _sampleStyle \\\n",
"0 2006AE7709 Oak NaN NaN \n",
"\n",
" _currentLocation__displayName _objectContentWarning _imageContentWarning \n",
"0 NaN False False "
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"req = pd.read_csv('https://api.vam.ac.uk/v2/objects/search?q=machine&year_made_from=1780&year_made_to=1820&kw_object_type=Exhibition%20box&response_format=csv&page_size=50')\n",
"req"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"tags": [
"hide-cell"
]
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "1455c37ddf114173a74a8654d3f239be",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"OSDViewer(layout=Layout(height='675px', width='75%'), url='https://framemark.vam.ac.uk/collections/2006AE7709/…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"## ipyosd not working yet\n",
"\n",
"from ipyosd import OSDViewer\n",
"from ipywidgets import Layout\n",
"OSDViewer(url=\"https://framemark.vam.ac.uk/collections/2006AE7709/info.json\", layout=Layout(width='75%', height='675px'))"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from IPython.display import Image\n",
"\n",
"Image(url = \"https://framemark.vam.ac.uk/collections/2006AE7709/full/600,/0/default.jpg\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Well, this is looking a bit more machine like. The Exhibition Box has a fascinating history, you can read up more on the [object page](https://collections.vam.ac.uk/item/O118142) It would be interesting to see if this \"machine\" (and others of a similiar kind) was discussed in newspapers from the era."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Further Work\n",
"\n",
" * Combine more mentions of machines in newspapers with examples of the objects from the V&A collections \n",
" * Hopefully the Living with Machines team will be carrying out the very important task of mapping the spread of ice-cream machines throughout the United Kingdom, as reported in regional newspapers."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 4
}