@@ -3,6 +3,10 @@ title: "Immunotechnology Cake Club"
3
3
format :
4
4
dashboard :
5
5
logo : ../images/cake-emoji.png
6
+ nav-buttons :
7
+ - icon : github
8
+ href : https://github.com/ImmunTech/CakeClub
9
+ theme : minty
6
10
---
7
11
8
12
``` {r}
@@ -216,22 +220,100 @@ choco_yes %>%
216
220
```
217
221
:::
218
222
219
- # Global cakes 🌍
223
+ # Global cakes
220
224
221
- ## Row {height="40%" }
225
+ ## Row {height=50% }
222
226
223
227
``` {r}
224
- #| title: Global cakes
228
+ #| label: prepare global cakes
225
229
226
230
global_cakes <-
227
231
cake_data %>%
228
232
filter(Nationality_of_the_cake != "Swedish")
229
233
234
+ global_cakes_max <-
235
+ global_cakes %>%
236
+ filter(Score == max(Score)) %>%
237
+ mutate(Score = round(Score, 1))
238
+
239
+ max_baker <- global_cakes_max$Who
240
+ max_cake <- global_cakes_max$Cake
241
+ max_score <- global_cakes_max$Score
242
+ ```
243
+
244
+ ``` {r}
245
+ #| title: Summary
246
+
247
+ global_cakes %>%
248
+ select(Who, Cake, Score) %>%
249
+ arrange(desc(Score)) %>%
250
+ gt() %>%
251
+ fmt_number(
252
+ columns = Score,
253
+ decimals = 1
254
+ ) %>%
255
+ tab_header(
256
+ title = md("**Global Cakes**"),
257
+ subtitle = "Best global cake?"
258
+ ) %>%
259
+ cols_label(
260
+ Who = md("**Baker**"),
261
+ Cake = md("**Cake**"),
262
+ Score = md("**Score**")
263
+ )
230
264
```
231
265
232
- ## Row {height="60%"}
266
+ ### Row - Value boxes {height=10%}{width="20%"}
267
+
268
+ ::: {.valuebox icon="award" color="#E7C484"}
269
+ ` {r} max_baker `
270
+
271
+ ` {r} max_cake `
272
+
273
+ ` {r} max_score `
274
+ :::
275
+
276
+ ### Row - Card {height=20%}{width="20%"}
277
+ ::: {.card title="Basque cheese cake"}
278
+ ![ ] ( ../images/Baker17.png ) {width="100%"}
279
+ :::
280
+
281
+ ## Column - Global cakes without 🍫🧀🍓🫐 {.tabset}
233
282
234
283
``` {r}
235
- #| title: Data
284
+ #| title: Plot 1
285
+
286
+ global_cakes_other <-
287
+ global_cakes %>%
288
+ filter(Chocolate == "no" & Berries == "no" & Cheesecake == "no")
289
+
290
+ global_cakes_other %>%
291
+ ggplot(aes(x = Who, y = Cake, color = Job_group)) +
292
+ geom_point(size = 4) +
293
+ theme_minimal() +
294
+ theme(axis.text = element_text(size = 12),
295
+ axis.text.x = element_text(angle = 45, hjust = 1),
296
+ axis.title = element_text(size = 14),
297
+ legend.text = element_text(size = 12),
298
+ legend.title = element_text(size = 14)) +
299
+ labs(x = "Baker", y = "Cake", color = "Job Title") +
300
+ scale_color_manual(values = c("#F7D379", "#C4D6E7", "#F9B288", "#ACC791"))
301
+ ```
302
+
303
+ ``` {r}
304
+ #| title: Plot 2
305
+
306
+ global_cakes_other %>%
307
+ ggplot(aes(x = Who, y = Cake, color = Nationality_of_the_cake)) +
308
+ geom_point(size = 4) +
309
+ theme_minimal() +
310
+ theme(axis.text = element_text(size = 12),
311
+ axis.text.x = element_text(angle = 45, hjust = 1),
312
+ axis.title = element_text(size = 14),
313
+ legend.text = element_text(size = 12),
314
+ legend.title = element_text(size = 14)) +
315
+ labs(x = "Baker", y = "Cake", color = "Cake origin") +
316
+ scale_color_manual(values = c("#F9C7D4", "#859E91", "#A7ABDE", "#D0BBA8", "82B2C0"))
317
+ ```
318
+
236
319
237
- ```
0 commit comments