Skip to content

Commit f29e710

Browse files
committed
Use ggplot instead
1 parent 857db36 commit f29e710

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

code/scenarios/sao paulo/streamline_travel_survey.R

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ mode_df <- data.frame(
6060

6161
rd$mode_string <- as.character(mode_df$mode_string[match(rd$mode, mode_df$mode_int)])
6262

63-
plotly::ggplotly(
64-
ggplot(rd %>%
65-
filter(!is.na(mode)) %>%
66-
group_by(mode_string) %>%
67-
summarise(count = n()) %>%
68-
mutate(perc = round(count/sum(count) * 100, 1)),
69-
aes(x = mode_string, y = perc)) +
70-
geom_bar(position = 'dodge', stat='identity') +
71-
geom_text(aes(label = perc), position = position_dodge(width=0.9), vjust=-0.25, color = "blue") +
72-
theme_minimal() +
73-
theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
74-
labs(x = "", y = "percentage(%)", title = "Main Mode distribution")
75-
)
63+
# plotly::ggplotly(
64+
ggplot(rd %>%
65+
filter(!is.na(mode)) %>%
66+
group_by(mode_string) %>%
67+
summarise(count = n()) %>%
68+
mutate(perc = round(count/sum(count) * 100, 1)),
69+
aes(x = mode_string, y = perc)) +
70+
geom_bar(position = 'dodge', stat='identity') +
71+
geom_text(aes(label = perc), position = position_dodge(width=0.9), vjust=-0.25, color = "blue") +
72+
theme_minimal() +
73+
theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
74+
labs(x = "", y = "percentage(%)", title = "Main Mode distribution")
75+
# )

0 commit comments

Comments
 (0)