ual / ual_model_workspace

Repo for building a clean UrbanSim model for the Bay Area
BSD 3-Clause "New" or "Revised" License
2 stars 4 forks source link

Replace relative path in Explore-data.ipynb with orca-specified DATA_DIR injectable #18

Closed mxndrwgrdnr closed 6 years ago

mxndrwgrdnr commented 6 years ago

Now that we are hosting the data in a central location on Rome, we should update all model steps that reference the location of the data directory to reference the orca injectable DATA_DIR rather than a relative path. Specifically, the build_network() step as defined here will cause problems down the line if a user follows the instructions here to override the standard data directory. We should fix those two lines, and any other places where a relative path to a data directory is located.

smmaurer commented 6 years ago

Good catch, I missed those paths in #9. Feel free to fix this, or i can take care of it. The prior fixes in datasources.py can be a model: datasources.py#L11-L26

@mxndrwgrdnr, is DATA_DIR an injectable that already handles this, or are you referring to the data_directory injectable that i set up in this repo? I did a little digging just now for prior approaches to handling data location overrides, and don't see much. Here's some code in urbansim that codifies /data as the standard location, though, which is good to know about: urbansim.utils.misc.

mxndrwgrdnr commented 6 years ago

Sorry I'm not sure what corner of my brain I pulled DATA_DIR from. Definitely meant data_directory. I'll take care of this and submit a PR.