Skip to contents

Introduction to senimuse

The senimuse package provides straightforward tools to access and search through museum collection data via their public APIs. It currently supports the Art Institute of Chicago (ARTIC) and Metropolitan Museum of Art (MET), allowing R users to incorporate cultural datasets into their research, education, or data visualization projects.

Basic Usage

The package offers two main functions:

get_artworks() - Retrieve specific artwork(s) using object IDs search_artworks() - Search museum collections by keyword Let’s explore how to use these functions with examples:

Retrieving Specific Artworks

When you know the ID of the artwork you want to access, use get_artworks():

library(senimuse)

# Get data for a single artwork from Art Institute of Chicago (default museum)
artic_artwork <- get_artworks(4)
print(artic_artwork)
#>   id          title date_display                                 artist_display
#> 1  4 Priest and Boy         n.d. Lawrence Carmichael Earle\nAmerican, 1845-1921
#>                             dimensions
#> 1 47.2 × 34.5 cm (18 5/8 × 13 5/8 in.)
#>                                 medium_display
#> 1 Watercolor over graphite on cream wove paper

# Get a specific artwork from the Metropolitan Museum of Art
met_artwork <- get_artworks(436535, museum = "met")
print(met_artwork)
#> # A tibble: 1 × 6
#>   id     title             artist_display date_display medium_display dimensions
#>   <chr>  <chr>             <chr>          <chr>        <chr>          <chr>     
#> 1 436535 Wheat Field with… Vincent van G… 1889         Oil on canvas  28 7/8 × …

Searching for Artworks

To discover artworks based on keywords, use search_artworks():

# Search for artworks related to "sunflowers" in ARTIC
sunflower_artworks <- search_artworks("sunflowers")
#> [1] "sunflowers"
print(sunflower_artworks)
#>        id                                   title    date_display
#> 1  197508                               Sunflower            1981
#> 2   20029    Sunflowers, Marché St Germain, Paris         1888/93
#> 3   35720                              Sunflowers August 20, 1895
#> 4   39129                       Border (Fragment)       1750/1800
#> 5   97390                              Sunflowers         c. 1940
#> 6  112885 Decorative Study: Woman with Sunflowers         1892/98
#> 7  151513          Young Woman Seated in a Garden         c. 1896
#> 8  150852           Sunflower (Furnishing Fabric)            1962
#> 9  186048                                  Clytie            1868
#> 10  18421           State Birds and Flowers Quilt         c. 1950
#>                                                                                       artist_display
#> 1                                                                 Katsuda Yukio\nJapanese, born 1941
#> 2                                                        James McNeill Whistler\nAmerican, 1834-1903
#> 3                                                                 Georges Lemmen\nBelgian, 1865-1916
#> 4                                                                Belgium, Flanders, probably Antwerp
#> 5                                              Edward Steichen\nAmerican, born Luxembourg, 1879–1973
#> 6                                         Attributed to Aubrey Vincent Beardsley\nEnglish, 1872-1898
#> 7                                                         Pierre-Georges Jeanniot\nFrench, 1848-1934
#> 8  Designed by Howard Carter (English, active c. 1962)\nProduced by Heal's Fabrics \nEngland, London
#> 9                                                        George Frederick Watts (English, 1817–1904)
#> 10                Jeannette Dean Throckmorton (American, 1883–1963)\nUnited States, Iowa, Des Moines
#>                                                                                                                dimensions
#> 1                                                                                                                    <NA>
#> 2              Image, trimmed within platemark: 22 × 27.8 cm (8 11/16 × 11 in.); Sheet: 22.3 × 27.8 cm (8 13/16 × 11 in.)
#> 3                                                                                     61.5 × 47 cm (24 1/4 × 18 9/16 in.)
#> 4  11.6 × 35.8 cm (4 5/8 × 14 1/8 in.); Repeat Upper border: W.: 8.6 cm (3 3/8 in.); Main border: H.: 14.7 cm (5 3/4 in.)
#> 5                                                                                   38.5 × 40.8 cm (15 3/16 × 16 1/8 in.)
#> 6                                                                                      12.8 × 8.5 cm (5 1/16 × 3 3/8 in.)
#> 7                                                                                   43.8 × 26.4 cm (17 1/4 × 10 7/16 in.)
#> 8                                          251.1 × 120.6 cm (98 7/8 × 47 1/2 in.); Warp repeat: H.: 126.1 cm (49 5/8 in.)
#> 9                                                                                                      H.: 89 cm (35 in.)
#> 10                                                                                     224.6 × 172.7 cm (88 3/8 × 68 in.)
#>                                                                                                                              medium_display
#> 1                                                                                                                     Color woodblock print
#> 2                                                                             Etching with foul biting in black ink on ivory Japanese paper
#> 3                                                                                                    Watercolor, with pen and ink, on paper
#> 4                                                   Cotton, bobbin straight lace of a type known as "Mechlin" with a kat stitch mesh ground
#> 5                                                                                                                      Dye imbibition print
#> 6                                                Pen and black ink, with brush and black wash, over traces of graphite, on ivory wove paper
#> 7                                                                                            Woodcut in black and brown on white wove paper
#> 8                                                                                                       Cotton, plain weave; screen printed
#> 9                                                                                                                                   Plaster
#> 10 Appliquéd and embroidered quilt; dyed and undyed cotton plain weave fabrics; cotton embroidery threads; graphite pencil pattern outlines

# Search for works by Monet in the Met collection
monet_artworks <- search_artworks("monet", museum = "met")
#> [1] "monet"
print(monet_artworks)
#> # A tibble: 10 × 6
#>    id     title            artist_display date_display medium_display dimensions
#>    <chr>  <chr>            <chr>          <chr>        <chr>          <chr>     
#>  1 438003 Camille Monet (… Claude Monet   1873         Oil on canvas  23 7/8 x …
#>  2 437133 Garden at Saint… Claude Monet   1867         Oil on canvas  38 5/8 x …
#>  3 437127 Bridge over a P… Claude Monet   1899         Oil on canvas  36 1/2 x …
#>  4 437125 Morning on the … Claude Monet   1897         Oil on canvas  32 1/8 x …
#>  5 459107 Houses on the A… Claude Monet   1871         Oil on canvas  17 3/8 × …
#>  6 437124 Rouen Cathedral… Claude Monet   1894         Oil on canvas  39 1/4 x …
#>  7 437106 Spring (Fruit T… Claude Monet   1873         Oil on canvas  24 1/2 x …
#>  8 437122 Haystacks (Effe… Claude Monet   1891         Oil on canvas  25 3/4 x …
#>  9 437121 The Four Trees   Claude Monet   1891         Oil on canvas  32 1/4 x …
#> 10 438823 The Manneporte … Claude Monet   1883         Oil on canvas  25 3/4 x …

Refining Results

Both functions allow you to specify which fields to return:

# Get specific fields for multiple artworks
selected_fields <- get_artworks(
  c(27992, 28560), 
  museum = "artic",
  fields = c("title", "artist_display", "date_display")
)
print(selected_fields)
#>                                title                  date_display
#> 1 A Sunday on La Grande Jatte — 1884 1884–86, border added 1888–89
#> 2                        The Bedroom                          1889
#>                        artist_display
#> 1  Georges Seurat (French, 1859–1891)
#> 2 Vincent van Gogh (Dutch, 1853–1890)

# Increase the number of search results
landscape_artworks <- search_artworks(
  "landscape", 
  museum = "met", 
  size = 25
)
#> [1] "landscape"

Working with Results

The functions return data in tibble (data frame) format, which integrates smoothly with tidyverse operations:

library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union

# Filter for artworks from a specific period
impressionist_works <- search_artworks("impressionism", museum = "met") %>%
  filter(grepl("19th century", date_display))
#> [1] "impressionism"

# Count artworks by artist
artist_counts <- search_artworks("portrait", size = 30) %>%
  group_by(artist_display) %>%
  summarize(count = n()) %>%
  arrange(desc(count))
#> [1] "portrait"

Supported Museums

Currently, senimuse supports: * Art Institute of Chicago (“artic”) * Metropolitan Museum of Art (“met”)

The package standardizes column names across museum APIs for easier comparison and analysis.