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

create step to load input tables from CSV files #248

Closed
bstabler opened this issue Jan 25, 2019 · 1 comment
Closed

create step to load input tables from CSV files #248

bstabler opened this issue Jan 25, 2019 · 1 comment
Assignees

Comments

@bstabler
Copy link
Contributor

Instead of starting with an HDF5 file containing the following inputs:

  • tazData.csv
  • accessibility.csv
  • hhFile.csv
  • personFile.csv

We'll add them to the settings file and read them in via a new model step. The current script that does this outside of a formal activitysim run is at https://github.com/ActivitySim/activitysim/blob/shadow/scripts/mtc_inputs.py.

@bstabler bstabler changed the title create input table loader step create step to load inputs tables from CSV files Apr 16, 2019
@bstabler bstabler changed the title create step to load inputs tables from CSV files create step to load input tables from CSV files Apr 16, 2019
@blakerosenthal
Copy link
Contributor

blakerosenthal commented Dec 10, 2019

Task Spec

PopulationSim currently includes a robust model step called input_pre_processor that does a great job handling CSV inputs. CSVs are read from the data folder and loaded as injected tables according to the input_table_list specified in the settings config.

We will move this step to the ActivitySim package then reimport to PopulationSim.

In ActivitySim, three components will be affected:

  • settings.yaml
    • we will add the option to specify an input_table_list similar to the current PopulationSim feature.
    • input_store can still be used to specify an HDF5 input file.
    • a create_input_file option will be added to build an HDF5 file from the input CSVs. This file can be used in subsequent model runs for faster load times.
  • input_pre_processor
    • this step will precede all other steps and inject all tables specified in settings.yaml.
    • the existing input_store code will be incorporated into this step and expanded to allow the user to specify exact table names and indices in HDF5 as well as CSV inputs. (This also resolves Core Index Names #271).
    • we will log every table name and its index and shape at load time for debugging purposes.
  • households, landuse, and persons tables will all be simplified to use the pre-injected tables instead of loading them on the fly.

Additionally:

  • we will add a minimum of two unit tests for the input_pre_processor step to ensure correct behavior for both HDF5 and CSV input types.
  • we will update inline code comments and RST docs to reflect these changes.

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

3 participants