-
Notifications
You must be signed in to change notification settings - Fork 0
/
uk-europe-map.Rmd
65 lines (53 loc) · 1.46 KB
/
uk-europe-map.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
61
62
63
64
---
title: "Current Aphasia Research Studies"
---
```{css, echo = F}
/* Don't display the title on the map page so there's more map*/
d-title, d-byline {
display: none
}
d-appendix{
display: none !important;
}
/*Fix for Marker Clusters*/
.marker-cluster {
background-color: #31882A20 !important;
}
.marker-cluster div {
background-color: #31882A !important;
color: #fff !important;
}
d-article{
margin-top: 45px;
max-height: 90vh !important;
padding-top: 0px;
}
```
```{r setup, include=FALSE}
library(here)
library(tidyverse)
library(leaflet)
clinical_trials = read.csv(here("data", "clinical_trials_clean.csv"))
data = clinical_trials %>%
ungroup() %>%
select(name = BriefTitle, Condition, StartDate, NCTId,
OrgFullName, BriefSummary, DetailedDescription,
Keyword, StudyType, EligibilityCriteria, HealthyVolunteers,
MinimumAge, Gender, LocationCity, LocationState, lon, lat) %>%
mutate(name = gsub("[.]", "", x=name),
link=paste0("list_view.html#",NCTId),
Name = paste0("<a href=", link, ">", name, "</a>")
)
```
```{r echo = F, layout = "l-screen-inset shaded", out.height = "88vh"}
data %>%
rename(lng = lon) %>%
leaflet() %>%
setView(lng = 12, lat = 51, zoom = 4) %>%
addTiles() %>%
addMarkers(popup = ~Name,
clusterOptions = markerClusterOptions(
maxClusterRadius = 40,
showCoverageOnHover = F)
)
```