Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Robinlovelace opened this issue Jul 10, 2021 · 4 comments

Comments

@Robinlovelace
Copy link
Contributor

Currently this will fail using the latest versions of abstr:

abc = abstr::ab_scenario(
houses,
buildings = buildings_in_zones,
desire_lines = desire_lines %>% filter(purpose == "commute" & all_base > 0),
zones = zones_of_interest,
scenario = "base",
output_format = "sf"
)

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
Copy link
Contributor

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
Copy link
Contributor Author

Great work @natesheehan. Consoling myself on the ⚽ result with some coding 🤓

@Robinlovelace
Copy link
Contributor Author

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

@natesheehan
Copy link
Contributor

Yes this is now working! So lets close this ticket, and today I will rerun the build script re #179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants