ActivitySim / activitysim

An Open Platform for Activity-Based Travel Modeling
https://activitysim.github.io
BSD 3-Clause "New" or "Revised" License
194 stars 99 forks source link

Core Index Names #271

Closed danielsclint closed 4 years ago

danielsclint commented 5 years ago

The core dataframes (e.g., households, persons, and TAZ) seem to all expect that the index is set appropriately in the HDF file before it is read into the ActivitySim injector library. If I've interpreted the correctly, it might be nice at some point to reformulate this framework to include the followings:

  1. Allow the index to be set after the column maps are applied. Using set_index() in lieu of assuming the index is set properly in the HDF file. The code right now only seems to assert a index name rather than mapping the index from an existing column.

https://github.com/ActivitySim/activitysim/blob/7b57c94e12d27a23f86c8988117e885ae754c44e/activitysim/abm/tables/households.py#L89

  1. Allow the index name to be set dynamically in the YAML. For households (household_id) and persons (person_id), this isn't that big of a deal. For land_use, the internal name for the zone name is 'TAZ'. This works well for most use cases, but it may break the thinking if an organization uses a different name for their zonal system.
bstabler commented 5 years ago

Thanks @danielsclint. This is in the next work plan - https://github.com/ActivitySim/activitysim/wiki/Phase-5-Scope-of-Work#task-4-input-and-output-improvements.