generated from SEFSC/SEFSC-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.qmd
63 lines (46 loc) · 1.63 KB
/
index.qmd
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
---
title: "Planning Overview"
author: "Caribbean Strategic Planning Team"
format:
revealjs:
toc: true
toc-depth: 1
smaller: true
scrollable: true
link-external-newwindow: true
---
```{r warning=FALSE, echo=FALSE, message=FALSE, results ="asis"}
librarian::shelf(tidyverse, readxl)
sheets <- excel_sheets("Caribbean_Fisheries_Projects.xlsx")
file <- map_dfr(.x = set_names(sheets),
read_excel,
path = "Caribbean_Fisheries_Projects.xlsx")
# Choose sections of presentation
section_var <- "status"
sections <- file |>
select(matches(section_var)) |>
distinct() |>
pull()
for (i in 1:length(sections)) {
cat("\n#", sections[i], "\n")
sub_section <- file |>
filter(get(section_var) == sections[i]) |>
dplyr::select(-one_of(section_var))
for (j in 1:nrow(sub_section)){
cat("\n##", sub_section$title[j], "\n")
cat("\n#### ", str_to_title(section_var), ": ", sections[i], sep = "")
cat("\n#### Contact: [", sub_section$poc[j], "](",
sub_section$website[j], ")", sep = "")
cat("\n- Region:", sub_section$region[j], "\n")
cat("- Category:", sub_section$category[j], "\n")
cat("- Partition:", sub_section$partition[j], "\n")
record <- sub_section[j,] |>
select(where(~!any(is.na(.))), -title, -region,
-category, -partition, -poc, -website)
for (k in 1:ncol(record)){
cat(paste0("- ", str_to_title(names(record)[k]),": ", pull(record[k]), "\n"))
}
# cat(", "){.absolute bottom="110" right="130" width="300"}", "\n")
}
}
```