-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmiembros.qmd
98 lines (76 loc) · 2.93 KB
/
miembros.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
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
---
title: "Miembros"
---
A continuación puedes encontrar el directorio de miembros del grupo de trabajo de Ecoinformática incluyendo, además de su contacto, sus principales líneas de investigación y sus intereses dentro del grupo.
Para darte de alta como miembro rellena tus datos [aquí](https://forms.gle/bkCfSjERcDHsrLhx8). Si quieres actualizar o corregir un error en los datos puedes actualizar el cuestionario con tu gmail en el mismo link o por favor escribe un email a ecoinf.aeet\@gmail.com.
<br>
```{r}
#| label = "setup",
#| include = FALSE
knitr::opts_chunk$set(echo=FALSE, message=FALSE, warning=FALSE)
```
```{r echo = F , message = FALSE, warning = F}
# library(dplyr)
# library(sf)
# library(htmltools)
library(leaflet)
source("R/map_functions.R")
source("R/create_members_profile.R")
# read members' information from google sheet
member.table <- gsheet::gsheet2tbl("19J9P-is9eJWoDN7_agmSeu5S5YgD4JZIoe_FtZ-G3EQ") |>
format_member_table() |>
unique()
# dplyr::distinct()
# read institution coordinates and only search for the new ones
coords.table <- read.csv("institutioncoords.csv") |>
update_coord_table(member.table = member.table) |>
unique()
# dplyr::distinct()
# rewrite updated table of institutions coordinates
write.csv(coords.table, file = "institutioncoords.csv",
quote = TRUE, row.names = FALSE, fileEncoding = "UTF-8")
# combine both table by its affiliation and add coordinates (POINTS)
member.table.coords <- merge(member.table, coords.table, all.x = TRUE) |>
subset(!is.na(lon))
member.table.coords$lon <- as.numeric(member.table.coords$lon)
member.table.coords$lat <- as.numeric(member.table.coords$lat)
# filter(!is.na(lon)) |>
# st_as_sf(coords = c("lon", "lat")) |>
member.table.coords$weblink <- paste0('<a href="',
'https://ecoinfaeet.github.io/miembros/',
iconv(gsub(" ", "_", member.table.coords$`Nombre y apellidos`),
from = 'UTF-8', to = 'ASCII//TRANSLIT'),
".html",
'" target="_blank">', member.table.coords$`Nombre y apellidos`,
'</a>')
# plot map
custom_icon <- leaflet::makeIcon(
iconUrl = "images/location_custom.png",
iconWidth = 20, iconHeight = 25,
iconAnchorX = 25, iconAnchorY = 25
)
leaflet(member.table.coords) |>
addTiles(options = providerTileOptions(noWrap = TRUE)) |>
addMarkers(popup = ~(weblink),
label = member.table.coords$`Nombre y apellidos`,
# labelOptions = labelOptions(zoomAnimation = TRUE), # deprecated
clusterOptions = markerClusterOptions(),
icon = custom_icon)
```
<br> <br>
---
# title: "Participantes"
listing:
- id: miembros
contents: "miembros/*.qmd"
type: grid
image-height: 225px
grid-columns: 6
fields: [image, title]
grid-item-align: center
filter-ui: [title]
---
::: {#map}
:::
::: {#equipo}
:::