feat: allow weights to be used for aggregation#19
Conversation
…onfigs For example: ```yaml [base] directory = "data/vista" weight='weight' ```
|
Hi @asiripanich, First of all, thank you for making this fantastic comparison tool publicly available — it's truly a must-have! I have a suggestion that I believe could be relatively straightforward to implement, given your coding expertise, and it could save users a lot of time. Currently, users need to manually add a weight column to the final_persons, final_households, final_tours, and final_trips tables that ActivitySim generates in order to use the weighting capabilities. While it's great that the tool supports different weights per table, many users may end up simply applying a single household weight across all tables. To streamline this, I suggest leveraging the sample_rate column that is already generated by ActivitySim in the households table. You could provide an option to automatically use sample_rate as the weight for all tables — if the column exists — and fall back to user-provided weights otherwise. This approach would eliminate the need for additional data preparation while retaining the flexibility for more advanced users to specify custom weights per table if they choose. Happy to hear your thoughts on this! |
The weight column in each table should have the same name.
activitysim-dashboard/dashboard-configs.toml
Lines 7 to 9 in 26a90fb
Added Total Variation Distance as a metric to compare two probability distributions.