Carregando os pacotes

library(dplyr)
library(ggplot2)

Carregando os dados

library(readr)
banco_Moma <- read_delim("https://raw.githubusercontent.com/DATAUNIRIO/Base_de_dados/master/arte_MOMA.csv", delim = ";")

Questão 1

names(banco_Moma)
 [1] "X1"                "title"             "artist"           
 [4] "artist_bio"        "artist_birth_year" "artist_death_year"
 [7] "num_artists"       "n_female_artists"  "n_male_artists"   
[10] "artist_gender"     "year_acquired"     "year_created"     
[13] "circumference_cm"  "depth_cm"          "diameter_cm"      
[16] "height_cm"         "length_cm"         "width_cm"         
[19] "seat_height_cm"    "purchase"          "gift"             
[22] "exchange"          "classification"    "department"       
banco_Moma %>% summarise(tamanho=n())
# A tibble: 1 x 1
  tamanho
    <int>
1    2253

2253 pinturas e 24 variáveis

Questão 2

banco_Moma %>% group_by(title,artist) %>% summarise(year_acquired)
# A tibble: 2,253 x 3
# Groups:   title, artist [2,171]
   title                               artist                 year_acquired
   <chr>                               <chr>                          <dbl>
 1 "\"#1 - 1966\""                     "Peter Young"                   1975
 2 "\"#7 - 1967\""                     "Peter Young"                   1976
 3 "\"Condemnation without Judgment\"" "Ch\xe9ri Samba"                2002
 4 "\"Ex Act\""                        "John Covert"                   1953
 5 "\"For Greg\""                      "Joanna Pousette-Dart"          1979
 6 "\"Hirondelle Amour\""              "Joan Mir\xf3"                  1977
 7 "\"I\""                             "Antoni T\xe0pies"              1990
 8 "\"Keep for Old Memiors\""          "Betye Saar"                    2013
 9 "\"M'Amenez-y\""                    "Francis Picabia"               1968
10 "\"Ma Jolie\""                      "Pablo Picasso"                 1945
# ... with 2,243 more rows

House by Railroad de Edward Hopper e Seated Nude de Bernard Karfiol, ambas em 1930

Questão 3

Landscape at Daybreak de Odilon Redon de 1872

Questão 4

bd_artistas <- banco_Moma %>% group_by(artist,artist_gender) %>% summarise(total=n())
bd_artistas %>% group_by(artist_gender) %>% summarise(total=n())
# A tibble: 3 x 2
  artist_gender total
  <chr>         <int>
1 Female          143
2 Male            837
3 <NA>              9

980 artistas

Questão 5

Pablo Picasso

Questão 6

55 obras

Questão 7

banco_Moma %>% group_by(n_female_artists) %>% summarise(total=n())
# A tibble: 3 x 2
  n_female_artists total
             <dbl> <int>
1                0  1998
2                1   254
3                2     1
banco_Moma %>% group_by(n_male_artists) %>% summarise(total=n())
# A tibble: 5 x 2
  n_male_artists total
           <dbl> <int>
1              0   254
2              1  1992
3              2     2
4              3     4
5              9     1

255 pinturas de artistas femininas e 1999 pinturas de artistas masculinos

Questão 8

# Código na questão 4

143 artistas mulheres e 837 artistas homens

Questão 9

bd_ano_adqui <- (banco_Moma %>% group_by(year_acquired) %>% summarise(qtd=n()))
bd_ano_adqui
# A tibble: 88 x 2
   year_acquired   qtd
           <dbl> <int>
 1          1930     2
 2          1931     2
 3          1932     1
 4          1934    14
 5          1935    22
 6          1936    18
 7          1937    19
 8          1938     8
 9          1939    31
10          1940    18
# ... with 78 more rows

No ano de 1985

Questão 10

bd_ano_criado <- (banco_Moma %>% group_by(year_created) %>% summarise(qtd=n()))
bd_ano_criado
## # A tibble: 139 x 2
##    year_created   qtd
##           <dbl> <int>
##  1         1872     1
##  2         1875     6
##  3         1879     2
##  4         1882     1
##  5         1883     2
##  6         1885     2
##  7         1886     1
##  8         1887     2
##  9         1888     4
## 10         1889     5
## # ... with 129 more rows

No ano de 1977

Questão 11

Adquirida no ano de 1937, foi criada em 1912, Landscape, 47 de Natalia Goncharova.