i-atlas 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- i_atlas-0.1.0/LICENSE +21 -0
- i_atlas-0.1.0/MANIFEST.in +6 -0
- i_atlas-0.1.0/PKG-INFO +193 -0
- i_atlas-0.1.0/PLUGGING_DATA.md +83 -0
- i_atlas-0.1.0/README.md +166 -0
- i_atlas-0.1.0/ROADMAP.md +29 -0
- i_atlas-0.1.0/pyproject.toml +56 -0
- i_atlas-0.1.0/setup.cfg +4 -0
- i_atlas-0.1.0/src/i_atlas.egg-info/PKG-INFO +193 -0
- i_atlas-0.1.0/src/i_atlas.egg-info/SOURCES.txt +26 -0
- i_atlas-0.1.0/src/i_atlas.egg-info/dependency_links.txt +1 -0
- i_atlas-0.1.0/src/i_atlas.egg-info/entry_points.txt +3 -0
- i_atlas-0.1.0/src/i_atlas.egg-info/requires.txt +10 -0
- i_atlas-0.1.0/src/i_atlas.egg-info/top_level.txt +1 -0
- i_atlas-0.1.0/src/iatlas/__init__.py +19 -0
- i_atlas-0.1.0/src/iatlas/__main__.py +4 -0
- i_atlas-0.1.0/src/iatlas/cli.py +117 -0
- i_atlas-0.1.0/src/iatlas/demo.py +67 -0
- i_atlas-0.1.0/src/iatlas/examples/brisbane/README.md +17 -0
- i_atlas-0.1.0/src/iatlas/examples/brisbane/household_types.csv +10 -0
- i_atlas-0.1.0/src/iatlas/examples/brisbane/tour_profiles.csv +6 -0
- i_atlas-0.1.0/src/iatlas/examples/brisbane/zones.csv +13 -0
- i_atlas-0.1.0/src/iatlas/network.py +130 -0
- i_atlas-0.1.0/src/iatlas/synthpop.py +151 -0
- i_atlas-0.1.0/src/iatlas/templates/NETWORK_CHECKLIST.md +11 -0
- i_atlas-0.1.0/src/iatlas/templates/network.yaml +8 -0
- i_atlas-0.1.0/src/iatlas/tours.py +148 -0
- i_atlas-0.1.0/tests/test_smoke.py +26 -0
i_atlas-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Zeke Ahern, Amalan Mahendran, Alexander Paz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
i_atlas-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: i-atlas
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: i-ATLAS: an open activity-based travel demand toolkit with pluggable networks, synthetic populations and tour profiles
|
|
5
|
+
Author: Zeke Ahern, Amalan Mahendran, Alexander Paz
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://pypi.org/user/zahern/
|
|
8
|
+
Project-URL: Repository, https://github.com/zahern/i-atlas
|
|
9
|
+
Keywords: activity-based model,travel demand,synthetic population,transport,road safety
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: numpy>=1.24
|
|
19
|
+
Requires-Dist: pandas>=2.0
|
|
20
|
+
Requires-Dist: PyYAML>=6.0
|
|
21
|
+
Provides-Extra: plot
|
|
22
|
+
Requires-Dist: matplotlib>=3.8; extra == "plot"
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
25
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# i-ATLAS
|
|
29
|
+
|
|
30
|
+
An open activity-based travel demand toolkit for building synthetic
|
|
31
|
+
populations and daily tours on any zonal network. i-ATLAS is the packaged
|
|
32
|
+
form of the i-ATLAS-c framework: it exposes the network contract, population
|
|
33
|
+
synthesis and tour synthesis as reusable Python components, and uses a
|
|
34
|
+
Brisbane example network so the workflow can be run end to end after install.
|
|
35
|
+
|
|
36
|
+
- PyPI user: <https://pypi.org/user/zahern/>
|
|
37
|
+
- Distribution: `i-atlas`
|
|
38
|
+
- Import: `iatlas`
|
|
39
|
+
- CLI: `iatlas` (alias `atlas`)
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install i-atlas
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
For development:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git clone https://github.com/zahern/i-atlas
|
|
51
|
+
cd i-atlas
|
|
52
|
+
pip install -e ".[dev]"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Quickstart
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
iatlas demo brisbane --out demo_brisbane
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
This writes a Brisbane example bundle, synthesises a population and generates
|
|
62
|
+
daily tours and trips:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
demo_brisbane/
|
|
66
|
+
network.yaml
|
|
67
|
+
zones.csv
|
|
68
|
+
household_types.csv
|
|
69
|
+
tour_profiles.csv
|
|
70
|
+
output/
|
|
71
|
+
households.csv
|
|
72
|
+
persons.csv
|
|
73
|
+
tours.csv
|
|
74
|
+
trips.csv
|
|
75
|
+
summary.json
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Validate any bundle:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
iatlas validate demo_brisbane/network.yaml
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Network contract
|
|
85
|
+
|
|
86
|
+
A bundle is a directory with a `network.yaml` and three tables:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
network:
|
|
90
|
+
name: brisbane_demo
|
|
91
|
+
crs: EPSG:28356
|
|
92
|
+
paths:
|
|
93
|
+
zones: zones.csv
|
|
94
|
+
household_types: household_types.csv
|
|
95
|
+
tour_profiles: tour_profiles.csv
|
|
96
|
+
output: output
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### `zones.csv`
|
|
100
|
+
|
|
101
|
+
One row per zone. Required columns:
|
|
102
|
+
|
|
103
|
+
| Column | Meaning |
|
|
104
|
+
|---|---|
|
|
105
|
+
| `zone_id` | Integer or string zone identifier |
|
|
106
|
+
| `zone_name` | Display name |
|
|
107
|
+
| `households` | Household total |
|
|
108
|
+
| `population` | Person total |
|
|
109
|
+
| `workers` | Worker total |
|
|
110
|
+
| `vehicles` | Household vehicle total |
|
|
111
|
+
| `employment` | Jobs total (used as a destination attractor) |
|
|
112
|
+
| `lon`, `lat` | Zone centroid, WGS84 |
|
|
113
|
+
|
|
114
|
+
### `household_types.csv`
|
|
115
|
+
|
|
116
|
+
A small set of household archetypes:
|
|
117
|
+
|
|
118
|
+
| Column | Meaning |
|
|
119
|
+
|---|---|
|
|
120
|
+
| `type_id` | Archetype label |
|
|
121
|
+
| `size` | Persons per household |
|
|
122
|
+
| `workers` | Workers per household |
|
|
123
|
+
| `vehicles` | Vehicles per household |
|
|
124
|
+
| `base_share` | Starting share before IPU |
|
|
125
|
+
|
|
126
|
+
### `tour_profiles.csv`
|
|
127
|
+
|
|
128
|
+
Observed or assumed tour distributions by purpose:
|
|
129
|
+
|
|
130
|
+
| Column | Meaning |
|
|
131
|
+
|---|---|
|
|
132
|
+
| `purpose` | Tour purpose |
|
|
133
|
+
| `share` | Share of tours |
|
|
134
|
+
| `mode_da`, `mode_sr`, `mode_transit`, `mode_walk`, `mode_bike` | Mode shares |
|
|
135
|
+
| `start_mean`, `start_sd` | Start time, minutes after midnight |
|
|
136
|
+
| `duration_mean`, `duration_sd` | Activity duration, minutes |
|
|
137
|
+
| `tours_per_person` | Mean tours per person per day |
|
|
138
|
+
|
|
139
|
+
## Pluggable data
|
|
140
|
+
|
|
141
|
+
The package is deliberately split at the three places where local data differ:
|
|
142
|
+
|
|
143
|
+
1. **Network** (`zones.csv`, `lon`/`lat` or a zone table): replace with any
|
|
144
|
+
zonal system. The demo uses 12 Brisbane SA2-like zones; a full application
|
|
145
|
+
can use 371 SA2 zones or a custom grid.
|
|
146
|
+
2. **Population** (`household_types.csv`): replace the archetypes with the
|
|
147
|
+
household types supported by the local census. The IPU step matches zone
|
|
148
|
+
household, population, worker and vehicle totals.
|
|
149
|
+
3. **Tours** (`tour_profiles.csv`): replace the profiles with local survey
|
|
150
|
+
distributions, or supply a donor tour table with the same columns as
|
|
151
|
+
`output/tours.csv`. The tour generator samples purpose, mode, start time,
|
|
152
|
+
duration and destination from those profiles.
|
|
153
|
+
|
|
154
|
+
The Brisbane example is synthetic and redistributable. HHTS microdata are not
|
|
155
|
+
included. To use HHTS, export the same three tables from the licensed survey,
|
|
156
|
+
point `network.yaml` at them, and run `iatlas synthpop` and `iatlas tours`.
|
|
157
|
+
|
|
158
|
+
## Bring your own data
|
|
159
|
+
|
|
160
|
+
See [PLUGGING_DATA.md](PLUGGING_DATA.md) for the zone, household and tour
|
|
161
|
+
tables, and for how to export the same summaries from HHTS or another
|
|
162
|
+
household travel survey without redistributing microdata.
|
|
163
|
+
|
|
164
|
+
## Python API
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
from iatlas import NetworkBundle, generate_population, generate_tours
|
|
168
|
+
|
|
169
|
+
bundle = NetworkBundle.load("demo_brisbane/network.yaml")
|
|
170
|
+
households, persons = generate_population(bundle, seed=42)
|
|
171
|
+
tours, trips = generate_tours(bundle, persons, seed=42)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Full estimation pipeline
|
|
175
|
+
|
|
176
|
+
The package ships the population and tour components. The full i-ATLAS-c
|
|
177
|
+
estimation and application pipeline (Stages 0-6, route choice, crash models)
|
|
178
|
+
is larger and environment-specific; the companion repository exposes it via
|
|
179
|
+
the original `atlas` CLI and a network-bundle preflight. The tables produced
|
|
180
|
+
here are the input contract for that pipeline.
|
|
181
|
+
|
|
182
|
+
## Publishing
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
python -m build --no-isolation
|
|
186
|
+
twine upload dist/*
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
The PyPI user is <https://pypi.org/user/zahern/>.
|
|
190
|
+
|
|
191
|
+
## License
|
|
192
|
+
|
|
193
|
+
MIT. The Brisbane example data are synthetic and do not contain HHTS records.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Plugging in your own network, population and tours
|
|
2
|
+
|
|
3
|
+
The package is split at the three inputs that differ between studies. Replace
|
|
4
|
+
one table at a time and rerun `iatlas validate` and `iatlas all`.
|
|
5
|
+
|
|
6
|
+
## 1. Zones
|
|
7
|
+
|
|
8
|
+
`zones.csv` is the network definition. Required columns:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
zone_id, zone_name, households, population, workers, vehicles, employment, lon, lat
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
- `zone_id` is any unique key. It is carried through households, persons and
|
|
15
|
+
tours.
|
|
16
|
+
- `households`, `population`, `workers` and `vehicles` are the zone totals used
|
|
17
|
+
by the IPU step.
|
|
18
|
+
- `employment` is the destination attractor.
|
|
19
|
+
- `lon`, `lat` are the zone centroid in WGS84. They are used for the demo
|
|
20
|
+
travel-time calculation and can be replaced by a skim matrix in a full
|
|
21
|
+
application.
|
|
22
|
+
|
|
23
|
+
For an ABS SA2 network, build this table from the SA2 boundary file, the 2021
|
|
24
|
+
Census totals and the land-use employment table. For a grid or a custom zoning,
|
|
25
|
+
use the same columns and any integer or string `zone_id`.
|
|
26
|
+
|
|
27
|
+
## 2. Household types
|
|
28
|
+
|
|
29
|
+
`household_types.csv` is the population archetype table:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
type_id, size, workers, vehicles, base_share
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`base_share` is only a starting point. The IPU step matches each zone's
|
|
36
|
+
household, population, worker and vehicle totals. Replace the archetypes with
|
|
37
|
+
the household-size x workers x vehicles cross-tab from the local census. If
|
|
38
|
+
your census has more categories (for example, age of children), add columns;
|
|
39
|
+
the IPU only uses `size`, `workers` and `vehicles` unless you extend
|
|
40
|
+
`iatlas.synthpop`.
|
|
41
|
+
|
|
42
|
+
## 3. Tours
|
|
43
|
+
|
|
44
|
+
`tour_profiles.csv` is the behavioural input:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
purpose, share, mode_da, mode_sr, mode_transit, mode_walk, mode_bike,
|
|
48
|
+
start_mean, start_sd, duration_mean, duration_sd, tours_per_person
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
To build it from a household travel survey:
|
|
52
|
+
|
|
53
|
+
1. Collapse trips into tours (out-and-back chains anchored at home or work).
|
|
54
|
+
2. Label each tour by primary purpose.
|
|
55
|
+
3. Compute the purpose shares and the mode shares within purpose.
|
|
56
|
+
4. Compute the mean and standard deviation of start time and activity duration.
|
|
57
|
+
5. Compute tours per person per day, including zero-tour persons in the
|
|
58
|
+
denominator if you want the true rate.
|
|
59
|
+
|
|
60
|
+
The package does not ship HHTS records. Export the five summary quantities
|
|
61
|
+
above from the licensed survey and point `tour_profiles.csv` at them.
|
|
62
|
+
|
|
63
|
+
## 4. Full pipeline
|
|
64
|
+
|
|
65
|
+
The population and tour tables are the contract for the full i-ATLAS-c
|
|
66
|
+
estimation and application pipeline:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
output/persons.csv
|
|
70
|
+
output/households.csv
|
|
71
|
+
output/tours.csv
|
|
72
|
+
output/trips.csv
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The companion pipeline consumes these frames, adds network skims and crash
|
|
76
|
+
surfaces, and estimates Stages 0-6. The `ROADMAP.md` lists the layers that will
|
|
77
|
+
be packaged next.
|
|
78
|
+
|
|
79
|
+
## 5. Licence
|
|
80
|
+
|
|
81
|
+
Never commit survey microdata or restricted network data. Commit only the
|
|
82
|
+
aggregated tables or a synthetic example. The Brisbane bundle in this package
|
|
83
|
+
is synthetic and redistributable.
|
i_atlas-0.1.0/README.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# i-ATLAS
|
|
2
|
+
|
|
3
|
+
An open activity-based travel demand toolkit for building synthetic
|
|
4
|
+
populations and daily tours on any zonal network. i-ATLAS is the packaged
|
|
5
|
+
form of the i-ATLAS-c framework: it exposes the network contract, population
|
|
6
|
+
synthesis and tour synthesis as reusable Python components, and uses a
|
|
7
|
+
Brisbane example network so the workflow can be run end to end after install.
|
|
8
|
+
|
|
9
|
+
- PyPI user: <https://pypi.org/user/zahern/>
|
|
10
|
+
- Distribution: `i-atlas`
|
|
11
|
+
- Import: `iatlas`
|
|
12
|
+
- CLI: `iatlas` (alias `atlas`)
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install i-atlas
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
For development:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
git clone https://github.com/zahern/i-atlas
|
|
24
|
+
cd i-atlas
|
|
25
|
+
pip install -e ".[dev]"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Quickstart
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
iatlas demo brisbane --out demo_brisbane
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
This writes a Brisbane example bundle, synthesises a population and generates
|
|
35
|
+
daily tours and trips:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
demo_brisbane/
|
|
39
|
+
network.yaml
|
|
40
|
+
zones.csv
|
|
41
|
+
household_types.csv
|
|
42
|
+
tour_profiles.csv
|
|
43
|
+
output/
|
|
44
|
+
households.csv
|
|
45
|
+
persons.csv
|
|
46
|
+
tours.csv
|
|
47
|
+
trips.csv
|
|
48
|
+
summary.json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Validate any bundle:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
iatlas validate demo_brisbane/network.yaml
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Network contract
|
|
58
|
+
|
|
59
|
+
A bundle is a directory with a `network.yaml` and three tables:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
network:
|
|
63
|
+
name: brisbane_demo
|
|
64
|
+
crs: EPSG:28356
|
|
65
|
+
paths:
|
|
66
|
+
zones: zones.csv
|
|
67
|
+
household_types: household_types.csv
|
|
68
|
+
tour_profiles: tour_profiles.csv
|
|
69
|
+
output: output
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### `zones.csv`
|
|
73
|
+
|
|
74
|
+
One row per zone. Required columns:
|
|
75
|
+
|
|
76
|
+
| Column | Meaning |
|
|
77
|
+
|---|---|
|
|
78
|
+
| `zone_id` | Integer or string zone identifier |
|
|
79
|
+
| `zone_name` | Display name |
|
|
80
|
+
| `households` | Household total |
|
|
81
|
+
| `population` | Person total |
|
|
82
|
+
| `workers` | Worker total |
|
|
83
|
+
| `vehicles` | Household vehicle total |
|
|
84
|
+
| `employment` | Jobs total (used as a destination attractor) |
|
|
85
|
+
| `lon`, `lat` | Zone centroid, WGS84 |
|
|
86
|
+
|
|
87
|
+
### `household_types.csv`
|
|
88
|
+
|
|
89
|
+
A small set of household archetypes:
|
|
90
|
+
|
|
91
|
+
| Column | Meaning |
|
|
92
|
+
|---|---|
|
|
93
|
+
| `type_id` | Archetype label |
|
|
94
|
+
| `size` | Persons per household |
|
|
95
|
+
| `workers` | Workers per household |
|
|
96
|
+
| `vehicles` | Vehicles per household |
|
|
97
|
+
| `base_share` | Starting share before IPU |
|
|
98
|
+
|
|
99
|
+
### `tour_profiles.csv`
|
|
100
|
+
|
|
101
|
+
Observed or assumed tour distributions by purpose:
|
|
102
|
+
|
|
103
|
+
| Column | Meaning |
|
|
104
|
+
|---|---|
|
|
105
|
+
| `purpose` | Tour purpose |
|
|
106
|
+
| `share` | Share of tours |
|
|
107
|
+
| `mode_da`, `mode_sr`, `mode_transit`, `mode_walk`, `mode_bike` | Mode shares |
|
|
108
|
+
| `start_mean`, `start_sd` | Start time, minutes after midnight |
|
|
109
|
+
| `duration_mean`, `duration_sd` | Activity duration, minutes |
|
|
110
|
+
| `tours_per_person` | Mean tours per person per day |
|
|
111
|
+
|
|
112
|
+
## Pluggable data
|
|
113
|
+
|
|
114
|
+
The package is deliberately split at the three places where local data differ:
|
|
115
|
+
|
|
116
|
+
1. **Network** (`zones.csv`, `lon`/`lat` or a zone table): replace with any
|
|
117
|
+
zonal system. The demo uses 12 Brisbane SA2-like zones; a full application
|
|
118
|
+
can use 371 SA2 zones or a custom grid.
|
|
119
|
+
2. **Population** (`household_types.csv`): replace the archetypes with the
|
|
120
|
+
household types supported by the local census. The IPU step matches zone
|
|
121
|
+
household, population, worker and vehicle totals.
|
|
122
|
+
3. **Tours** (`tour_profiles.csv`): replace the profiles with local survey
|
|
123
|
+
distributions, or supply a donor tour table with the same columns as
|
|
124
|
+
`output/tours.csv`. The tour generator samples purpose, mode, start time,
|
|
125
|
+
duration and destination from those profiles.
|
|
126
|
+
|
|
127
|
+
The Brisbane example is synthetic and redistributable. HHTS microdata are not
|
|
128
|
+
included. To use HHTS, export the same three tables from the licensed survey,
|
|
129
|
+
point `network.yaml` at them, and run `iatlas synthpop` and `iatlas tours`.
|
|
130
|
+
|
|
131
|
+
## Bring your own data
|
|
132
|
+
|
|
133
|
+
See [PLUGGING_DATA.md](PLUGGING_DATA.md) for the zone, household and tour
|
|
134
|
+
tables, and for how to export the same summaries from HHTS or another
|
|
135
|
+
household travel survey without redistributing microdata.
|
|
136
|
+
|
|
137
|
+
## Python API
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
from iatlas import NetworkBundle, generate_population, generate_tours
|
|
141
|
+
|
|
142
|
+
bundle = NetworkBundle.load("demo_brisbane/network.yaml")
|
|
143
|
+
households, persons = generate_population(bundle, seed=42)
|
|
144
|
+
tours, trips = generate_tours(bundle, persons, seed=42)
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Full estimation pipeline
|
|
148
|
+
|
|
149
|
+
The package ships the population and tour components. The full i-ATLAS-c
|
|
150
|
+
estimation and application pipeline (Stages 0-6, route choice, crash models)
|
|
151
|
+
is larger and environment-specific; the companion repository exposes it via
|
|
152
|
+
the original `atlas` CLI and a network-bundle preflight. The tables produced
|
|
153
|
+
here are the input contract for that pipeline.
|
|
154
|
+
|
|
155
|
+
## Publishing
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
python -m build --no-isolation
|
|
159
|
+
twine upload dist/*
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The PyPI user is <https://pypi.org/user/zahern/>.
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
MIT. The Brisbane example data are synthetic and do not contain HHTS records.
|
i_atlas-0.1.0/ROADMAP.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
`i-atlas` 0.1 ships the network contract and the population/tour core:
|
|
4
|
+
|
|
5
|
+
- network bundle loading and validation,
|
|
6
|
+
- household/person synthesis by IPU,
|
|
7
|
+
- tour and trip synthesis from purpose profiles,
|
|
8
|
+
- a runnable Brisbane example.
|
|
9
|
+
|
|
10
|
+
The full i-ATLAS-c estimation stack is the next layer:
|
|
11
|
+
|
|
12
|
+
1. **Network skims** - build time, distance and crash matrices from a road
|
|
13
|
+
network and zone connectors. The input contract is the same `zones.csv`
|
|
14
|
+
plus a link table.
|
|
15
|
+
2. **Crash models** - segment-level crash-frequency models with Empirical
|
|
16
|
+
Bayes blending; write the zone and route crash surfaces.
|
|
17
|
+
3. **Route choice** - fastest, balanced and safest alternatives; route logsum
|
|
18
|
+
by person type. This is where the calibrated or estimated safety weight
|
|
19
|
+
enters.
|
|
20
|
+
4. **Stage 0-4 models** - daily pattern, frequency, budget, duration and
|
|
21
|
+
scheduling. These can be added as optional estimators with a common
|
|
22
|
+
`fit`/`predict` interface.
|
|
23
|
+
5. **Stage 5-6** - tour mode and destination, trip destination, repair and
|
|
24
|
+
export.
|
|
25
|
+
6. **Application** - synthetic population, model application, calibration and
|
|
26
|
+
validation reports.
|
|
27
|
+
|
|
28
|
+
Each layer will be an optional extra so the base install stays light. The
|
|
29
|
+
population and tour tables are the stable contract between layers.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "i-atlas"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "i-ATLAS: an open activity-based travel demand toolkit with pluggable networks, synthetic populations and tour profiles"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Zeke Ahern" },
|
|
14
|
+
{ name = "Amalan Mahendran" },
|
|
15
|
+
{ name = "Alexander Paz" },
|
|
16
|
+
]
|
|
17
|
+
keywords = [
|
|
18
|
+
"activity-based model",
|
|
19
|
+
"travel demand",
|
|
20
|
+
"synthetic population",
|
|
21
|
+
"transport",
|
|
22
|
+
"road safety",
|
|
23
|
+
]
|
|
24
|
+
classifiers = [
|
|
25
|
+
"Programming Language :: Python :: 3",
|
|
26
|
+
"Programming Language :: Python :: 3.10",
|
|
27
|
+
"Programming Language :: Python :: 3.11",
|
|
28
|
+
"Programming Language :: Python :: 3.12",
|
|
29
|
+
"Topic :: Scientific/Engineering",
|
|
30
|
+
]
|
|
31
|
+
dependencies = [
|
|
32
|
+
"numpy>=1.24",
|
|
33
|
+
"pandas>=2.0",
|
|
34
|
+
"PyYAML>=6.0",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[project.optional-dependencies]
|
|
38
|
+
plot = ["matplotlib>=3.8"]
|
|
39
|
+
dev = ["pytest>=7", "build>=1.0"]
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
Homepage = "https://pypi.org/user/zahern/"
|
|
43
|
+
Repository = "https://github.com/zahern/i-atlas"
|
|
44
|
+
|
|
45
|
+
[project.scripts]
|
|
46
|
+
iatlas = "iatlas.cli:main"
|
|
47
|
+
atlas = "iatlas.cli:main"
|
|
48
|
+
|
|
49
|
+
[tool.setuptools]
|
|
50
|
+
package-dir = { "" = "src" }
|
|
51
|
+
|
|
52
|
+
[tool.setuptools.packages.find]
|
|
53
|
+
where = ["src"]
|
|
54
|
+
|
|
55
|
+
[tool.setuptools.package-data]
|
|
56
|
+
iatlas = ["examples/brisbane/*.csv", "examples/brisbane/*.md", "templates/*.yaml", "templates/*.md"]
|
i_atlas-0.1.0/setup.cfg
ADDED