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

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

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

PrependTo[$EntityStores, momaStore];
"MoMAHolding" 엔티티 타입을 사용해 엔티티 스토어에서 미술품의 특성 목록을 입수합니다.

EntityProperties["MoMAHolding"]

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

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

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

DateHistogram[
DeleteMissing[EntityValue["MoMAHolding", "CompletionDate"]]]

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

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

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

paintings =
EntityClass[
"MoMAHolding", {EntityProperty["MoMAHolding", "Classification"] ->
"Painting"}];
그림의 가로 세로 비율과 면적의 히스토그램을 플롯합니다. 기본 화면비 비닝 폭은 종횡비 분포 최빈치가 셋인 분포로 보입니다.

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

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

EntityProperties["MoMAArtist"]

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

EntityValue[
Entity["MoMAArtist", "Vincent van Gogh"], "PropertyAssociation"]

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

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

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

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

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

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