-
Notifications
You must be signed in to change notification settings - Fork 21
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
Allow the "run" function to store local columns only #23
Conversation
Note that as suggested by Eddie, the default behavior now is to save local columns only in the base year, and all columns in run years. This changes the original behavior of the run function which saved all columns in the base year. |
This is great, thanks @hanase! Appreciate the adding of docstrings for certain of the run parameters that weren't documented before too. Any thoughts from people about the appropriate defaults for |
I kind of like idea of setting them both to True by default, but am OK with whatever. |
I agree with @bridwell that it would make sense to set both arguments to True by default. Having either of them False might be useful for debugging and exploration, which should not be the default. But I'm also OK with whatever you guys decide. |
Agreed that the most sensible default is setting both arguments to |
Done. Sorry - my commit message is wrong - the argument is set to True now. |
This addresses the issue discussed here (by @janowicz on Feb 21st). Currently the run function writes out all variables regardless if they are used or not which can result in huge files. This happens for both, the base year data as well as every orca iteration, because the write_tables() function simply calls to_frame().
This PR adds two boolean arguments to the run function (out_base_local and out_run_local). If True, only local columns are stored for out_base_tables and out_run_tables, respectively. The write_tables function gets a boolean argument called "local". (Note that after PR #22 of @bridwell is accepted, the write_tables function can pass an expression to to_frame() for obtaining local columns only.)
In our case this change reduces the output file size more than 4 times.
Please feel free to rename the new arguments if needed.