added 'student_number' to routes data table

This commit is contained in:
Ben Varick 2024-11-05 09:07:18 -06:00
parent acf70cc6d2
commit d559b8605e
No known key found for this signature in database

View File

@ -144,9 +144,11 @@ for(i in addresses_near %>% arrange(number) %>% pull(number)) {
school_focus_location$LON, ",", school_focus_location$LAT, school_focus_location$LON, ",", school_focus_location$LAT,
"&profile=", brouter_profile, "&profile=", brouter_profile,
"&alternativeidx=0&format=geojson" "&alternativeidx=0&format=geojson"
) )
response <- GET(query) response <- GET(query)
routes[[i]] <- st_read(content <- content(response, as = "text"), quiet = TRUE) route_run <- st_read(content <- content(response, as = "text"), quiet = TRUE)
route_run[["student_number"]] <- i
routes[[i]] <- route_run
message(paste0("done - ", i, " of ", max(addresses_near$number))) message(paste0("done - ", i, " of ", max(addresses_near$number)))