@@ -8,13 +8,119 @@ format:
88 body-width : 1500px
99 margin-width : 300px
1010 gutter-width : 1.5rem
11+ knitr :
12+ opts_chunk :
13+ out.width : " 95%"
1114---
1215
1316``` {r, echo=FALSE, message=FALSE}
14- library("fontawesome")
17+ library(fontawesome)
18+ library(tidyverse)
19+ library(googlesheets4)
20+ library(ggalt)
21+ library(patchwork)
22+ library(RColorBrewer)
23+
24+ con <- googlesheets4::read_sheet("https://docs.google.com/spreadsheets/d/1UXBQs_tu0cRYN3XDEPsq3MxlUNvryPEnR-ClSp2uipo/edit?gid=0#gid=0",
25+ sheet = "conferences") %>% mutate(activity = "conferences")
26+ edu <- googlesheets4::read_sheet("https://docs.google.com/spreadsheets/d/1UXBQs_tu0cRYN3XDEPsq3MxlUNvryPEnR-ClSp2uipo/edit?gid=0#gid=0",
27+ sheet = "edu") %>% mutate(activity = "education")
28+ int <- googlesheets4::read_sheet("https://docs.google.com/spreadsheets/d/1UXBQs_tu0cRYN3XDEPsq3MxlUNvryPEnR-ClSp2uipo/edit?gid=0#gid=0",
29+ sheet = "internships") %>% mutate(activity = "research stays")
30+ emp <- googlesheets4::read_sheet("https://docs.google.com/spreadsheets/d/1UXBQs_tu0cRYN3XDEPsq3MxlUNvryPEnR-ClSp2uipo/edit?gid=0#gid=0",
31+ sheet = "work") %>% mutate(activity = "employment")
32+ team <- googlesheets4::read_sheet("https://docs.google.com/spreadsheets/d/1UXBQs_tu0cRYN3XDEPsq3MxlUNvryPEnR-ClSp2uipo/edit?gid=0#gid=0",
33+ sheet = "team")
34+
35+ full_df <- full_join(con, edu, by = c("start_date", "end_date", "city", "country", "name", "who", "activity")) %>%
36+ full_join(., int, by = c("start_date", "end_date", "city", "country", "name", "who", "activity")) %>%
37+ full_join(., emp, by = c("start_date", "end_date", "city", "country", "name", "who", "group", "faculty", "activity")) %>%
38+ full_join(., team, by = c("who")) %>%
39+ mutate(start_date = as.Date(start_date, "%d.%m.%Y"),
40+ start_date = if_else(is.na(start_date), today(), start_date),
41+ end_date = as.Date(end_date, "%d.%m.%Y"),
42+ end_date = if_else(is.na(end_date), today(), end_date),
43+ cat = as.factor(activity),
44+ type = as.factor(type),
45+ who = as.factor(who),
46+ full_name = if_else(full_name %>% is.na(), name, full_name)) %>%
47+ filter(team == "main")
48+
49+
50+ # plots
51+
52+ my_colors <- scale_fill_hue()$palette(full_df$who %>% levels() %>% length())
53+ names(my_colors) <- full_df$who %>% levels()
54+
55+ p <- lapply(full_df$cat %>% levels(), function(i){
56+ full_df %>%
57+ filter(activity == i) %>%
58+ ggplot(., aes(y = name, color = who)) +
59+ geom_segment(aes(x = start_date, xend = end_date), linewidth = 2, position = position_dodgev(height = 0.9)) +
60+ geom_point(aes(x = start_date, y = name), size = 3, position = position_dodgev(height = 0.9)) +
61+ geom_point(aes(x = end_date, y = name), size = 3, position = position_dodgev(height = 0.9)) +
62+ scale_fill_manual(values = my_colors, aesthetics = "color") +
63+ labs(title = paste0("BioGenies ", i), x = "Year", y = "Destination") +
64+ theme_minimal() +
65+ xlab("Dates")
66+ })
67+
68+
69+ # pw_plot <- (p[[1]] & theme(legend.position = "bottom")) + ((p[[2]] / p[[3]] / p[[4]]) & theme(legend.position = "none")) + plot_layout(guides = "auto")
70+
71+ pw_plot <- (p[[1]] | (p[[2]] / p[[3]] / p[[4]] & theme(legend.position = "none")) + plot_layout(axes = "collect", axis_titles = "collect"))
72+
73+ pw_plot
74+
75+
76+ # map
77+
78+ library(gapminder)
79+ library(tidygeocoder)
80+ library(plotly)
81+ library(ggthemes)
82+
83+ world <- map_data("world") %>%
84+ filter(region != "Antarctica")
85+
86+ gapminder_codes <- gapminder::country_codes
87+ gapminder <- gapminder::gapminder_unfiltered
88+
89+ gapminder <- gapminder %>%
90+ inner_join(gapminder_codes, by= "country") %>%
91+ mutate(code = iso_alpha)
92+
93+ gapminder_data <- gapminder %>%
94+ inner_join(maps::iso3166 %>%
95+ select(a3, mapname), by= c(code = "a3")) %>%
96+ mutate(mapname = str_remove(mapname, "\\(.*"))
97+
98+ ## cities <- lon & lat
99+
100+ full_df_longlat <- full_df %>% geocode(city = city, country = country)
101+
102+ world_visit <- world %>%
103+ ggplot() +
104+ geom_polygon(aes(x = long, y = lat, group = group),
105+ fill = "springgreen2",
106+ color = "deepskyblue1",
107+ size = 0.01) +
108+ geom_point(data = full_df_longlat, aes(x = long, y = lat, color = activity, text = paste0(activity, "<br>", city, " ", country, "<br>", who)), alpha = 0.6) +
109+ labs(title = "BioGenies in the world") +
110+ theme_map() +
111+ scale_size_continuous(guide = F) +
112+ scale_color_discrete(name = "Type") +
113+ theme(plot.title = element_text(size = 10, hjust = 0.5))
114+
115+
116+ inter_plot <- ggplotly(world_visit, tooltip = "text")
117+
118+ inter_plot
15119```
16120
17- ### Contact Info {#contact}
121+ ### Bio
122+
123+ ### Contact info {#contact}
18124
19125------------------------------------------------------------------------
20126
@@ -26,4 +132,24 @@ library("fontawesome")
26132<!-- [`r fontawesome::fa("twitter", fill = "#15a7ff", height = "3em")`](https://twitter.com/_jarochi/) -->
27133[ ` r fontawesome::fa("x-twitter", fill = "#24292e", height = "3em") ` ] ( https://x.com/_jarochi/ )
28134<!-- [`r fontawesome::fa("steam", fill = "#2f4f4f", height = "3em")`]() -->
29- <!-- [`r fontawesome::fa("playstation", fill = "#4739aa", height = "3em")`]() -->
135+ <!-- [`r fontawesome::fa("playstation", fill = "#4739aa", height = "3em")`]() -->
136+
137+ ### Conferences and workshops
138+
139+ # ```{r, echo=FALSE, message=FALSE}
140+ # int_mod %>%
141+ # ggplot(., aes(x = start_date, xend = end_date, y = place, color = country, linewidth = 3), height = 2, width = 8) +
142+ # # scale_x_date(date_breaks = "6 month", date_labels = "%M") +
143+ # geom_dumbbell(colour_x = "#a3c4dc", colour_xend = "#0e668b", size = 2) +
144+ # theme_minimal()
145+ # ```
146+ #
147+ # ```{r, echo=FALSE, message=FALSE}
148+ # DT::datatable(int_mod)
149+ # ```
150+
151+
152+
153+
154+
155+
0 commit comments