-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path07-appendix1.Rmd
60 lines (52 loc) · 1.88 KB
/
07-appendix1.Rmd
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
# Appendix 1: Conservation Unit Reference List {#appendix-1 .unnumbered}
Conversation Units (CUs) listed by region and species (click header to sort). The CU names are as appearing in the Pacific Salmon Explorer. The CUID is assigned by PSF to track CUs that we recognize, as these are not always the same as official CUs recognized by DFO (see Regions for details). The Full CU Index (a.k.a. `FULL_CU_IN`) is based on @HoltbyCiruna2007ConservationUnitsPacific and is used to cross-reference against NuSEDS and other DFO datasets.
```{r app1, include=TRUE, echo = FALSE}
options(width = 400)
library(reactable)
app1 <- read.csv("tables/appendix1.csv")
#
# species_colours <- c("#D4A876", "#B8A6BE", "#BBB172", "#D0A4AA", "#D0A4AA", "#98A879", "#98A879", "#0000FF40")[as.numeric(as.factor(app1$Species))]
# ***Remove Yukon and Transboundary for now ***
app1 <- app1[which(app1$Region %in% c("Yukon", "Transboundary") == FALSE), ]
# *** Remove steelhead for now ***
# app1 <- app1[which(app1$Species != "Steelhead"), ]
# Render table
reactable::reactable(
app1,
defaultColDef = colDef(
header = function(value) gsub(".", " ", value, fixed = TRUE),
cell = function(value) format(value, nsmall = 1),
align = "left",
maxWidth = 140
# headerStyle = list(background = "#396D8E", color = "#FFFFFF")
),
columns = list(
# Species = colDef(
# maxWidth = 100,
# style = JS("function(rowInfo, column, state) {
# const { speciesColours } = state.meta
# return { backgroundColor: speciesColours[rowInfo.index] }
# }")
# ),
Conservation.Unit = colDef(
maxWidth = 220
),
CUID = colDef(
maxWidth = 80
),
Full.CU.Index = colDef(
maxWidth = 80
)
),
bordered = TRUE,
highlight = TRUE,
striped = TRUE,
resizable = TRUE,
wrap = TRUE,
searchable = TRUE,
style = list(fontSize = "1.25rem"),
showSortIcon = TRUE,
defaultSorted = "Region",
defaultPageSize = 15
)
```