cyipt / actdev

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

Update abstreet scenario generation code to work with latest versions of `abstr` package #178

Closed Robinlovelace closed 3 years ago

Robinlovelace commented 3 years ago

Currently this will fail using the latest versions of abstr:

https://github.com/cyipt/actdev/blob/e528051a0a6a85527c1f08c78b5b317bdf955879/code/abstr-scenarios.R#L242-L249

Good news: the latest version of that package will work with origin and destination zones. As documented in https://a-b-street.github.io/abstr/reference/ab_scenario.html the following preprocessing steps enable the input data to work with the new and improved version of abstr:

od = leeds_desire_lines
names(od)[8:10] = c("Walk", "Bike", "Drive")
ablines_dutch = ab_scenario(
  od = od,
  zones = leeds_site_area,
  zones_d = leeds_zones,
  origin_buildings = leeds_houses,
  destination_buildings = leeds_buildings,
  output = "sf"
)

You up for giving this one a bash up some point @natesheehan ? Sorry it's been a bit convoluted: involved various upstream fixes in od, the dev version of which now has the necessary changes.

natesheehan commented 3 years ago

Nice work Robin! thanks for documenting this, I have taken a look this morning and it seems things are running ok. However in playing around, I have found an issue (#179) with some of our desire_line datasets. This should be fixed by rerunning the dev script for the effected sites.

Robinlovelace commented 3 years ago

Great work @natesheehan. Consoling myself on the :soccer: result with some coding :nerd_face:

Robinlovelace commented 3 years ago

I think this is fixed now, right @natesheehan ? Please close if so!

natesheehan commented 3 years ago

Yes this is now working! So lets close this ticket, and today I will rerun the build script re https://github.com/cyipt/actdev/issues/179