-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresult_analysis_exploring.R
38 lines (28 loc) · 1.27 KB
/
result_analysis_exploring.R
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
###
# Group project Laura, Jule and Pascal
# ABM classroom size optimization experiments
# from 04/04/2023 to 30/05/2023
###
library(tidyverse)
# choose a result to explore
results <- readRDS("experiments/results_room_spacing_0.1to1by0.1_100sim.RDS")
# reasemble for plotting
mean_app <- results$sim_store %>%
select(ends_with("mean"), day, class) %>%
gather(key = "mean_val", value = "mean_appereance", -c(day, class))
mean_sd <- results$sim_store %>%
select(ends_with("std"), day, class) %>%
gather(key = "std_val", value = "sd_appereance", -c(day, class))
cbind(mean_app, mean_sd %>% select(-c(day, class))) %>%
ggplot(mapping = aes(x = day, y = mean_appereance, color = mean_val)) +
geom_errorbar(aes(ymin = mean_appereance - sd_appereance, ymax = mean_appereance + sd_appereance),
width = 0.2) +
geom_point() +
labs(x = "day", y = expression(bar(n))) +
geom_line(linetype = "dashed", alpha = 0.5)
ggplot(data = results$summary, mapping = aes(x = area, y = mean_week / area)) +
# geom_errorbar(mapping = aes(ymin = mean_week / area - sd_week / area,
# ymin = mean_week / area - sd_week / area),
# width = 0.2)
labs(x = "area", y = expression(bar(infections) / week / area)) +
geom_point()