How bayareametro/tm2py-utils works
Project type and purpose
• This is an open-source Python utilities library (“tm2py-utils”) that augments the core Travel Model Two (tm2py) system with post-processing, summarization, and acceptance-criteria workflows.
• It is not a standalone full-stack app but a set of library modules plus command-line scripts and example notebooks that integrate with tm2py and the OpenPaths/EMME API.
File structure
• Top-level:
– tm2py_utils/ (the Python package)
· acceptance/ (core post-processing modules: Canonical, Observed, Simulated, Acceptance)
· scripts/ (CLI wrappers: compare_skims.py, compile_model_runs.py)
– examples/ (sample TOML configs and crosswalk CSV/XLSX files)
– notebooks/ (Jupyter/Tableau workbooks for interactive exploration)
– pyproject.toml & requirements.txt (build and dependency metadata)
• Notice the clear separation between library code, CLI entry points, examples, and exploratory notebooks.
README for additional insights
• Purpose: fast, isolated development of utilities without polluting the core tm2py environment
• Typical workflow: install library → point scripts/modules at scenario_config.toml, model_config.toml, crosswalk and observed_data TOML/CSV files → run through Canonical→Observed→Simulated→Acceptance → produce summary outputs.
• External dependencies: tm2py core repo, OpenPaths EMME API (if installed), standard Python data-science stack.