From 39f24d57eb15a933ccf585640691adcd3217eaac Mon Sep 17 00:00:00 2001 From: Ali Abbas Date: Wed, 6 Nov 2024 20:14:57 +0000 Subject: [PATCH] Update summary_script.R Change orientation of the plot --- summary_script.R | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/summary_script.R b/summary_script.R index 616a2d1..182e31b 100644 --- a/summary_script.R +++ b/summary_script.R @@ -97,15 +97,19 @@ ggplot(states_cyc_freq) + combine_summary <- bind_rows(states_base_sum, states_cyc_sum) |> mutate(scenario = factor(scenario, levels = c("reference", "cycling intervention"))) -plotly::ggplotly(combine_summary %>% - filter(freq >= 2L & freq <= 85L) %>% +plotly::ggplotly( + + combine_summary |> + filter(freq >= 1L) |> ggplot() + aes(x = name, y = freq, fill = scenario) + geom_col(position = "dodge2") + scale_fill_hue(direction = 1) + theme_minimal() + theme(axis.text.x = element_text(angle = 90L)) + - facet_wrap(vars(value))) + facet_wrap(vars(value)) + + ) tbl <- combine_summary |> filter(!value %in% c("dead", "null")) |> group_by(scenario, name) |> summarise(count = sum(nv))