-
Notifications
You must be signed in to change notification settings - Fork 0
/
the_data.html
842 lines (744 loc) · 33.8 KB
/
the_data.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<title>Exhibition A: The Data</title>
<script src="site_libs/header-attrs-2.25/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.13.2/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<script src="site_libs/navigation-1.1/codefolding.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
<link href="site_libs/font-awesome-6.4.2/css/all.min.css" rel="stylesheet" />
<link href="site_libs/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" />
<script defer src="https://use.fontawesome.com/releases/v5.0.3/js/all.js"></script>
<script defer src="https://use.fontawesome.com/releases/v5.0.0/js/v4-shims.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-151578452-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-151578452-1');
</script>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>
<style type="text/css">code{white-space: pre;}</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}
</script>
<link rel="stylesheet" href="styles.css" type="text/css" />
<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
img {
max-width:100%;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
details > summary > p:only-child {
display: inline;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
.dropdown-submenu {
position: relative;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
display: block;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #cccccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left>.dropdown-menu {
left: -100%;
margin-left: 10px;
border-radius: 6px 0 6px 6px;
}
</style>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
href = window.location.pathname
href = href.substr(href.lastIndexOf('/') + 1)
if (href === "")
href = "index.html";
var menuAnchor = $('a[href="' + href + '"]');
// mark the anchor link active (and if it's in a dropdown, also mark that active)
var dropdown = menuAnchor.closest('li.dropdown');
if (window.bootstrap) { // Bootstrap 4+
menuAnchor.addClass('active');
dropdown.find('> .dropdown-toggle').addClass('active');
} else { // Bootstrap 3
menuAnchor.parent().addClass('active');
dropdown.addClass('active');
}
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
<!-- tabsets -->
<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
border: 1px solid #ddd;
border-radius: 4px;
}
.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "\e259";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "\e258";
font-family: 'Glyphicons Halflings';
border: none;
}
.tabset-dropdown > .nav-tabs > li.active {
display: block;
}
.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
background-color: transparent;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}
.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>
<!-- code folding -->
<style type="text/css">
.code-folding-btn { margin-bottom: 4px; }
</style>
<style type="text/css">
#TOC {
margin: 25px 0px 20px 0px;
}
@media (max-width: 768px) {
#TOC {
position: relative;
width: 100%;
}
}
@media print {
.toc-content {
/* see https://github.com/w3c/csswg-drafts/issues/4434 */
float: right;
}
}
.toc-content {
padding-left: 30px;
padding-right: 40px;
}
div.main-container {
max-width: 1200px;
}
div.tocify {
width: 20%;
max-width: 260px;
max-height: 85%;
}
@media (min-width: 768px) and (max-width: 991px) {
div.tocify {
width: 25%;
}
}
@media (max-width: 767px) {
div.tocify {
width: 100%;
max-width: none;
}
}
.tocify ul, .tocify li {
line-height: 20px;
}
.tocify-subheader .tocify-item {
font-size: 0.90em;
}
.tocify .list-group-item {
border-radius: 0px;
}
</style>
</head>
<body>
<div class="container-fluid main-container">
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
</div>
<div class="toc-content col-xs-12 col-sm-8 col-md-9">
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-bs-toggle="collapse" data-target="#navbar" data-bs-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Home</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="about.html">Project 'Met'ivation</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Exhibitions
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="the_data.html">Exhibition A: The Data</a>
</li>
<li>
<a href="exploring_departments.html">Exhibition B: Exploring the Met's Departments</a>
</li>
<li>
<a href="growing_collection_dashboard.html">Exhibition C: The Met's Growing Collection</a>
</li>
<li>
<a href="inside_the_met.html">Exhibition D: Discovering Inside the Met</a>
</li>
<li>
<a href="around_the_world.html">Exhibition E: Art Around the World</a>
</li>
<li>
<a href="https://lakerss12.shinyapps.io/shiny_app/">Special Exhibition: Egyptian Art</a>
</li>
</ul>
</li>
<li>
<a href="project_report.html">Project Report</a>
</li>
<li>
<a href="curators.html">Meet the Curators</a>
</li>
<li>
<a href="https://www.metmuseum.org/">
<span class="fa fa-link"></span>
</a>
</li>
<li>
<a href="https://github.com/thecodejennerator/P8105_Final-Project-2023_jao2195_mm2277_em2195_ak4598_ajt2206">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
<div id="header">
<div class="btn-group pull-right float-right">
<button type="button" class="btn btn-default btn-xs btn-secondary btn-sm dropdown-toggle" data-toggle="dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span>Code</span> <span class="caret"></span></button>
<ul class="dropdown-menu dropdown-menu-right" style="min-width: 50px;">
<li><a id="rmd-show-all-code" href="#">Show All Code</a></li>
<li><a id="rmd-hide-all-code" href="#">Hide All Code</a></li>
</ul>
</div>
<h1 class="title toc-ignore">Exhibition A: The Data</h1>
</div>
<div id="data-source" class="section level2">
<h2>Data Source</h2>
<p>Since its beginning in 1870, The Metropolitan Museum (The Met) has
acquired and displayed over 5,000 years worth of art work from around
the world.</p>
<p>Thankfully for us data scientists, The Met offers open access to data
of its collection. They did this to encourage interaction with the
museum’s collection, and to help people around the world to use the
wealth of data they have stored on an impressive number of artefacts.
The dataset can be found <a
href="https://github.com/metmuseum/openaccess">here</a>, for anyone
interested in running their own analyses or reproducing ours.</p>
</div>
<div id="generating-our-sample" class="section level2">
<h2>Generating our Sample</h2>
<p>The Met dataset consists of over 400,000 artistic pieces. If you
think the Met is overwhelming to get through now - just imagine if all
of the artworks in storage were also on display. Sadly a dataset of this
size is too much even for us art aficionados, so we decided to divide
and conquer (which, fittingly, is how many of the artifacts from around
the world ended up in an American art museum).</p>
<p>A dataset of this size is far too big to handle, as any analysis
would take an excessively long time to process. Given this scale, we
decided that it would be wise to just work with a smaller, more
manageable subset of the data.</p>
<p>Using the code below, we took a random sample of 10% of the data,
creating our final dataset of over 40,000 observations. You can use this
code to create the same subset we did from The Met’s raw data file
<code>MetOBjects.txt</code>:</p>
<pre><code>- `set.seed(1)`
- `met_10 <- sample_n(MetOBjects, nrow(MetOBjects)*.10)`
- `save(met_10, file = "data/met_10.RData")`</code></pre>
<p>Once we had our 10% sample (amounting to 48,495 observations), we
embarked on some data cleaning.</p>
</div>
<div id="checking-for-completeness" class="section level2">
<h2>Checking for Completeness</h2>
<p>First, we looked into which variables were the most complete, based
percentage of works having data recorded for that characteristic.</p>
<p>The following table shows the % completeness for all variables.</p>
<pre class="r"><code>met_10 <- met_10 %>%
janitor::clean_names()
data.frame(sapply(met_10, function(x) round(sum(!is.na(x))/nrow(met_10)*100,2))) %>%
magrittr::set_colnames("Completeness") |>
arrange(desc(Completeness)) |>
head(15)</code></pre>
<pre><code>## Completeness
## object_number 100.00
## is_highlight 100.00
## is_timeline_work 100.00
## is_public_domain 100.00
## object_id 100.00
## department 100.00
## object_begin_date 100.00
## object_end_date 100.00
## link_resource 100.00
## repository 100.00
## credit_line 99.88
## object_name 99.55
## accession_year 99.28
## medium 98.54
## object_date 97.19</code></pre>
<p>Across all observations, <code>object_name</code> and
<code>accession_year</code> were some of the most complete.
<code>department</code> was 100% complete. This informed which analytic
questions we could answer.</p>
<p>Based on the missing data table and our decision to focus on objects
and years, we once again limited the dataset to those observations with
complete object and year data - resulting in a final analytic dataset
with 47,984 observations and 54 variables.</p>
<p>All in all, we chose the following variables to work with:</p>
<ul>
<li><code>department</code>: Indicates The Met’s curatorial department
responsible for the artwork</li>
<li><code>accession_year</code>: Year the artwork was acquired</li>
<li><code>culture</code>: Information about the culture, or people from
which an object was created</li>
<li><code>object_name</code>: Describes the physical type of the
object</li>
<li><code>country</code>: Country where the artwork was created or
found</li>
<li><code>subregion</code>: Geographic location more specific than
Region, but less specific than Locale, where the artwork was created or
found</li>
<li><code>object_begin_date</code>: Date indicating the year the artwork
was started</li>
<li><code>object_end_date</code>: Date indicating the year the artwork
was completed</li>
<li><code>dynasty</code>: Dynasty (a succession of rulers of the same
line or family) under which an object was created</li>
</ul>
</div>
<div id="cleaning-up-categorization" class="section level2">
<h2>Cleaning Up Categorization</h2>
<p>With the scope of our analytic dataset decided, we now turned our
attention to the actual contents of the included variables.</p>
<div id="object-name" class="section level3">
<h3>Object Name</h3>
<p>First, we noticed that the values in <code>object_name</code> were
far too detailed for our purposes. For example, who needs to
differentiate between a relief fragment from the <em>Tomb of
Maketre</em> and a relief fragment form the <em>Tomb of
Nespekashuty</em>? If you want to, don’t run the code below. But we
consolidated object types, like <em>reliefs</em>, to create simpler and
clearer summaries.</p>
<pre class="r"><code>met <- met %>%
mutate(object_name = ifelse(
grepl("Textile", object_name), "Textile",
ifelse(grepl("Painting", object_name), "Painting",
ifelse(grepl("Relief", object_name), "Relief",
ifelse(grepl("Print", object_name), "Print",
ifelse(grepl("aseball card", object_name), "Baseball card",
ifelse(grepl("Vase", object_name), "Vase",
ifelse(grepl("rnament", object_name), "Vase",
ifelse(grepl("arring", object_name), "Earring",
ifelse(grepl("ecklace", object_name), "Necklace",
ifelse(grepl("hotograph", object_name), "Photograph",
ifelse(grepl("tatue", object_name), "Statue",
object_name))))))))))))</code></pre>
</div>
<div id="dynasty" class="section level3">
<h3>Dynasty</h3>
<p>As we transported ourselves to Ancient Egypt and the Met’s many
excavations in the area, we had to take some additional steps to dust
off the data without hurting the artifacts. <code>Dynasty</code> was a
key variable for the Egyptian data; because the Egyptian Art Department
is the only Department in the Met to have fairly well-identified
dynasties, we felt it was important to include it. However, instead of
keeping to the traditional 30 Dynasties of Egypt, many of the
observations were coded as “Dynasty 1-5” or “second half 11.”</p>
<p>To harmonize the <code>Dynasty</code> variable, we used the following
strategy:</p>
<ul>
<li>If the intended dynasty was easily identifiable from the name, we
recoded the variable to said dynasty</li>
<li>If the value was of a consecutive dynasty (for example, “Dynasty
12-13”), we kept the value the same, but only if that specific value was
common in the data (n>20). This was to prevent having 50+ dynasty
ranges and making visualization tedious.</li>
<li>If the value was of an infrequently occurring consecutive dynasty,
or for larger dynastic range, we recoded the variable to “Dynasty
Range”</li>
<li>Any other values were coded as NA</li>
</ul>
<p>Some other minor cleaning of the Egyptian data also occurred for
object creation dates.</p>
<pre class="r"><code>met_egypt = met |>
filter(department == "Egyptian Art") |>
mutate(
dynasty = case_when(
dynasty == "11" ~ "Dynasty 11",
dynasty == "Dynasty 1, 3–4" | dynasty == "Dynasty 1 3-4" ~ "Dynasty Range",
dynasty == "Dynasty 11, late" ~ "Dynasty 11",
dynasty == "Dynasty 11?" ~ "Dynasty 11",
dynasty == "Dynasty 11–13" | dynasty == "Dynasty 11-13" ~ "Dynasty Range",
dynasty == "Dynasty 11–17" | dynasty == "Dynasty 11-17" ~ "Dynasty Range",
dynasty == "Dynasty 11-17" ~ "Dynasty Range",
dynasty == "Dynasty 11–18" ~ "Dynasty Range",
dynasty == "Dynasty 11–mid 12" | dynasty == "Dynasty 11-mid 12" ~ "Dynasty Range",
dynasty == "Dynasty 11–12" | dynasty == "Dynasty 11-12" ~ "Dynasty Range",
dynasty == "Dynasty 12, early" ~ "Dynasty 12",
dynasty == "Dynasty 12, early – mid" | dynasty == "Dynasty 12, early - mid" ~ "Dynasty 12",
dynasty == "Dynasty 12, early–mid" | dynasty == "Dynasty 12, early-mid" ~ "Dynasty 12",
dynasty == "Dynasty 12, late" ~ "Dynasty 12",
dynasty == "Dynasty 12, late – 13 up to 1700" | dynasty == "Dynasty 12, late - 13 up to 1700" ~ "Dynasty Range",
dynasty == "Dynasty 12, late-13 up to 1700 B. C." ~ "Dynasty Range",
dynasty == "Dynasty 12, late–17" ~ "Dynasty Range",
dynasty == "Dynasty 12, late-17" ~ "Dynasty Range",
dynasty == "Dynasty 12, mid" ~ "Dynasty 12",
dynasty == "Dynasty 12–13" ~ "Dynasty 12-13",
dynasty == "Dynasty 12, late–early 13" ~ "Dynasty 12-13",
dynasty == "Dynasty 12–17" ~ "Dynasty Range",
dynasty == "Dynasty 12–18" ~ "Dynasty Range",
dynasty == "Dynasty 13 to 1700 B.C." ~ "Dynasty Range",
dynasty == "Dynasty 13, mid" ~ "Dynasty 13",
dynasty == "Dynasty 13–17" ~ "Dynasty Range",
dynasty == "Dynasty 13–18, early" ~ "Dynasty Range",
dynasty == "Dynasty 13–SIP" ~ "Dynasty Range",
dynasty == "Dynasty 14–15" ~ "Dynasty Range",
dynasty == "Dynasty 15–17" ~ "Dynasty Range",
dynasty == "Dynasty 17–early Dynasty 18" ~ "Dynasty 17-18",
dynasty == "Dynasty 17–Early Dynasty 18" ~ "Dynasty 17-18",
dynasty == "Dynasty 17–18" ~ "Dynasty 17-18",
dynasty == "Dynasty 18 (?)" ~ "Dynasty 18",
dynasty == "Dynasty 18 or later (?)" ~ "Dynasty 18",
dynasty == "Dynasty 18, early" ~ "Dynasty 18",
dynasty == "Dynasty 18, late" ~ "Dynasty 18",
dynasty == "Dynasty 18, possibly later" ~ "Dynasty 18",
dynasty == "Dynasty 18, second half" ~ "Dynasty 18",
dynasty == "Dynasty 18–19" | dynasty == "Dynasty 18-19" ~ "Dynasty Range",
dynasty == "Dynasty 18–20" ~ "Dynasty Range",
dynasty == "Dynasty 19–20" ~ "Dynasty 19-20",
dynasty == "Dynasty 19–20 (Ramesside)" ~ "Dynasty 19-20",
dynasty == "Dynasty 19–20 or later (?)" ~ "Dynasty 19-20",
dynasty == "Dynasty 19–21" ~ "Dynasty Range",
dynasty == "Dynasty 19–25" ~ "Dynasty Range",
dynasty == "Dynasty 19–30" ~ "Dynasty Range",
dynasty == "Dynasty 1–2" ~ "Dynasty Range",
dynasty == "Dynasty 1-2" ~ "Dynasty Range",
dynasty == "Dynasty 2, second half" ~ "Dynasty 2",
dynasty == "Dynasty 20 (Ramesside)" ~ "Dynasty 2",
dynasty == "Dynasty 20 or later" ~ "Dynasty 20",
dynasty == "Dynasty 20–21" | dynasty == "Dynasty 20-21" ~ "Dynasty Range",
dynasty == "Dynasty 20–22" ~ "Dynasty Range",
dynasty == "Dynasty 20–26" ~ "Dynasty Range",
dynasty == "Dynasty 21 (?)" ~ "Dynasty 21",
dynasty == "Dynasty 21 or 22" ~ "Dynasty Range",
dynasty == "Dynasty 21–22" ~ "Dynasty Range",
dynasty == "Dynasty 21-22" ~ "Dynasty Range",
dynasty == "Dynasty 21–24" ~ "Dynasty Range",
dynasty == "Dynasty 21–25" ~ "Dynasty Range",
dynasty == "Dynasty 21–26" ~ "Dynasty Range",
dynasty == "Dynasty 21–30" ~ "Dynasty Range",
dynasty == "Dynasty 21–early Dynasty 22" ~ "Dynasty 21-22",
dynasty == "Dynasty 22, early" ~ "Dynasty 22",
dynasty == "Dynasty 22–24" ~ "Dynasty Range",
dynasty == "Dynasty 22–26" ~ "Dynasty Range",
dynasty == "Dynasty 25-26" ~ "Dynasty Range",
dynasty == "Dynasty 25–26" ~ "Dynasty Range",
dynasty == "Dynasty 25 (Kushite)" ~ "Dynasty 25",
dynasty == "Dynasty 25–30" ~ "Dynasty Range",
dynasty == "Dynasty 26 (Saite)" ~ "Dynasty 26",
dynasty == "Dynasty 26 and later" ~ "Dynasty Range",
dynasty == "Dynasty 26 or later" ~ "Dynasty Range",
dynasty == "Dynasty 26–29" ~ "Dynasty Range",
dynasty == "Dynasty 26–4th century" ~ "Dynasty Range",
dynasty == "Dynasty 26–30" ~ "Dynasty Range",
dynasty == "Dynasty 3–4" | dynasty == "Dynasty 3-4" ~ "Dynasty Range",
dynasty == "Dynasty 27–30" ~ "Dynasty Range",
dynasty == "Dynasty 27–30?" ~ "Dynasty Range",
dynasty == "Dynasty 30 or later" ~ "Dynasty 30",
dynasty == "Dynasty 5 (?)" ~ "Dynasty 5",
dynasty == "Dynasty 5, second half" ~ "Dynasty 5",
dynasty == "Dynasty 5-6" ~ "Dynasty Range",
dynasty == "Dynasty 5–6" ~ "Dynasty Range",
dynasty == "Dynasty 6–8" ~ "Dynasty Range",
dynasty == "Dynasty 6-8" ~ "Dynasty Range",
dynasty == "Dynasty 6–11" ~ "Dynasty Range",
dynasty == "Dynasty 6–12" ~ "Dynasty 2",
dynasty == "Dynasty 7–10 (?)" ~ "Dynasty Range",
dynasty == "Dynasty 8–11" ~ "Dynasty Range",
dynasty == "Dynasty 8–12" ~ "Dynasty Range",
dynasty == "Dynasty 8–18" ~ "Dynasty Range",
dynasty == "Dynasty 9?" ~ "Dynasty 9",
dynasty == "Dynasty 9–12" ~ "Dynasty Range",
dynasty == "Dynasty 18, early" ~ "Dynasty 18",
dynasty == "original Dynasty 19" ~ "Dynasty 19",
dynasty == "mid-Dynasty 18" ~ "Dynasty 18",
dynasty == "late Dynasty 22" ~ "Dynasty 22",
dynasty == "late Dynasty 21" ~ "Dynasty 21",
dynasty == "late Dynasty 13-17" ~ "Dynasty Range",
dynasty == "late Dynasty 13–17" ~ "Dynasty Range",
dynasty == "late Dynasty 12–early Dynasty 13" ~ "Dynasty 12-13",
dynasty == "late Dynasty 12–early Dynasty 13" ~ "Dynasty 12-13",
dynasty == "late Dynasty 12–Dynasty 13" ~ "Dynasty 12-13",
dynasty == "late Dynasty 12–13" ~ "Dynasty 12-13",
dynasty == "Probably Dynasty 1" ~ "Dynasty 1",
dynasty == "Probably Dynasty 26" ~ "Dynasty 26",
dynasty == "mid Dynasty 13" ~ "Dynasty 13",
dynasty == "early Dynasty 18" ~ "Dynasty 18",
dynasty == "dynasty 11" ~ "Dynasty 11",
dynasty == "Late dynasty 11" ~ "Dynasty 11",
dynasty == "Late Dynasty 21–early Dynasty 22" ~ "Dynasty 21-22",
dynasty == "Late Dynasty 12–13" ~ "Dynasty 12-13",
dynasty == "Dynasty 9–early Dnyasty 11" ~ "Dynasty Range",
dynasty == "mid to late Dynasty 13" ~ "Dynasty 13",
dynasty == "Dynasty 9–12" ~ "Dynasty Range",
dynasty == "Second Intermediate Period" ~ "Dynasty Range",
reign == "reign of Ramesses IV" ~ "Dynasty 20",
reign == "reign of Sethnakht" ~ "Dynasty 20",
object_date == "ca. 2649–1640 B.C." | object_name == "ca. 2649-1640 B.C." ~ "Dynasty Range",
TRUE ~ dynasty,
TRUE ~ reign,
TRUE ~ object_date
),
object_begin_date = case_when(
object_begin_date == 1899 ~ -1479,
TRUE ~ object_begin_date),
object_end_date = case_when(
object_end_date == 1899 ~ -1458,
TRUE ~ object_end_date),
dynasty = ifelse(is.na(dynasty), "No Dynasty Specified", dynasty),
dynasty = factor(dynasty, levels = c("Dynasty 1", "Dynasty 2", "Dynasty 3", "Dynasty 4", "Dynasty 5", "Dynasty 6", "Dynasty 8", "Dynasty 9", "Dynasty 11", "Dynasty 12", "Dynasty 12-13", "Dynasty 13", "Dynasty 14", "Dynasty 15", "Dynasty 17", "Dynasty 17-18", "Dynasty 18", "Dynasty 19", "Dynasty 19-20", "Dynasty 20", "Dynasty 21", "Dynasty 22", "Dynasty 23", "Dynasty 24", "Dynasty 25", "Dynasty 26", "Dynasty 27", "Dynasty 30", "Dynasty Range", "NA")),
dyn_number = ifelse(is.na(dynasty), 30, as.numeric(dynasty)))</code></pre>
</div>
<div id="country" class="section level3">
<h3>Country</h3>
<p>Geolocating the source of artworks and depicting them on a world map
required some additional data management. This began with merged our
already-prepped Met data with world data from <code>rnaturalearth</code>
package. This world data contains information about countries and
locations such as longitudes and latitudes.</p>
<p>However, after merging, it became clear that the <code>country</code>
variable in our data need some additional cleaning, as some countries
were coded in a different format than the world data dataset. This
difference created more missing data on countries and total number of
objects. In order to resolve the issue, we updated the name of the
countries in our Met data to match the names of countries in the world
data. We also pulled out the subset of the remaining objects with
attributed countries that didn’t match country names in the world data,
so that we could investigate these non-matches in their own plot.</p>
</div>
<div id="egyptian-subregion" class="section level3">
<h3>Egyptian Subregion</h3>
<p>Continuing with our art theme, the Met took some LARGE creative
liberties when it described the <code>subregion</code> in which
artifacts in Egypt were found. Unfortunately, the regions and subregions
that the Met identified were not what the Egyptian government themselves
self-identified as regions and subregions within their country.</p>
<p>As such, some (archeological) digging was required to map Egypt.
First, we snagged a shapefile of First-Level Administrative Districts
from a [UTexas library] (<a
href="https://geodata.lib.utexas.edu/catalog/stanford-bb409wq6265"
class="uri">https://geodata.lib.utexas.edu/catalog/stanford-bb409wq6265</a>).
To better streamline our repositories, we decided to upload and then
save the <code>EGY_adm1.shp</code> as an RData file and keep only the
modified file for quicker loading.</p>
<p>Using the code below, we decided to upload and then save the
<code>EGY_adm1.shp</code> as an RData file and keep only the modified
file to streamline our reposiories and speed up loading time:</p>
<pre><code>- `library(sf)`
- `shape_file <- st_read("data/EGY_adm1.shp")`</code></pre>
<p>Thankfully the file was in Polygon form, so we had a map - now to get
to the real artifacts. Due to the general ugliness of the
regions/subregions data, we decided to use the subregions data and
simply find the latitude and longitudes for the areas. To make sure we
finished this task before being mummified, we restricted the data to
only subregions with more than 10 artifact numbers. Sadly, the resulting
data for artifacts is point data rather than polygons, but it would
still be useful for our later mapping of artefacts by Egyptian
region.</p>
</div>
</div>
<br><br>
<footer>
<img src="images/Columbia_University_transparent_logo.png" alt="stickers" style="width:20%">
<br>
<p class="copyright text-muted" align="center"> Copyright © Disclosure: "The Art of Data Science: The Met ™" website was created using R Studio by a team of Columbia University in the City of New York Data Science Students (known herein as the "The Curators"), for course BIST P8105: Data Science. Data used to create this site was from The Met ™ Museum publicly available Github (Open Source Data). The Curators, do not make any claims about these data presented and are in no way affiliated, associated with, or sponsored by, The Met ™ Museum, or any other entity."
</p>
<p class="copyright text-muted" align="center"> Copyright © 2023 The Curators: Jennifer A. Osei, Melike Aksoy, Emily Murphy, Aleya Khalifa, Diana Hernandez, Andy Turner. </p>
</footer>
</div>
</div>
</div>
<script>
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});
</script>
<!-- tabsets -->
<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
<!-- code folding -->
<script>
$(document).ready(function () {
window.initializeCodeFolding("hide" === "show");
});
</script>
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')
.children('h1,h2,h3,h4,h5').addClass('toc-ignore');
// establish options
var options = {
selectors: "h1,h2,h3",
theme: "bootstrap3",
context: '.toc-content',
hashGenerator: function (text) {
return text.replace(/[.\\/?&!#<>]/g, '').replace(/\s/g, '_');
},
ignoreSelector: ".toc-ignore",
scrollTo: 0
};
options.showAndHide = true;
options.smoothScroll = true;
// tocify
var toc = $("#TOC").tocify(options).data("toc-tocify");
});
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>