Wolfram 언어

풍부한 Knowledgebase 액세스

근대 미술관의 작품과 아티스트

근대 미술관 (MoMA)은 자세한 정보를 포함한 공개 데이터 집합을 https://github.com/MuseumofModernArt/collection 보관하고 있습니다. 여기서는 이 데이터에서 파생된 사용자 정의 엔티티 스토어를 사용하여 MoMA가 소장하고 있는 작품 크기의 조사 및 해당 작품 아티스트의 수명에 대해 짚어봅니다.

먼저, 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]=

이 세션을 스토어에 등록합니다.

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

"MoMAHolding" 엔티티 타입을 사용해 엔티티 스토어에서 미술품의 특성 목록을 입수합니다.

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

특정 작품에 대한 대표적인 특성 값을 나열합니다.

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

MoMA에 소장된 전 작품의 완성일 날짜 히스토그램을 작성합니다.

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

컬렉션중인 작품 유형을 집계합니다.

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

간접적으로 정의된 엔티티 클래스를 사용하여 MoMA의 소장 그림을 추출합니다.

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

그림의 가로 세로 비율과 면적의 히스토그램을 플롯합니다. 기본 화면비 비닝 폭은 종횡비 분포 최빈치가 셋인 분포로 보입니다.

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

그런 다음 "MoMAArtist" 엔티티 타입을 사용하여 엔티티 스토어에서 아티스트와 연관된 특성 목록을 입수합니다.

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

"PropertyAssociation"으로 빈센트 반 고흐의 특성을 알아봅니다.

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

모든 아티스트의 MoMA 소장 작품 수의 분포를 시각화합니다.

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

작고한 예술가들의 평균 수명을 알아봅니다. 우선, 생년월일과 사망 연월일 모두가 알려져 있는 예술가를 선택하고, 다음으로 두 날짜의 차이를 가지고 평균을 계산합니다.

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

20세기를 10년 단위로 나누어 무작위로 선택한 MoMA의 소장품 콜라주를 생성합니다.

전체 Wolfram 언어 입력 표시하기
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]=

관련 예제

en es fr ja pt-br ru zh