Created
May 14, 2025 20:32
-
-
Save vgXhc/e4bc94b1e754890f41470b065f73934a to your computer and use it in GitHub Desktop.
Metro rider charts 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| library(scales) | |
| madison_vrh <- get_ntd(agency = "City of Madison", ntd_variable = "VRH") | |
| extrafont::loadfonts() | |
| madison_vrh |> | |
| filter(modes == "MB") |> | |
| mutate(year = year(month), mo = month(month)) |> | |
| filter(mo == 3) |> | |
| summarize(mean_vrh = mean(value), .by = year) |> | |
| ggplot(aes(year, mean_vrh)) + | |
| geom_point() + | |
| geom_line() + | |
| ylim(c(0, 40000)) + | |
| scale_y_continuous(labels = label_number_auto(), name = "vehicle revenue hours") | |
| ylab("vehicle revenue hours") + | |
| labs(title = "Madison Metro vehicle revenue hours in March, 2002-2024") + | |
| hrbrthemes::theme_ipsum() | |
| madison_vrm <- get_ntd(agency = "City of Madison", ntd_variable = "VRM") | |
| madison_vrm |> | |
| filter(modes == "MB") |> | |
| mutate(year = year(month), mo = month(month)) |> | |
| filter(mo == 3) |> | |
| summarize(mean_vrm = mean(value), .by = year) |> | |
| ggplot(aes(year, mean_vrm)) + | |
| geom_point() + | |
| geom_line() + | |
| scale_y_continuous(labels = label_number_auto(), name = "vehicle revenue miles", | |
| limits = c(0, 500000)) + | |
| labs(title = "Madison Metro vehicle revenue miles in March, 2002-2025") + | |
| hrbrthemes::theme_ipsum() | |
| madison_upt <- get_ntd(agency = "City of Madison", ntd_variable = "UPT") | |
| madison_upt |> | |
| filter(modes == "MB") |> | |
| mutate(year = year(month), mo = month(month)) |> | |
| filter(mo == 4) |> | |
| summarize(mean_upt = mean(value), .by = year) |> | |
| ggplot(aes(year, mean_upt)) + | |
| geom_point() + | |
| geom_line() + | |
| # scale_y_continuous(labels = label_number_auto(), name = "vehicle revenue miles", | |
| # limits = c(0, 500000)) + | |
| labs(title = "Madison Metro vehicle revenue miles in March, 2002-2025") + | |
| hrbrthemes::theme_ipsum() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment