近代美術館の絵画とその製作者
ニューヨーク近代美術館(MoMA)には,所蔵品についての詳細情報が記載された公開データ集合がある(https://github.com/MuseumofModernArt/collection).ここでは,このデータから導いたカスタムの実体ストアを使ってMoMAが所蔵する絵画の大きさを調べ,その製作者たちの寿命を探ってみる.
まず,ResourceObjectからビルド済みの実体ストアをロードする.
In[1]:=

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]=

このセッション用にストアを登録する.
In[2]:=

PrependTo[$EntityStores, momaStore];
"MoMAHolding"実体タイプを使って実体ストアから美術品の特性リストを入手する.
In[3]:=

EntityProperties["MoMAHolding"]
Out[3]=

特定の作品について代表的な特性値をリストする.
In[4]:=

DeleteMissing[
EntityValue[Entity["MoMAHolding", "79802"],
"PropertyAssociation" ]] // Take[#, 15] &
Out[4]=

MoMAにある全作品の完成日の日付のヒストグラムを作る.
In[5]:=

DateHistogram[
DeleteMissing[EntityValue["MoMAHolding", "CompletionDate"]]]
Out[5]=

コレクション中の作品タイプを集計する.
In[6]:=

TextGrid[SortBy[
Tally[EntityValue["MoMAHolding",
EntityProperty["MoMAHolding", "Classification"]]], Last] //
Reverse, Dividers -> All,
Background -> {Automatic, {{LightBlue, None}}},
Alignment -> {{Left, Decimal}, Automatic}]

隠的に定義された実体クラスを使ってMoMAの所蔵絵画を取り出す.
In[7]:=

paintings =
EntityClass[
"MoMAHolding", {EntityProperty["MoMAHolding", "Classification"] ->
"Painting"}];
絵画の縦横比と面積をプロットする.デフォルトの縦横比のビニング幅では,縦横比の分布は三峰性に見える.
In[8]:=

Table[Histogram[EntityValue[paintings, prop],
PlotLabel ->
prop], {prop, {EntityProperty["MoMAHolding", "AspectRatio"],
EntityProperty["MoMAHolding", "Area"]}}]
Out[8]=

次に,"MoMAArtist"実体タイプを使って実体ストアから芸術家と関連付けられた特性リストを入手する.
In[9]:=

EntityProperties["MoMAArtist"]
Out[9]=

"PropertyAssociation"としての画家のヴィンセント・ヴァン・ゴッホ(Vincent van Gogh)の特性を見る.
In[10]:=

EntityValue[
Entity["MoMAArtist", "Vincent van Gogh"], "PropertyAssociation"]
Out[10]=

全芸術家についてMoMAの所存作品数を可視化する:
In[11]:=

Histogram[
Length /@ EntityValue["MoMAArtist", "MoMAPieces"], {"Log", 20}]
Out[11]=

故人となった芸術家たちの平均寿命を調べてみる.まず,生年月日と死亡年月日の両方が分かっている芸術家を選択する.次に両日付の差を取り,最後に平均を計算する.
In[12]:=

deceasedArtists =
Select[EntityList["MoMAArtist"],
AllTrue[# /@ {"BirthDate", "DeathDate"}, DateObjectQ] &];
In[13]:=

Mean[DateDifference[#["BirthDate"], #["DeathDate"], "Year"] & /@
deceasedArtists] // N
Out[13]=

20世紀を10年ごとに分け,それぞれの年代からランダムに選択したMoMAの所蔵作品のコラージュを作る.
完全なWolfram言語入力を表示する
Out[16]=
