-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresentation.html
667 lines (543 loc) · 22.2 KB
/
presentation.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
<!DOCTYPE html>
<html lang="" xml:lang="">
<head>
<title>Final Presentation</title>
<meta charset="utf-8" />
<meta name="date" content="2021-05-31" />
<script src="libs/header-attrs/header-attrs.js"></script>
<link href="libs/remark-css/ninjutsu.css" rel="stylesheet" />
<link href="libs/remark-css/lucy.css" rel="stylesheet" />
<link href="libs/panelset/panelset.css" rel="stylesheet" />
<script src="libs/panelset/panelset.js"></script>
<script src="libs/kePrint/kePrint.js"></script>
<link href="libs/lightable/lightable.css" rel="stylesheet" />
<script type="application/json" id="xaringanExtra-editable-docid">{"id":"bbd94e3a46c143cdac2e968fdbddefd3","expires":14}</script>
<script src="libs/himalaya/himalaya.js"></script>
<script src="libs/js-cookie/js.cookie.js"></script>
<link href="libs/editable/editable.css" rel="stylesheet" />
<script src="libs/editable/editable.js"></script>
<link rel="stylesheet" href="my_style.css" type="text/css" />
</head>
<body>
<textarea id="source">
class: title-slide, my-one-page-font
.center[.black[ETC5513: Final Presentation:] <br> .brown[Exploring Coffee Varieties]]
<br>
.left[.black[Authors:] <br><br>
.pink[Sahinya Akila] <br><br>
.pink[Stylianos Panagiotis] <br><br>
.pink[Yiwen Liu] <br><br>
] <br>
_.left[2021-05-31]_
.footer[ETC5513:Collaborative and reproducible practices]
---
class: middle center bg-main1
# 咖啡
--
## .blue[The Chinese word for Coffee]
--
<img src="https://images.wallpaperscraft.com/image/coffee_cup_wooden_surface_106291_300x168.jpg" width="40%">
--
This slide is a tribute to _Yihui Xie_ creator of __[xaringan]("https://slides.yihui.org/xaringan/#1")__
---
## .center[.white[Introduction]]
* Data obtained from __The Coffee Quality Institute__.
* Grades of Arabica and Robusta beans, across many countries and professionally rated on a 0-100 scale.
---
## .white[How many bags of coffee from each country were sampled]
.panelset[
.panel[.panel-name[Summary]
We begin our analysis by providing a summary of the samples used to provide the coffee ratings. For each country different varieties of coffee were sampled from different regions and companies. The samples from each country can be summarised using the number_of_bags variable.
It is important to know the total quantity for each country to possibly identify a relationship between the number of samples used and the countries rating.
]
.panel[.panel-name[Table]
<table class="table" style="margin-left: auto; margin-right: auto;">
<caption>Total Bags of Coffee sampled by Country</caption>
<thead>
<tr>
<th style="text-align:left;"> Country </th>
<th style="text-align:right;"> Total Bags </th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;"> Colombia </td>
<td style="text-align:right;"> 41204 </td>
</tr>
<tr>
<td style="text-align:left;"> Guatemala </td>
<td style="text-align:right;"> 36868 </td>
</tr>
<tr>
<td style="text-align:left;"> Brazil </td>
<td style="text-align:right;"> 30534 </td>
</tr>
<tr>
<td style="text-align:left;"> Mexico </td>
<td style="text-align:right;"> 24140 </td>
</tr>
<tr>
<td style="text-align:left;"> Honduras </td>
<td style="text-align:right;"> 13167 </td>
</tr>
<tr>
<td style="text-align:left;"> Ethiopia </td>
<td style="text-align:right;"> 11761 </td>
</tr>
<tr>
<td style="text-align:left;"> Costa Rica </td>
<td style="text-align:right;"> 10354 </td>
</tr>
<tr>
<td style="text-align:left;"> Nicaragua </td>
<td style="text-align:right;"> 6406 </td>
</tr>
<tr>
<td style="text-align:left;"> Uganda </td>
<td style="text-align:right;"> 5477 </td>
</tr>
<tr>
<td style="text-align:left;"> El Salvador </td>
<td style="text-align:right;"> 4449 </td>
</tr>
<tr>
<td style="text-align:left;"> Kenya </td>
<td style="text-align:right;"> 3971 </td>
</tr>
<tr>
<td style="text-align:left;"> Tanzania, United Republic Of </td>
<td style="text-align:right;"> 3760 </td>
</tr>
<tr>
<td style="text-align:left;"> India </td>
<td style="text-align:right;"> 3011 </td>
</tr>
<tr>
<td style="text-align:left;"> Peru </td>
<td style="text-align:right;"> 2336 </td>
</tr>
<tr>
<td style="text-align:left;"> Taiwan </td>
<td style="text-align:right;"> 1914 </td>
</tr>
<tr>
<td style="text-align:left;"> Indonesia </td>
<td style="text-align:right;"> 1658 </td>
</tr>
<tr>
<td style="text-align:left;"> Thailand </td>
<td style="text-align:right;"> 1310 </td>
</tr>
<tr>
<td style="text-align:left;"> United States (Hawaii) </td>
<td style="text-align:right;"> 833 </td>
</tr>
<tr>
<td style="text-align:left;"> Malawi </td>
<td style="text-align:right;"> 557 </td>
</tr>
<tr>
<td style="text-align:left;"> Panama </td>
<td style="text-align:right;"> 537 </td>
</tr>
<tr>
<td style="text-align:left;"> Burundi </td>
<td style="text-align:right;"> 520 </td>
</tr>
<tr>
<td style="text-align:left;"> United States </td>
<td style="text-align:right;"> 462 </td>
</tr>
<tr>
<td style="text-align:left;"> Haiti </td>
<td style="text-align:right;"> 390 </td>
</tr>
<tr>
<td style="text-align:left;"> Philippines </td>
<td style="text-align:right;"> 259 </td>
</tr>
<tr>
<td style="text-align:left;"> Rwanda </td>
<td style="text-align:right;"> 150 </td>
</tr>
<tr>
<td style="text-align:left;"> NA </td>
<td style="text-align:right;"> 149 </td>
</tr>
<tr>
<td style="text-align:left;"> Laos </td>
<td style="text-align:right;"> 81 </td>
</tr>
<tr>
<td style="text-align:left;"> United States (Puerto Rico) </td>
<td style="text-align:right;"> 71 </td>
</tr>
<tr>
<td style="text-align:left;"> China </td>
<td style="text-align:right;"> 55 </td>
</tr>
<tr>
<td style="text-align:left;"> Japan </td>
<td style="text-align:right;"> 20 </td>
</tr>
<tr>
<td style="text-align:left;"> Zambia </td>
<td style="text-align:right;"> 13 </td>
</tr>
<tr>
<td style="text-align:left;"> Vietnam </td>
<td style="text-align:right;"> 11 </td>
</tr>
<tr>
<td style="text-align:left;"> Myanmar </td>
<td style="text-align:right;"> 10 </td>
</tr>
<tr>
<td style="text-align:left;"> Papua New Guinea </td>
<td style="text-align:right;"> 7 </td>
</tr>
<tr>
<td style="text-align:left;"> Ecuador </td>
<td style="text-align:right;"> 3 </td>
</tr>
<tr>
<td style="text-align:left;"> Cote d?Ivoire </td>
<td style="text-align:right;"> 2 </td>
</tr>
<tr>
<td style="text-align:left;"> Mauritius </td>
<td style="text-align:right;"> 1 </td>
</tr>
</tbody>
</table>
]
.panel[.panel-name[Plot]
<img src="presentation_files/figure-html/unnamed-chunk-2-1.png" style="display: block; margin: auto;" />
]
]
---
## .white[Which country produces the highest rated coffee]
.panelset[
.panel[.panel-name[Summary]
After we identified that the number of testing samples doesn't influence the coffee rating, we can answer which countries produce the best quality of coffee.
]
.panel[.panel-name[Plot]
<img src="presentation_files/figure-html/unnamed-chunk-3-1.png" style="display: block; margin: auto;" />
]
]
---
## .white[Which countries produce most kinds of Arabica and Robusta coffee beans]
.panelset[
.panel[.panel-name[Summary]
- In this time period Mexico, Colombia and Guatemala cultivated the most kinds of Arabica coffee beans and India, Uganda and Ecuador cultivated the most kinds of Robusta coffee beans.
- There are much more types of Arabica coffee beans compared to Robusta coffee beans.
- It seems to be an obvious coffee production zone, which is between the equator and 30 degrees north latitude. In these zones, the annual average temperature and rainfall are in line with the coffee bean growing conditions.
- The countries that cultivated Arabica coffee beans are all located in Central and South America, while the countries that cultivated Robusta coffee beans are located in several continents like South America, Eastern Africa and India. It is related to the environment required for the growth of different coffee beans.
]
.panel[.panel-name[Table]
<table class="table" style="margin-left: auto; margin-right: auto;">
<thead>
<tr>
<th style="text-align:left;"> country_of_origin </th>
<th style="text-align:left;"> species </th>
<th style="text-align:right;"> n </th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;"> Mexico </td>
<td style="text-align:left;"> Arabica </td>
<td style="text-align:right;"> 236 </td>
</tr>
<tr>
<td style="text-align:left;"> Colombia </td>
<td style="text-align:left;"> Arabica </td>
<td style="text-align:right;"> 183 </td>
</tr>
<tr>
<td style="text-align:left;"> Guatemala </td>
<td style="text-align:left;"> Arabica </td>
<td style="text-align:right;"> 181 </td>
</tr>
<tr>
<td style="text-align:left;"> India </td>
<td style="text-align:left;"> Robusta </td>
<td style="text-align:right;"> 13 </td>
</tr>
<tr>
<td style="text-align:left;"> Uganda </td>
<td style="text-align:left;"> Robusta </td>
<td style="text-align:right;"> 10 </td>
</tr>
<tr>
<td style="text-align:left;"> Ecuador </td>
<td style="text-align:left;"> Robusta </td>
<td style="text-align:right;"> 2 </td>
</tr>
</tbody>
</table>
]
.panel[.panel-name[Plot]
<img src="presentation_files/figure-html/unnamed-chunk-5-1.png" style="display: block; margin: auto;" />
]
]
---
## .white[Difference of altitude of Arabica coffee beans and Robusta coffee beans production]
.panelset[
.panel[.panel-name[Summary]
- The mean altitude of Arabica coffee beans production areas is concentrated from 1000 to 1800 meters.
- There exists two peaks about the mean altitude of Robusta coffee Beans production areas, and the ranges are concentrated from 500 to 1600 meters and 2800 to 3400 meters respectively. However, the probability of the second peak is much less than the first one.
]
.panel[.panel-name[Plot]
<img src="presentation_files/figure-html/unnamed-chunk-6-1.png" style="display: block; margin: auto;" />
]
]
---
## .white[Which species has higher grades]
.panelset[
.panel[.panel-name[Summary]
- In acidity, aftertaste, aroma and flavor aspects, the median score of Robusta coffee beans is higher than that of Arabica coffee beans, which means Robusta coffee beans have a better performance than Arabica coffee beans.
- As to sweetness, Arabica coffee beans is much better than Robusta coffee beans.
- Total point, which combines these primary aspects and some other aspects, shows that Arabica coffee beans has a better quality.
- Maybe these grades would give some help when people choose coffee beans.
]
.panel[.panel-name[Plot]
<img src="presentation_files/figure-html/unnamed-chunk-7-1.png" style="display: block; margin: auto;" />
]
]
---
## .white[Which processing method leads to better rating]
.panelset[
.panel[.panel-name[Summary]
<center><img src="image/Washed_to_Dry_Processed_Coffee.png", width="40%"></center>
- Pulped Natural honey process allows the coffee beans to be dried after removing the skin of the fruit when all the is still in the beans
- Natural Method: Fruits are dried in the natural form
- Washed/Wet Method: Removes skin and pulp before drying.
- The ratings for Pupled Natural/Honey and Semi-washed/Semi-pupled is better when compared to Natural Dry and Washed/Wet methods.
]
.panel[.panel-name[Plot]
<img src="presentation_files/figure-html/unnamed-chunk-8-1.png" style="display: block; margin: auto;" />
]
]
---
## .white[Which harvest year produces the best coffee?]
.panelset[
.panel[.panel-name[Summary]
- 2012 has the best harvest and 2018 has the least.
- Due to favorable weather conditions in the year 2012.
- Number of records available for 2018 is significantly lesser than 2018.
<table class="table" style="margin-left: auto; margin-right: auto;">
<thead>
<tr>
<th style="text-align:left;"> harvest_year </th>
<th style="text-align:right;"> count </th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;"> 2012 </td>
<td style="text-align:right;"> 354 </td>
</tr>
<tr>
<td style="text-align:left;"> 2014 </td>
<td style="text-align:right;"> 233 </td>
</tr>
<tr>
<td style="text-align:left;"> 2013 </td>
<td style="text-align:right;"> 181 </td>
</tr>
<tr>
<td style="text-align:left;"> 2015 </td>
<td style="text-align:right;"> 129 </td>
</tr>
<tr>
<td style="text-align:left;"> 2016 </td>
<td style="text-align:right;"> 124 </td>
</tr>
<tr>
<td style="text-align:left;"> 2017 </td>
<td style="text-align:right;"> 70 </td>
</tr>
<tr>
<td style="text-align:left;"> 2011 </td>
<td style="text-align:right;"> 26 </td>
</tr>
<tr>
<td style="text-align:left;"> 2010 </td>
<td style="text-align:right;"> 10 </td>
</tr>
<tr>
<td style="text-align:left;"> 2018 </td>
<td style="text-align:right;"> 1 </td>
</tr>
</tbody>
</table>
]
.panel[.panel-name[Plot]
<img src="presentation_files/figure-html/unnamed-chunk-10-1.png" style="display: block; margin: auto;" />
]
]
---
# Conclusion:
.left[
- The highest number of samples were 41204 bag samples from Colombia and the least was 1 bag sample from Mauritius.
- No relationship between the number of test samples and average coffee rating.
- The rating for Ethiopian Coffee is the highest.
- Arabica coffee beans were cultivated mostly by Mexico, Colombia and Guatemala (South American Region). Whereas Robusta was cultivated extensively by India, Uganda and Ecuador.
- The mean altitude of Arabica coffee beans production areas is higher than that of many Robusta coffee Beans production areas even though there are some exceptions.
- Acidity, aftertaste, aroma and flavor aspects, of Robusta coffee beans is higher than that of Arabica coffee beans, which means Robusta coffee beans have a better performance than Arabica coffee beans.
- Ratings for Semi-washed/Semi-pulped and Pulped natural honey is better when compared to Washed/Wet processing method.
- 2012 has been the best year in terms of harvesting the coffee beans.
]
---
## .white[Collaboration using Github]
Github is a great tool for group members to do an assignment together.
- It is convenient for us to create our own branch to do different parts of assignment separately and merge together in the end.
- It is easy for each of us to have a look about others work through git fetch command.
- It helps us to copy several specific files from main branch to our own branch and then do some further modification.
- It clearly shows the change history of each of step and helpful for other group members who come in later.
- Also it helps us to backup and recover our work when our computers encounter some problem.
---
class: question middle
Questions?
<span style="color:blue";>.can-edit[--]</span>
</textarea>
<style data-target="print-only">@media screen {.remark-slide-container{display:block;}.remark-slide-scaler{box-shadow:none;}}</style>
<script src="https://remarkjs.com/downloads/remark-latest.min.js"></script>
<script>var slideshow = remark.create({
"highlightStyle": "github",
"highlightLanguage": "r",
"highlightLines": true,
"highlightSpans": false,
"countIncrementalSlides": false,
"slideNumberFormat": "%current%/%total%",
"ratio": "16:9"
});
if (window.HTMLWidgets) slideshow.on('afterShowSlide', function (slide) {
window.dispatchEvent(new Event('resize'));
});
(function(d) {
var s = d.createElement("style"), r = d.querySelector(".remark-slide-scaler");
if (!r) return;
s.type = "text/css"; s.innerHTML = "@page {size: " + r.style.width + " " + r.style.height +"; }";
d.head.appendChild(s);
})(document);
(function(d) {
var el = d.getElementsByClassName("remark-slides-area");
if (!el) return;
var slide, slides = slideshow.getSlides(), els = el[0].children;
for (var i = 1; i < slides.length; i++) {
slide = slides[i];
if (slide.properties.continued === "true" || slide.properties.count === "false") {
els[i - 1].className += ' has-continuation';
}
}
var s = d.createElement("style");
s.type = "text/css"; s.innerHTML = "@media print { .has-continuation { display: none; } }";
d.head.appendChild(s);
})(document);
// delete the temporary CSS (for displaying all slides initially) when the user
// starts to view slides
(function() {
var deleted = false;
slideshow.on('beforeShowSlide', function(slide) {
if (deleted) return;
var sheets = document.styleSheets, node;
for (var i = 0; i < sheets.length; i++) {
node = sheets[i].ownerNode;
if (node.dataset["target"] !== "print-only") continue;
node.parentNode.removeChild(node);
}
deleted = true;
});
})();
(function() {
"use strict"
// Replace <script> tags in slides area to make them executable
var scripts = document.querySelectorAll(
'.remark-slides-area .remark-slide-container script'
);
if (!scripts.length) return;
for (var i = 0; i < scripts.length; i++) {
var s = document.createElement('script');
var code = document.createTextNode(scripts[i].textContent);
s.appendChild(code);
var scriptAttrs = scripts[i].attributes;
for (var j = 0; j < scriptAttrs.length; j++) {
s.setAttribute(scriptAttrs[j].name, scriptAttrs[j].value);
}
scripts[i].parentElement.replaceChild(s, scripts[i]);
}
})();
(function() {
var links = document.getElementsByTagName('a');
for (var i = 0; i < links.length; i++) {
if (/^(https?:)?\/\//.test(links[i].getAttribute('href'))) {
links[i].target = '_blank';
}
}
})();
// adds .remark-code-has-line-highlighted class to <pre> parent elements
// of code chunks containing highlighted lines with class .remark-code-line-highlighted
(function(d) {
const hlines = d.querySelectorAll('.remark-code-line-highlighted');
const preParents = [];
const findPreParent = function(line, p = 0) {
if (p > 1) return null; // traverse up no further than grandparent
const el = line.parentElement;
return el.tagName === "PRE" ? el : findPreParent(el, ++p);
};
for (let line of hlines) {
let pre = findPreParent(line);
if (pre && !preParents.includes(pre)) preParents.push(pre);
}
preParents.forEach(p => p.classList.add("remark-code-has-line-highlighted"));
})(document);</script>
(function() {
var divHTML = document.querySelectorAll(".details-open");
divHTML.forEach(function (el) {
var preNodes = el.getElementsByTagName("pre");
var outputNode = preNodes[1];
outputNode.outerHTML = "<details open class='output'><summary>Output</summary>" + outputNode.outerHTML + "</details>";
})
})();
(function() {
var divHTML = document.querySelectorAll(".details");
divHTML.forEach(function (el) {
var preNodes = el.getElementsByTagName("pre");
var outputNode = preNodes[1];
outputNode.outerHTML = "<details class='output'><summary>Output</summary>" + outputNode.outerHTML + "</details>";
})
})();
<script>
slideshow._releaseMath = function(el) {
var i, text, code, codes = el.getElementsByTagName('code');
for (i = 0; i < codes.length;) {
code = codes[i];
if (code.parentNode.tagName !== 'PRE' && code.childElementCount === 0) {
text = code.textContent;
if (/^\\\((.|\s)+\\\)$/.test(text) || /^\\\[(.|\s)+\\\]$/.test(text) ||
/^\$\$(.|\s)+\$\$$/.test(text) ||
/^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$/.test(text)) {
code.outerHTML = code.innerHTML; // remove <code></code>
continue;
}
}
i++;
}
};
slideshow._releaseMath(document);
</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-MML-AM_CHTML';
if (location.protocol !== 'file:' && /^https?:/.test(script.src))
script.src = script.src.replace(/^https?:/, '');
document.getElementsByTagName('head')[0].appendChild(script);
})();
</script>
</body>
</html>