cyipt / actdev

ActDev - Active travel provision and potential in planned and proposed development sites
https://actdev.cyipt.bike
7 stars 3 forks source link

Walking route problem #99

Closed joeytalbot closed 3 years ago

joeytalbot commented 3 years ago

Circuity of walking routes is abnormally high in Ebbsfleet. This is why:

Screenshot from 2021-02-23 10-24-51

joeytalbot commented 3 years ago

The problem was that the 'nearest town centre' is being selected on the other side of the Thames.

joeytalbot commented 3 years ago

I've removed this walking route.

Robinlovelace commented 3 years ago

I've removed this walking route.

Good fix. Can you add a link to the line of code that fixes it? Thinking about phase II, wondering how we can generalise fixes for edge cases like this. Closing for now in any case, great work!

joeytalbot commented 3 years ago
 routes_walk_combined = routes_walk_cutdown %>% mutate(purpose = "commute")

if(route_walk_town$distance <= 6000) routes_walk_combined = bind_rows(routes_walk_combined, walk_town_cutdown %>% mutate(purpose = "town"))

This fixes it by removing any walking routes to town centres that are longer than 6km. The cycle routes are still in there (although in reality at Ebbsfleet they should go to a completely different town).

joeytalbot commented 3 years ago

https://github.com/cyipt/actdev/commit/67a911387a38d31fe4351d741d66922a189024a7

Robinlovelace commented 3 years ago

I guess you meant this line @joeytalbot ?

https://github.com/cyipt/actdev/blob/67a911387a38d31fe4351d741d66922a189024a7/code/scenarios-streamlined.R#L475

FYI you can copy permalinks to lines code as documented here, really handy feature: https://docs.github.com/en/github/managing-your-work-on-github/creating-a-permanent-link-to-a-code-snippet

joeytalbot commented 3 years ago

Yes that's the line, thanks.