Wolfram Language

Richer Knowledgebase Access

Museum of Modern Art Paintings and Artists

The Museum of Modern Art (MoMA) maintains a public dataset at https://github.com/MuseumofModernArt/collection containing detailed information on its holdings. Here, you can make use of a custom entity store derived from this data to study the dimensions of MoMA paintings, as well as to investigate the longevity of their artists.

First, load the prebuilt entity store from a ResourceObject.

In[1]:=
Click for copyable input
momaStore = ResourceData[ ResourceObject[ Association[ "Name" -> "Museum of Modern Art Holdings and Artists", "UUID" -> "38f47cc0-667d-4988-8ebe-6c1bef23fdc6", "ResourceType" -> "DataResource", "Version" -> "1.0.0", "Description" -> "Holdings and artists of The Museum of Modern \ Art", "ContentSize" -> Association["EntityStore" -> 0], "ContentElements" -> {"EntityStore"}]]]
Out[1]=

Register the store for this session.

In[2]:=
Click for copyable input
PrependTo[$EntityStores, momaStore];

Obtain a list of artwork properties from the entity store using the "MoMAHolding" entity type.

In[3]:=
Click for copyable input
EntityProperties["MoMAHolding"]
Out[3]=

List representative property values for a particular piece.

In[4]:=
Click for copyable input
DeleteMissing[ EntityValue[Entity["MoMAHolding", "79802"], "PropertyAssociation" ]] // Take[#, 15] &
Out[4]=

Make a date histogram of the completion dates of all works at MoMA.

In[5]:=
Click for copyable input
DateHistogram[ DeleteMissing[EntityValue["MoMAHolding", "CompletionDate"]]]
Out[5]=

Tally the types of works in the collection.

In[6]:=
Click for copyable input
TextGrid[SortBy[ Tally[EntityValue["MoMAHolding", EntityProperty["MoMAHolding", "Classification"]]], Last] // Reverse, Dividers -> All, Background -> {Automatic, {{LightBlue, None}}}, Alignment -> {{Left, Decimal}, Automatic}]

Use implicitly defined entity classes to retrieve MoMA paintings.

In[7]:=
Click for copyable input
paintings = EntityClass[ "MoMAHolding", {EntityProperty["MoMAHolding", "Classification"] -> "Painting"}];

Plot histograms of painting aspect ratios and areas. At default binning width, the distribution of aspect ratios appears to be trimodal.

In[8]:=
Click for copyable input
Table[Histogram[EntityValue[paintings, prop], PlotLabel -> prop], {prop, {EntityProperty["MoMAHolding", "AspectRatio"], EntityProperty["MoMAHolding", "Area"]}}]
Out[8]=

Now obtain a list of properties associated with artists using the "MoMAArtist" entity type.

In[9]:=
Click for copyable input
EntityProperties["MoMAArtist"]
Out[9]=

View properties for the artist Vincent van Gogh as a "PropertyAssociation".

In[10]:=
Click for copyable input
EntityValue[ Entity["MoMAArtist", "Vincent van Gogh"], "PropertyAssociation"]
Out[10]=

Visualize the distribution of work counts at MoMA for all artists.

In[11]:=
Click for copyable input
Histogram[ Length /@ EntityValue["MoMAArtist", "MoMAPieces"], {"Log", 20}]
Out[11]=

Explore the average lifespan of deceased artists by first selecting artists having both birth and death dates defined, then taking the date difference between the two, and finally, computing the average.

In[12]:=
Click for copyable input
deceasedArtists = Select[EntityList["MoMAArtist"], AllTrue[# /@ {"BirthDate", "DeathDate"}, DateObjectQ] &];
In[13]:=
Click for copyable input
Mean[DateDifference[#["BirthDate"], #["DeathDate"], "Year"] & /@ deceasedArtists] // N
Out[13]=

Create collages of some randomly selected MoMA pieces from each decade of the twentieth century.

show complete Wolfram Language input
In[14]:=
Click for copyable input
decadePieces = KeySelect[ GroupBy[Take[RandomEntity["MoMAHolding", 2000], 500], Floor[#1["CompletionDate"]["Year"], 10] &], Between[{1900, 2000 - 1}]];
In[15]:=
Click for copyable input
makePolygon[ year_ -> artworks_] := {Texture[ ImageCollage[ URLExecute[#["ThumbnailURL"]] & /@ Select[artworks, \[Not] MissingQ[#["ThumbnailURL"]] &, UpTo[8]]]], Lighting -> {{"Directional", White, {{0, year - 2, 0}, {0, year, 0}}}}, Opacity[.75], Polygon[{{-1, year/10, -1}, {1, year/10, -1}, {1, year/10, 1}, {-1, year/10, 1}}, VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]};
In[16]:=
Click for copyable input
Graphics3D[makePolygon /@ Normal[decadePieces], Axes -> True, AxesEdge -> {None, {1, 0}, None}, Ticks -> {None, Table[{190 + i, StringJoin["19", ToString[i], "0's"]}, {i, 0, 9}], None}, ImageSize -> Large]
Out[16]=

Related Examples

es ja ko pt-br ru zh