-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlacmip-digitization-metrics.html
703 lines (603 loc) · 26.8 KB
/
lacmip-digitization-metrics.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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<title>LACMIP Digitization Metrics</title>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/bootstrap.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>
<script src="site_libs/jqueryui-1.11.4/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>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</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>
<style type="text/css">
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;
}
.table th:not([align]) {
text-align: left;
}
</style>
</head>
<body>
<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
height: auto;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
</style>
<div class="container-fluid main-container">
<!-- tabsets -->
<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});
</script>
<!-- code folding -->
<style type="text/css">
.code-folding-btn { margin-bottom: 4px; }
</style>
<script>
$(document).ready(function () {
window.initializeCodeFolding("show" === "show");
});
</script>
<script>
$(document).ready(function () {
// 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",
theme: "bootstrap3",
context: '.toc-content',
hashGenerator: function (text) {
return text.replace(/[.\\/?&!#<>]/g, '').replace(/\s/g, '_').toLowerCase();
},
ignoreSelector: ".toc-ignore",
scrollTo: 0
};
options.showAndHide = true;
options.smoothScroll = true;
// tocify
var toc = $("#TOC").tocify(options).data("toc-tocify");
});
</script>
<style type="text/css">
#TOC {
margin: 25px 0px 20px 0px;
}
@media (max-width: 768px) {
#TOC {
position: relative;
width: 100%;
}
}
.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;
padding-left: 25px;
text-indent: 0;
}
.tocify .list-group-item {
border-radius: 0px;
}
</style>
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<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="fluid-row" id="header">
<div class="btn-group pull-right">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span>Code</span> <span class="caret"></span></button>
<ul class="dropdown-menu" 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">LACMIP Digitization Metrics</h1>
</div>
<div id="overview" class="section level2">
<h2>Overview</h2>
<p>This document contains R code originally written to analyze the results of the “Cretaceous Seas of California” digitization project, supported by funding from the National Science Foundation (NSF DBI 1561429). The code below is designed to be reused with any dataset formatted to track daily digitization progress in the same way. A data template is available <a href="https://github.com/LACMIP/digitization-metrics/blob/master/template_lacmip-digitization-time-tracking.csv">here</a>.</p>
<p>If you want to re-use this code, you should open <a href="https://github.com/LACMIP/digitization-metrics/blob/master/lacmip-digitization-metrics.Rmd">this file</a> in R. Then begin by loading the Tidyverse library (if you haven’t already, you will also need to install the <a href="https://cran.r-project.org/web/packages/tidyverse/index.html">Tidyverse package</a>):</p>
<pre class="r"><code>library(tidyverse)</code></pre>
<p>You can also choose to redefine the following project variables:</p>
<pre class="r"><code>project <- "Cretaceous Seas of California" #shows up as a graph subtitle
width <- 15 #default dimension (inches) for saving JPG versions of graphs
height <- 10 #default dimension (inches) for saving JPG versions of graphs</code></pre>
<p>At this point you are ready to load the digitization time-tracking data you want to analyze into R. Edit the filename here to analyze a different dataset. Make sure your data file is in the correct working directory and formatted according to the template linked above.</p>
<pre class="r"><code>data <- read_csv("input_K-CA-Digitization_2019-01-31.csv", na = character())</code></pre>
</div>
<div id="lots-processed" class="section level2">
<h2>Lots Processed</h2>
<div id="how-many-lots-were-processed-as-part-of-this-project" class="section level3">
<h3>How many lots were processed as part of this project?</h3>
<p>Use the function below to report on the number of specimen lots processed by this project.</p>
<pre class="r"><code>lots <- function(data) {
#build table to summarize the number of lots processed by collection type
buildLots <- data %>%
select(matches("LOTS_")) %>%
summarise_all(funs(sum(., na.rm = TRUE))) %>%
gather("lot type","count") %>%
mutate("%" = round((count/sum(count)*100),1)) %>%
mutate(`lot type` = sub("LOTS_","",`lot type`)) %>%
mutate(`lot type` = sub("st","stratigraphic",`lot type`)) %>%
mutate(`lot type` = sub("tx","taxonomic",`lot type`))
#calculate total lots processed and
#save as an object in the global environment to access from markdown text
totalLots <<- buildLots %>%
filter(`lot type`=="stratigraphic" | `lot type`=="taxonomic") %>%
summarise(count = sum(count)) %>%
as.numeric(.[1])
#output file with results
write_csv(buildLots, "output_lots.csv")
}</code></pre>
<p>A total of <strong>15542 specimen lots were digitized during the Cretaceous Seas of California project</strong>. Some specimens were evaluated as part of this project but digitized, mostly due to poor quality of the original specimen. We can see a breakdown of lots processed by digitization status and collection area from the results of the function above:</p>
<p><img src="lacmip-digitization-metrics_files/figure-html/unnamed-chunk-5-1.png" width="672" /></p>
</div>
</div>
<div id="rehousing-supplies" class="section level2">
<h2>Rehousing Supplies</h2>
<div id="what-rehousing-supplies-did-this-project-use-and-at-what-cost" class="section level3">
<h3>What rehousing supplies did this project use, and at what cost?</h3>
<p>Use the function below to report on total supplies used for this project, and their cost. Edit the values in <code>setPrice</code> to set different costs in dollars per unit.</p>
<pre class="r"><code>supplies <- function(data) {
#set variables for rehousing supply prices, units in dollars
setPrice <- tibble(
`box-3x1.5` = "0.242",
`box-3x3` = "0.268",
`box-3x4` = "0.372",
`box-3x6` = "0.578",
`box-4x6` = "0.698",
`box-6x6` = "0.779",
`plastic-3x3` = "1",
`plastic-6x6` = "1",
`vial-7dr` = "0.75",
`vial-3dr` = "0.50",
`vial-1dr` = "0.25")
#turn setPrice variables into a factor
unitPrice <- as.numeric(c(setPrice))
#build table to calculate price per unit (note that the column names of the supplies
#are important because the code below relies on them sorting alphabetically)
buildSupplies <- data %>%
select(matches("REHOUSE_")) %>%
summarise_all(funs(sum(., na.rm = TRUE))) %>%
gather("supply","quantity") %>%
mutate(supply = sub("REHOUSE_box3x1.5","archival paper box, 3x1.5 inches",supply)) %>%
mutate(supply = sub("REHOUSE_box3x3","archival paper box, 3x3 inches",supply)) %>%
mutate(supply = sub("REHOUSE_box3x4","archival paper box, 3x4 inches",supply)) %>%
mutate(supply = sub("REHOUSE_box3x6","archival paper box, 3x6 inches",supply)) %>%
mutate(supply = sub("REHOUSE_box4x6","archival paper box, 4x6 inches",supply)) %>%
mutate(supply = sub("REHOUSE_box6x6","archival paper box, 6x6 inches",supply)) %>%
mutate(supply = sub("REHOUSE_plastic3x3","archival plastic box, 3x3 inches",supply)) %>%
mutate(supply = sub("REHOUSE_plastic6x6","archival plastic, 6x6 inches",supply)) %>%
mutate(supply = sub("REHOUSE_vial7dr","glass vial, 7 dram",supply)) %>%
mutate(supply = sub("REHOUSE_vial3dr","glass vial, 3 dram",supply)) %>%
mutate(supply = sub("REHOUSE_vial1dr","glass vial, 1 dram",supply)) %>%
mutate("cost ($)" = round(quantity*unitPrice,2))
#calculate total supply cost and
#save as an object in the global environment to access from markdown text
totalCost <<- sum(buildSupplies$`cost ($)`)
#output file with results
write_csv(buildSupplies, "output_supplies.csv")
}</code></pre>
<p>The <strong>total cost for the Cretaceous Seas of California project was $4491.54</strong>. We can see a breakdown of costs by supply item from the results of the function above:</p>
<div class="kable-table">
<table>
<thead>
<tr class="header">
<th align="left">supply</th>
<th align="right">quantity</th>
<th align="right">cost ($)</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">archival paper box, 3x1.5 inches</td>
<td align="right">929</td>
<td align="right">224.82</td>
</tr>
<tr class="even">
<td align="left">archival paper box, 3x3 inches</td>
<td align="right">423</td>
<td align="right">113.36</td>
</tr>
<tr class="odd">
<td align="left">archival paper box, 3x4 inches</td>
<td align="right">206</td>
<td align="right">76.63</td>
</tr>
<tr class="even">
<td align="left">archival paper box, 3x6 inches</td>
<td align="right">215</td>
<td align="right">124.27</td>
</tr>
<tr class="odd">
<td align="left">archival paper box, 4x6 inches</td>
<td align="right">169</td>
<td align="right">117.96</td>
</tr>
<tr class="even">
<td align="left">archival paper box, 6x6 inches</td>
<td align="right">276</td>
<td align="right">215.00</td>
</tr>
<tr class="odd">
<td align="left">archival plastic box, 3x3 inches</td>
<td align="right">104</td>
<td align="right">104.00</td>
</tr>
<tr class="even">
<td align="left">archival plastic, 6x6 inches</td>
<td align="right">22</td>
<td align="right">22.00</td>
</tr>
<tr class="odd">
<td align="left">glass vial, 7 dram</td>
<td align="right">2956</td>
<td align="right">2217.00</td>
</tr>
<tr class="even">
<td align="left">glass vial, 3 dram</td>
<td align="right">1296</td>
<td align="right">648.00</td>
</tr>
<tr class="odd">
<td align="left">glass vial, 1 dram</td>
<td align="right">2514</td>
<td align="right">628.50</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="taxonomic-improvements" class="section level2">
<h2>Taxonomic Improvements</h2>
<div id="what-taxonomic-improvements-were-made-during-this-project" class="section level3">
<h3>What taxonomic improvements were made during this project?</h3>
<p>Use the function below to report on the effect that this project had on the quantity and quality of taxonomic identifications for lots processed during its course.</p>
<pre class="r"><code>identifications <- function(data) {
#build table to calculate taxonomic identification actions by type
buildIdentifications <- data %>%
select(matches("ID_")) %>%
summarise_all(funs(sum(.,na.rm = TRUE))) %>%
gather("identification action","count") %>%
mutate(`identification action` =
sub("ID_genusChange","genus name updated or redetermined",`identification action`)) %>%
mutate(`identification action` =
sub("ID_speciesChange","species name updated or redetermined",`identification action`)) %>%
mutate(`identification action` =
sub("ID_sp","evaluated but could not assign species name",`identification action`)) %>%
mutate(`identification action` =
sub("ID_rank-up","taxonomic rank moved up ",`identification action`)) %>%
mutate(`identification action` =
sub("ID_rank-down","taxonomic rank moved down ",`identification action`)) %>%
mutate(`identification action` =
sub("ID_new","identification assigned for the first time",`identification action`)) %>%
mutate("% total lots" = round((count/totalLots*100),1))
#calculate the total percent of specimen lots affected by taxonomic identification action and
#save as an object in the global environment to access from markdown text
totalIdentifications <<- sum(buildIdentifications$`% total lots`)
#output results as file
write_csv(buildIdentifications, "output_identifications.csv")
}</code></pre>
<p>A total of <strong>65.3% of specimen lots had their taxonomic quality improved during the Cretaceous Seas of California project</strong>. We can see a breakdown of taxonomic improvements from the results of the function above:</p>
<div class="kable-table">
<table>
<thead>
<tr class="header">
<th align="left">identification action</th>
<th align="right">count</th>
<th align="right">% total lots</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">genus name updated or redetermined</td>
<td align="right">825</td>
<td align="right">5.3</td>
</tr>
<tr class="even">
<td align="left">species name updated or redetermined</td>
<td align="right">239</td>
<td align="right">1.5</td>
</tr>
<tr class="odd">
<td align="left">evaluated but could not assign species name</td>
<td align="right">60</td>
<td align="right">0.4</td>
</tr>
<tr class="even">
<td align="left">taxonomic rank moved up</td>
<td align="right">689</td>
<td align="right">4.4</td>
</tr>
<tr class="odd">
<td align="left">taxonomic rank moved down</td>
<td align="right">595</td>
<td align="right">3.8</td>
</tr>
<tr class="even">
<td align="left">identification assigned for the first time</td>
<td align="right">7748</td>
<td align="right">49.9</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="digitization-rate" class="section level2">
<h2>Digitization Rate</h2>
<div id="what-was-this-projects-overall-digitization-rate" class="section level3">
<h3>What was this project’s overall digitization rate?</h3>
<p>Use the function below to report on the rate of digitization over the lifespan of this project, as measured by the number of specimen lots processed.</p>
<pre class="r"><code>digitizationRate <- function(data) {
#build table to summarize number of lots processed over time
buildDigitizationRate <- data %>%
select(matches("LOTS_|date")) %>%
mutate("lots" = LOTS_st + LOTS_tx) %>%
separate(date, c("yyyy","mm","dd"), sep = "-") %>%
unite("month", c("yyyy","mm"), sep = "-") %>%
select(month,lots) %>%
na.omit() %>%
group_by(month) %>%
summarise(lots = sum(lots))
#calculate the mean number of lots processed per month and
#save as an object in the global environment to access from markdown text
averageLots <<- mean(buildDigitizationRate$lots)
#output results to file
write_csv(buildDigitizationRate, "output_digitizationRate.csv")
#graph digitization rate by month
graphDigitizationRate <- buildDigitizationRate %>%
ggplot(aes(x = month, y = lots)) +
geom_col() +
labs(title = "LACMIP Digitization Rate by Lots",
subtitle = project,
y = "# of Lots Processed",
x = "\nMonth") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1, vjust = 1))
#output graph to file
ggsave("output_digitizationRate.jpg", plot = graphDigitizationRate,
width = width*1.5, height = height, units = "cm", dpi = "print")
}</code></pre>
<div class="figure">
<img src="output_digitizationRate.jpg" alt="The Cretaceous Seas of California project digitization rate is graphed here by the number of lots processed over time, an average of 914 specimen lots per month." />
<p class="caption">The Cretaceous Seas of California project digitization rate is graphed here by the number of lots processed over time, an <strong>average of 914 specimen lots per month</strong>.</p>
</div>
</div>
<div id="what-digitization-tasks-required-the-most-time" class="section level3">
<h3>What digitization tasks required the most time?</h3>
<p>Use the function below to report on the time required to perform each of the core tasks associated with specimen digitization.</p>
<pre class="r"><code>digitizationTask <- function(data) {
#streamline main data for task analysis
buildDigitizationTask <- data %>%
mutate(lotsProcessed = select(., matches("LOTS_"),-LOTS_uncataloged)
%>% rowSums(na.rm = TRUE)) %>%
mutate(lotsRehoused = select(., matches("REHOUSE_"))
%>% rowSums(na.rm = TRUE)) %>%
mutate(lotsIdentified = select(., matches("ID_new"))
%>% rowSums(na.rm = TRUE)) %>%
mutate(lotsReidentified = select(., matches("ID_"),-ID_new)
%>% rowSums(na.rm = TRUE)) %>%
filter(lotsProcessed!=0) %>%
mutate(minutesPerIDRehouse = round(`TIME_idRehouse`*60/lotsProcessed,1)) %>%
mutate(minutesPerCount = round(`TIME_count`*60/lotsProcessed,1)) %>%
mutate(minutesPerPaint = round(`TIME_paint`*60/lotsProcessed,1)) %>%
mutate(minutesPerCatalog = round(`TIME_catalog`*60/lotsProcessed,1)) %>%
mutate(minutesPerLabels = round(`TIME_labels`*60/lotsProcessed,1)) %>%
mutate(minutesPerNumber = round(`TIME_number`*60/lotsProcessed,1)) %>%
mutate(minutesPerTotal = select(., matches("minutesPer"))
%>% rowSums(na.rm = TRUE)) %>%
select(date, matches("LOC_"), matches("minutes"),
lotsProcessed, lotsRehoused, lotsIdentified, lotsReidentified)
#output results to file
write_csv(buildDigitizationTask, "output_digitizationTask.csv")
#calculate average minutes per specimen lot per task
buildDigitizationTaskAvg <- tibble(
"Task" = c("Identify & Rehouse", "Count", "Paint", "Catalog", "Place Labels", "Number"),
"Time (min/lot)" = c(round(mean(buildDigitizationTask$minutesPerIDRehouse, na.rm = TRUE),1),
round(mean(buildDigitizationTask$minutesPerCount, na.rm = TRUE),1),
round(mean(buildDigitizationTask$minutesPerPaint, na.rm = TRUE),1),
round(mean(buildDigitizationTask$minutesPerCatalog, na.rm = TRUE),1),
round(mean(buildDigitizationTask$minutesPerLabels, na.rm = TRUE),1),
round(mean(buildDigitizationTask$minutesPerNumber, na.rm = TRUE),1)))
#calculate average minutes per specimen lot (all tasks) and
#save as an object in the global environment to access from markdown text
averageTimePerLot <<- sum(buildDigitizationTaskAvg$`Time (min/lot)`)
#graph average minutes per specimen lot per task
graphDigitizationTaskAvg <<- buildDigitizationTaskAvg %>%
ggplot(aes(x = Task, y = `Time (min/lot)`, label = `Time (min/lot)`)) +
geom_bar(stat = "identity") +
scale_x_discrete (limits = c("Identify & Rehouse","Count",
"Catalog","Paint","Number","Place Labels")) +
labs(title = "LACMIP Digitization Time per Task",
subtitle = project,
y = "Average Time per Lot (minutes)",
x = "\nTask") +
theme_minimal() +
geom_text(vjust = 0, nudge_y = 0.05)
#output graph to file
ggsave("output_digitizationTaskAvg.jpg", plot = graphDigitizationTaskAvg,
width = width, height = height, units = "cm", dpi = "print")
#calculate average minutes per specimen lot per task over time
buildDigitizationTaskTime <- buildDigitizationTask %>%
select(date, starts_with("minutes")) %>%
gather("task","time",-date, na.rm = TRUE) %>%
group_by(date, task) %>%
mutate(minutesPerSpm = round(mean(time, na.rm = TRUE),1)) %>%
ungroup() %>%
mutate(task = sub("minutesPer","",task)) %>%
select(-time) %>%
distinct()
#[FIX] set factor to order tasks according to natural sequence
#buildDigitizationTaskTime$task2 = factor(buildDigitizationTaskTime$task, levels =
# c("IDRehouse","Count","Catalog","Paint","Number","Labels"))
#graph average minutes per specimen lot per task over time
graphDigitizationTaskTime_task <<- buildDigitizationTaskTime %>%
spread(task, minutesPerSpm) %>%
select(-Count, -Total) %>%
filter_all(all_vars(!is.na(.))) %>%
gather("task", "minutesPerSpm", -date) %>%
ggplot(aes(x = as.factor(date), y = minutesPerSpm, group = task, color = task)) +
geom_line() +
#coord_cartesian(ylim = c(0, 40)) +
facet_grid(rows = vars(task), scales = "free") +
labs(title = "LACMIP Digitization Rate by Task",
subtitle = project,
y = "Average Time per Lot (minutes)",
x = "\nProject Duration") +
theme_minimal() +
theme(axis.text.x = element_blank())
#output graph to file
ggsave("output_digitizationTaskTime_task.jpg", plot = graphDigitizationTaskTime_task,
width = width*1.5, height = height, units = "cm", dpi = "print")
#graph average minutes per specimen lot (all tasks) over time
graphDigitizationTaskTime_total <<- buildDigitizationTaskTime %>%
filter(task == "Total") %>%
ggplot(aes(x = date, y = minutesPerSpm)) +
geom_point() +
geom_smooth() +
labs(title = "LACMIP Digitization Rate by Time per Lot",
subtitle = project,
y = "Average Time per Lot (minutes)",
x = "\nProject Duration") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1, vjust = 1))
#output graph to file
ggsave("output_digitizationTaskTime_total.jpg", plot = graphDigitizationTaskTime_total,
width = width*1.5, height = height, units = "cm", dpi = "print")
#[FIX TITLE] calculate average minutes per specimen lot per task over time
#buildDigitizationTaskFactor <-
#graph average minutes per specimen lot (all tasks) over time, faceted by formation
#graphDigitizationTaskFactor <<-
#output graph to file
#ggsave("output_digitizationFactor_formation.jpg", plot = graphDigitizationFactor_formation,
# width = width*1.5, height = height, units = "cm", dpi = "print")
}</code></pre>
<p>Digitization is comprised of specific tasks, often completed by people with different roles in the project (staff, student, volunteer, etc.). LACMIP identified and tracked six specific digitization tasks, and the average time required to complete each task for one specimen lot is graphed here:</p>
<p><img src="lacmip-digitization-metrics_files/figure-html/unnamed-chunk-14-1.png" width="672" /></p>
<p>The digitization rate over time broken up by task is graphed here:</p>
<p><img src="lacmip-digitization-metrics_files/figure-html/unnamed-chunk-15-1.png" width="672" /></p>
</div>
<div id="what-factors-affected-digitization-rates" class="section level3">
<h3>What factors affected digitization rates?</h3>
<p>The average time to digitize a single specimen lot (all tasks included) varied, as shown in the graph here, clearly indicating that overall project duration affected digitization rate. <strong>Over the course of the project as a whole, each specimen lot took an average of 5.5 minutes per lot to process.</strong></p>
<p><img src="lacmip-digitization-metrics_files/figure-html/unnamed-chunk-16-1.png" width="672" /></p>
</div>
</div>
</div>
</div>
</div>
<script>
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});
</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>