switching to lat lon buckets instead of pdist
This commit is contained in:
parent
72df5362b5
commit
c98fe88d40
@ -60,8 +60,14 @@ metro_data <- metro_raw %>%
|
||||
lag_time = lag(time)) %>%
|
||||
mutate(lag_spd = (pdist - lag_pdist)/as.double(difftime(time, lag_time, units = "hours"))/5280)
|
||||
|
||||
routes_categorized <- read_csv(file = "routes_categorized.csv", col_types = "cc")
|
||||
|
||||
bucket_lat <- 364481.35/200
|
||||
bucket_lon <- 267203.05/200
|
||||
|
||||
metro_summary <- metro_data %>%
|
||||
mutate(pdist_bucket = round(pdist / 200) * 100) %>%
|
||||
left_join(routes_categorized, by = "pid") %>%
|
||||
mutate(lat_bucket = round(lat / 200) * 100) %>%
|
||||
group_by(pdist_bucket, rt, des, pid) %>%
|
||||
summarise(lat = median(lat, na.rm = TRUE),
|
||||
lon = median(lon, na.rm = TRUE),
|
||||
@ -112,7 +118,6 @@ bbox <- c(left = min(metro_data$lon),
|
||||
basemap <- get_stadiamap(bbox = bbox, zoom = 13, maptype = "stamen_toner_lite")
|
||||
|
||||
# A West
|
||||
routes_categorized <- read_csv(file = "routes_categorized.csv", col_types = "cc")
|
||||
quantile(segments_sf %>% filter(pid %in% c("469")) %>% pull(lag_spd), c(0,0.25, 0.5, 0.75, 1))
|
||||
|
||||
for (route in unique(routes_categorized$name)){
|
||||
|
Loading…
x
Reference in New Issue
Block a user