02TODLab - TOD and Traffic Lab

User manual, version 0.1.2 (16 November 2026). QGIS 3.28 to 4.x, Qt5 and Qt6. GPL-2.0-or-later.

Overview

02TODLab carries the routine evidence base of a municipal transport office from raw tables to styled maps and one documented report: station-area assessment for transit-oriented development (TOD), traffic counts to annual average daily traffic (AADT), motorised, pedestrian, bicycle and walkway level of service (LOS), and kerb-parking surveys. It works in one dock panel and through 20 Processing algorithms. It needs nothing beyond QGIS (NumPy and the Python standard library ship with it) and makes no network request: GTFS feeds, counts and surveys are read from local files or layers.

All metric work happens in a projected CRS in metres. A geographic or non-metric input is reprojected to the UTM zone of its extent centre; outputs are written in that working CRS and the log says so. Traffic equations calibrated in US units (ft, mph, pc/mi/ln\mathrm{pc/mi/ln}) are evaluated in those units and reported in both SI and US units.

Why this plugin

Station-area TOD assessment, traffic-count processing, level-of-service screening and parking surveys are the routine evidence base of a municipal transport office, yet none of them has a QGIS tool that carries the work from raw tables to a map and a documented result. On the QGIS plugin repository (searched 14 November 2026) there is no plugin for the node-place model or a TOD index, none that turns counts into AADT and none that computes HCM-style level of service. The nearest neighbours answer different questions: Parking Spaces locates garages and street parking that could move into them; ParkSense Metrics estimates supply and parking pressure from footprints and points of interest; Traffica UE Analytics and QAequilibraE model demand and assignment; UrbanSafeID screens road safety; OS-WALK-EU and Walk Potential score walkability. Outside QGIS the work is scattered across a browser tool for one metro corridor (TODSphere), an inactive R package (MMLOS), city-specific notebooks (Toronto's Traffic Prophet) and research code.

02TODLab is one panel plus Processing tools for four jobs: (1) station catchments (buffer, network pedshed or your polygons), 5D built-environment indicators, Bertolini's node-place model with GTFS-derived node indicators and a composite TOD index with equal, AHP or PCA weights; (2) traffic-count quality control, AADT at continuous stations (AASHTO and the TMG 2022 hour-based procedure), factor groups, short-count expansion, KK, DD and PHF\mathrm{PHF}, and AADT mapped onto road segments with a log-linear model for uncounted links; (3) motorised LOS (basic freeway and multilane density, urban street speed ratio, v/cv/c) from that AADT, plus pedestrian, bicycle and walkway LOS; (4) a kerb-parking survey (inventory, occupancy by beat, the 85 % rule, turnover, duration, overstay from privacy-hashed plates, demand-responsive pricing, spare capacity within walking reach) on block-face geometry with a temporal layer. It analyses observed data only: it does not estimate demand from land-use rates, assign traffic or compute level of traffic stress.

Install

In QGIS: Plugins › Manage and Install Plugins, search for 02TODLab, install. From a release zip: Plugins › Manage and Install Plugins › Install from ZIP. Requirements: QGIS 3.28 or later (QGIS 4 included). The toolbar button opens the dock; the algorithms appear in the Processing Toolbox under 02TODLab.

Quick start with the demo

  1. Click the 02TODLab toolbar button. The dock opens on the Project page.
  2. Press Load demo district. A synthetic district in EPSG:32635 is added in a 02TODLab demo group: 8 stations, residents, jobs, land use, streets, transit stops and a GTFS feed for Wednesday 12 March 2025; 6 continuous and 4 short count stations with a full 2025 hourly table and 60 road segments; 12 block faces with hourly beats 08:00-17:00 and hashed plate sightings. Every page is pre-filled.
  3. Open TOD and press Run; then Counts & AADT, Level of service and Parking in turn. Each run is a background task with a progress bar and a Cancel button; results go to a 02TODLab layer group with one sub-group per module.
  4. Open Report and write the HTML report, the CSV tables or one GeoPackage.

In Processing, run Demo district to get the same layers (and the GTFS zip), then TOD and traffic lab (all modules) or any single tool on them. The values the analysis must recover are planted in the generator; see the worked example.

The dock, page by page

A dark icon rail on the left of the dock switches pages; Help is pinned at the bottom. Each page is a column of numbered steps followed by a results card. Every indicator, letter chip and method has a tooltip with its formula and reference.

1. Project

(1) Units and working CRS: SI or US customary units for the LOS pages; a badge shows the working CRS of the current station layer and why it was chosen. (2) Demo district: load or remove it. (3) Modules: one card per module (TOD, AADT, LOS, Parking) showing not run or done with a key number; a click opens the page.

2. TOD

(1) Stations: point layer and id field. (2) Catchments: radius chips (400 m, 800 m or your own), an optional network pedshed with the street layer and budget, or a polygon layer joined by station id. (3) Data layers: residents, jobs, dwellings (points or polygons, polygons areal-weighted), land use with its category field, destinations with a weight and the Hansen β\beta, transit stops, and the street type field for the pedestrian share. (4) GTFS node indicators: zip file, service date and time window. (5) Node-place model: pick node and place indicators and their weights. (6) Composite TOD index: indicators, a cost toggle per indicator, normalisation and weighting chips (equal, manual, AHP, PCA). AHP opens a pairwise matrix editor: a Saaty 1-9 combo per upper cell, reciprocals filled below and a live consistency-ratio gauge that turns red when CR>0.10\mathrm{CR} > 0.10; the run refuses an inconsistent matrix. (7) Run. Results: the node-place diagram (balance band, stress and dependency corners, stations coloured by class), KPI cards (stations, balanced share, top score), a ranked table and the station map styled by class.

3. Counts & AADT

(1) Count stations: point layer with id, and optional kind (ccs / short), factor group and segment id fields. (2) Hourly counts: a CSV file or a table, with a column mapping and the hour-ending switch. (3) Quality check: an issue table and a calendar heat strip per station (flags only). (4) AADT method and factor groups: hour-based TMG 2022, AASHTO or simple; groups from a field or k-means. (5) Road segments and the model: snap tolerance and model covariates. Results: KPI cards (stations, continuous, short, segments counted and modelled, LOOCV MAPE), monthly and day-of-week factor charts per group, the ranked-hour curve with the 30th hour marked, and the AADT map (line width by AADT, dashes for modelled links).

4. Level of service

Two tabs. Motorised: segments and facility field (or a default), KK, DD and PHF\mathrm{PHF} from the AADT result or typed, ETE_T, speed limit, free-flow and observed speed fields, urban lane capacity. Results: an LOS distribution bar, the map coloured by letter and a table of LOS F segments. Pedestrian & bicycle: a column-mapping table (streetlos column, meaning, unit, layer field), units, the platoon switch and an override editor for any breakpoint table. Results: side-by-side letter bars and a flags list.

5. Parking

(1) Block faces and inventory: id, spaces, zone, space type, facility, time limit, unavailable windows and rate fields. (2) Occupancy counts: a CSV file or table with face, beat and vehicles columns. (3) Plate survey (optional): sightings with hashed tokens, or raw plates with a salt (password field, New salt button, Hash the raw CSV tool), beat length and gap tolerance. (4) Targets and pricing: target occupancy (default 85 %), practical factors, pricing policy and rate period. Results: KPI cards (spaces, peak occupancy, faces above target, turnover, overstay share), the accumulation curve, a zone ×\times hour heat map, the recommended rate table and the map styled by peak occupancy with a break at the target; the occupancy-by-beat layer is temporal, so the Temporal Controller animates it. (5) Spare capacity near destinations: destinations, walking radius, optional streets and a beat.

6. Report

Choose the modules, the folder and the file stem; write one self-contained HTML report (inline CSS, SVG charts and an offline KaTeX bundle that typesets every formula; no remote resource), one CSV per result layer, or one GeoPackage with every result layer.

Help

A short guide per page, the method references, the calibration and copyright note, and links to this manual and the repository.

Methods and formulas

Symbols are defined under each equation. Traffic models calibrated in US units take widths in ft, speeds in mph and densities in pc/mi/ln\mathrm{pc/mi/ln}; the plugin converts SI inputs before evaluating them and reports both.

TOD

Catchments

Euclidean buffers of r=400 mr = 400\,\mathrm{m} and r=800 mr = 800\,\mathrm{m} (5- and 10-minute walk; Guerra et al. 2012) are built as equal-area polygons whose area is exactly πr2\pi r^2. Network pedsheds come from a walk graph of the streets: both directions are walked, un-noded T-junctions are split, the station's connector to the nearest street is subtracted from the budget, the last edge is trimmed at the exact budget point, and the reached pieces are buffered and dissolved. User polygons are joined by station id. The pedshed ratio (Calthorpe 1993; Porta & Renne 2005) is

Rped=Apedπr2(1)R_{\mathrm{ped}} = \frac{A_{\mathrm{ped}}}{\pi r^{2}} \tag{1}

where ApedA_{\mathrm{ped}} is the area of the network pedshed (m2\mathrm{m^2}) and rr the walking budget (m).

Areal weighting

A polygon count (residents, jobs, dwellings) is shared among catchments in proportion to area (Goodchild & Lam 1980):

xC=∑PxP ∣P∩C∣∣P∣(2)x_{C} = \sum_{P} x_{P}\,\frac{\lvert P \cap C \rvert}{\lvert P \rvert} \tag{2}

where xPx_P is the value carried by source polygon PP, CC the catchment and ∣⋅∣\lvert\cdot\rvert the area.

5D indicators

After Cervero & Kockelman (1997) and Ewing & Cervero (2010): residents PP, jobs JJ and dwellings and their densities per hectare of catchment area ACA_C; activity density (P+J)/AC(P + J)/A_C in ha−1\mathrm{ha^{-1}}; street length and intersection density (nodes of degree ≥3\ge 3) per km2\mathrm{km^2}; pedestrian street share; destinations; transit stops; nearest station. Land-use mix is the normalised Shannon entropy (Frank et al. 2004):

E=−∑k=1Kpkln⁡pkln⁡K(3)E = -\frac{\sum_{k=1}^{K} p_{k} \ln p_{k}}{\ln K} \tag{3}

where pkp_k is the share of land use kk in the catchment (by area for polygons, by weight for points) and KK the number of land-use categories in the study; E=0E = 0 when K<2K < 2 and E∈[0,1]E \in [0, 1].

B=1−∣J−rP∣J+rP(4)B = 1 - \frac{\lvert J - rP \rvert}{J + rP} \tag{4}

where JJ and PP are the jobs and residents of the catchment and rr the regional jobs per resident (or the value given); B=1B = 1 is the regional balance, B=0B = 0 a catchment with only jobs or only residents.

Gi=∑dwd e−β did(5)G_{i} = \sum_{d} w_{d}\, e^{-\beta\, d_{id}} \tag{5}

is the Hansen (1959) gravity accessibility of station ii, where wdw_d is the weight of destination dd inside the catchment, didd_{id} its distance to the station (m) and β\beta the decay per metre (β>0\beta > 0 enables it). The population-weighted mean distance to the station is dˉ=∑pnpdp/∑pnp\bar{d} = \sum_{p} n_{p} d_{p} / \sum_{p} n_{p} over resident features pp with count npn_p (network distance in a pedshed).

Node indicators from GTFS

Distinct trips boarding in the window, distinct routes, distinct modes (route_type), the busiest clock hour, and the mean headway of the most frequent route and direction, h=Tw/nmax⁡h = T_{w} / n_{\max}, with TwT_w the window length (min) and nmax⁡n_{\max} the departures of that route and direction in the window. Stops within 150 m, and stops sharing a parent_station, belong to a station.

Node-place model

Bertolini (1999). Each indicator is min-max normalised over the stations, x~k=(xk−xk,min⁡)/(xk,max⁡−xk,min⁡)\tilde{x}_{k} = (x_{k} - x_{k,\min}) / (x_{k,\max} - x_{k,\min}) (a constant indicator maps to 0.5), and the node and place indices are weighted means

N=∑k∈Nwk x~k,L=∑k∈Lwk x~k,∑kwk=1(6)N = \sum_{k \in \mathcal{N}} w_{k}\, \tilde{x}_{k}, \qquad L = \sum_{k \in \mathcal{L}} w_{k}\, \tilde{x}_{k}, \qquad \sum_{k} w_{k} = 1 \tag{6}

where N\mathcal{N} and L\mathcal{L} are the node and place indicator sets and wkw_k their weights (equal unless given, rescaled to sum to one). Stations are classed by

class={unsustained nodeN−L>δunsustained placeL−N>δstress∣N−L∣≤δ and 12(N+L)≥sdependency∣N−L∣≤δ and 12(N+L)≤dbalancedotherwise(7)\text{class} = \begin{cases} \text{unsustained node} & N - L > \delta \\ \text{unsustained place} & L - N > \delta \\ \text{stress} & \lvert N - L \rvert \le \delta \text{ and } \tfrac{1}{2}(N + L) \ge s \\ \text{dependency} & \lvert N - L \rvert \le \delta \text{ and } \tfrac{1}{2}(N + L) \le d \\ \text{balanced} & \text{otherwise} \end{cases} \tag{7}

with balance band δ=0.2\delta = 0.2, stress threshold s=0.7s = 0.7 and dependency threshold d=0.3d = 0.3. These thresholds are package conventions (Reusser et al. 2008; Vale 2015).

Composite TOD index

OECD & JRC (2008). Each indicator is normalised by min-max, z=(x−xmin⁡)/(xmax⁡−xmin⁡)z = (x - x_{\min})/(x_{\max} - x_{\min}), or z-score, z=(x−xˉ)/sxz = (x - \bar{x})/s_x with the sample standard deviation; a cost indicator (lower is better) is inverted, z=(xmax⁡−x)/(xmax⁡−xmin⁡)z = (x_{\max} - x)/(x_{\max} - x_{\min}) or z=−(x−xˉ)/sxz = -(x - \bar{x})/s_x. The score of station ii is

Si=∑k=1mwk zik,∑k=1mwk=1(8)S_{i} = \sum_{k=1}^{m} w_{k}\, z_{ik}, \qquad \sum_{k=1}^{m} w_{k} = 1 \tag{8}

with weights equal, manual, AHP or PCA. Rank 1 is the highest score; ties share the best rank.

AHP (Saaty 1980): w\mathbf{w} is the normalised principal eigenvector of the reciprocal pairwise matrix AA, Aw=λmax⁡wA\mathbf{w} = \lambda_{\max}\mathbf{w}, with

CI=λmax⁡−nn−1,CR=CIRIn(9)\mathrm{CI} = \frac{\lambda_{\max} - n}{n - 1}, \qquad \mathrm{CR} = \frac{\mathrm{CI}}{\mathrm{RI}_{n}} \tag{9}

where λmax⁡\lambda_{\max} is estimated as the mean of (Aw)i/wi(A\mathbf{w})_i / w_i, nn is the number of criteria and RIn\mathrm{RI}_n Saaty's random index; a matrix with CR>0.10\mathrm{CR} > 0.10 is refused.

PCA: the eigen-decomposition of the indicator correlation matrix keeps the components with eigenvalue λc>1\lambda_c > 1 (at least one, unrotated). With loadings ℓkc=vkcλc\ell_{kc} = v_{kc}\sqrt{\lambda_c},

wk∝max⁡c(ℓkc2∑jℓjc2⋅λc∑c′λc′)(10)w_{k} \propto \max_{c} \left( \frac{\ell_{kc}^{2}}{\sum_{j} \ell_{jc}^{2}} \cdot \frac{\lambda_{c}}{\sum_{c'} \lambda_{c'}} \right) \tag{10}

where vkcv_{kc} is the eigenvector entry of indicator kk on retained component cc; the weights are then rescaled to sum to one.

Counts and AADT

Quality control

Flags only, the data are never changed: missing hours, zero runs (6 h), constant runs (4 h), a ceiling, and robust outliers within each day-of-week ×\times hour group (Iglewicz & Hoaglin 1993):

z=0.6745 ∣x−x~∣MAD,MAD=median⁡∣x−x~∣,flag if z>5(11)z = \frac{0.6745\, \lvert x - \tilde{x} \rvert}{\mathrm{MAD}}, \qquad \mathrm{MAD} = \operatorname{median} \lvert x - \tilde{x} \rvert, \qquad \text{flag if } z > 5 \tag{11}

where xx is the hourly volume and x~\tilde{x} the median of its group.

AADT at continuous stations

AASHTO method (FHWA TMG 2013 §3.2.1; AASHTO 2009):

AADT=17∑i=17[112∑j=112(1nij∑k=1nijVOLijk)](12)\mathrm{AADT} = \frac{1}{7} \sum_{i=1}^{7} \left[ \frac{1}{12} \sum_{j=1}^{12} \left( \frac{1}{n_{ij}} \sum_{k=1}^{n_{ij}} \mathrm{VOL}_{ijk} \right) \right] \tag{12}

where VOLijk\mathrm{VOL}_{ijk} is the daily traffic of the kk-th occurrence of day of week ii in month jj and nijn_{ij} the number of such days with data; the inner mean is the monthly average day of week MADW\mathrm{MADW}.

Hour-based procedure (FHWA TMG 2022 §3.1.4.7):

MADTm=∑jwjm∑h=023(1nhjm∑iVOLihjm)∑jwjm,AADT=∑mdm MADTm∑mdm(13)\mathrm{MADT}_{m} = \frac{\sum_{j} w_{jm} \sum_{h=0}^{23} \left( \frac{1}{n_{hjm}} \sum_{i} \mathrm{VOL}_{ihjm} \right)}{\sum_{j} w_{jm}}, \qquad \mathrm{AADT} = \frac{\sum_{m} d_{m}\, \mathrm{MADT}_{m}}{\sum_{m} d_{m}} \tag{13}

where VOLihjm\mathrm{VOL}_{ihjm} is the volume of hour hh on the ii-th day of week jj in month mm, nhjmn_{hjm} the number of such hours with data, wjmw_{jm} the number of times day of week jj occurs in month mm of the year (4 or 5) and dmd_m the number of days in month mm.

Factors and factor groups

Monthly fm=AADT/MADTmf_{m} = \mathrm{AADT}/\mathrm{MADT}_{m}, day-of-week fj=AADT/ADTjf_{j} = \mathrm{AADT}/\mathrm{ADT}_{j} and month ×\times day-of-week fmj=AADT/MADWmjf_{mj} = \mathrm{AADT}/\mathrm{MADW}_{mj}. A group factor is the mean fˉ\bar{f} over its nn stations, with relative precision (TMG 2022 §3.1.4.5, §3.2.6.2)

RP=t0.975, n−1  sfn  fˉ(14)\mathrm{RP} = \frac{t_{0.975,\,n-1}\; s_{f}}{\sqrt{n}\; \bar{f}} \tag{14}

where sfs_f is the sample standard deviation of the station factors and t0.975, n−1t_{0.975,\,n-1} the two-sided 95 % Student tt value. Groups come from a field or from k-means on the monthly factors (NCHRP Research Report 1081, as a reviewable starting point).

Short counts

AADT=VOL24⋅M⋅D⋅A⋅G,A=VNax/2,G=(1+r)t(15)\mathrm{AADT} = \mathrm{VOL}_{24} \cdot M \cdot D \cdot A \cdot G, \qquad A = \frac{V}{N_{\mathrm{ax}}/2}, \qquad G = (1 + r)^{t} \tag{15}

where VOL24\mathrm{VOL}_{24} is a 24-hour volume, MM the monthly and DD the day-of-week factor of the group, AA the axle correction from VV vehicles and NaxN_{\mathrm{ax}} axles, GG the growth factor for annual rate rr over tt years; the estimate is averaged over the complete days (TMG 2022 §3.2.8). The TMG worked example 518×0.95×1.24≈610518 \times 0.95 \times 1.24 \approx 610 is a test.

Design hour

K=V30AADT,DDHV=AADT⋅K⋅D,PHF=V4 V15(16)K = \frac{V_{30}}{\mathrm{AADT}}, \qquad \mathrm{DDHV} = \mathrm{AADT} \cdot K \cdot D, \qquad \mathrm{PHF} = \frac{V}{4\, V_{15}} \tag{16}

where V30V_{30} is the 30th highest hourly volume of the year, DD the peak-direction share at that hour, VV the volume of that hour and V15V_{15} its highest 15-minute count. PHF\mathrm{PHF} needs 15-minute counts (a short count: at its peak hour); from hourly tables it stays NULL and the segment uses the default 0.92.

Station to segment and uncounted links

Stations join segments by a shared id field, else the nearest segment within the snap tolerance; directional stations on one segment are summed; an unmatched station is listed. Uncounted links use a log-linear model fitted by OLS (Mohamad et al. 1998; Zhao & Chung 2001):

ln⁡AADTi=xi⊤β+εi(17)\ln \mathrm{AADT}_{i} = \mathbf{x}_{i}^{\top} \boldsymbol{\beta} + \varepsilon_{i} \tag{17}

where xi\mathbf{x}_i holds an intercept, functional-class dummies, lanes, speed limit and optionally ln⁡(P500+1)\ln(P_{500} + 1) with P500P_{500} the population within 500 m. Retransformation uses Duan's (1983) smearing factor and the 95 % prediction interval is

S=1n∑i=1neε^i,exp⁡ ⁣(x⊤β^±t0.975, n−p s1+x⊤(X⊤X)−1x) S(18)S = \frac{1}{n} \sum_{i=1}^{n} e^{\hat{\varepsilon}_{i}}, \qquad \exp\!\Big( \mathbf{x}^{\top} \hat{\boldsymbol{\beta}} \pm t_{0.975,\,n-p}\, s \sqrt{1 + \mathbf{x}^{\top} (X^{\top} X)^{-1} \mathbf{x}} \Big)\, S \tag{18}

where ε^i\hat{\varepsilon}_i are the residuals, nn the counted segments, pp the parameters, ss the residual standard error and XX the design matrix; the point estimate is ex⊤β^ Se^{\mathbf{x}^{\top}\hat{\boldsymbol{\beta}}}\, S. Leave-one-out residuals ε^i/(1−hii)\hat{\varepsilon}_{i} / (1 - h_{ii}), with leverage hii=xi⊤(X⊤X)−1xih_{ii} = \mathbf{x}_{i}^{\top} (X^{\top} X)^{-1} \mathbf{x}_{i}, give LOOCV RMSE and MAPE=100n∑i∣y^(−i)−yi∣/yi\mathrm{MAPE} = \frac{100}{n} \sum_{i} \lvert \hat{y}_{(-i)} - y_{i} \rvert / y_{i} on the AADT scale. An unseen category level gives NULL; the model needs n≥p+5n \ge p + 5.

Level of service

Flow rate (HCM 6)

vp=AADT⋅K⋅DPHF⋅N⋅fHV,fHV=11+PT (ET−1)(19)v_{p} = \frac{\mathrm{AADT} \cdot K \cdot D}{\mathrm{PHF} \cdot N \cdot f_{HV}}, \qquad f_{HV} = \frac{1}{1 + P_{T}\,(E_{T} - 1)} \tag{19}

where vpv_p is the flow rate (pc/h/ln\mathrm{pc/h/ln}), NN the lanes per direction, PTP_T the heavy-vehicle proportion and ET=2.0E_T = 2.0 their passenger-car equivalent on level terrain.

Basic freeway and multilane highway (HCM 6 Ch. 12)

S={FFSvp≤BPFFS−(FFS−cDc)(vp−BPc−BP)2vp>BPρ=vpS(20)S = \begin{cases} \mathrm{FFS} & v_{p} \le \mathrm{BP} \\[2pt] \mathrm{FFS} - \left( \mathrm{FFS} - \dfrac{c}{D_{c}} \right) \left( \dfrac{v_{p} - \mathrm{BP}}{c - \mathrm{BP}} \right)^{2} & v_{p} > \mathrm{BP} \end{cases} \qquad \rho = \frac{v_{p}}{S} \tag{20}

where SS is the mean speed (mph), FFS\mathrm{FFS} the free-flow speed (mph), cc the capacity, BP\mathrm{BP} the breakpoint, DcD_c the density at capacity and ρ\rho the density (pc/mi/ln\mathrm{pc/mi/ln}); the ratio in the squared term is capped at 1. Basic freeway: c=2200+10 (min⁡(FFS,70)−50)c = 2200 + 10\,(\min(\mathrm{FFS}, 70) - 50) pc/h/ln\mathrm{pc/h/ln}, BP=1000+40 (75−FFS)\mathrm{BP} = 1000 + 40\,(75 - \mathrm{FFS}), Dc=45D_c = 45. LOS A ρ≤11\rho \le 11, B ≤18\le 18, C ≤26\le 26, D ≤35\le 35, E ≤45\le 45, F above or when vp>cv_p > c. Multilane highway: c=1900+20 (min⁡(FFS,60)−45)c = 1900 + 20\,(\min(\mathrm{FFS}, 60) - 45), BP=1400\mathrm{BP} = 1400, Dc=40,41,43,45D_c = 40, 41, 43, 45 for FFS=60,55,50,45\mathrm{FFS} = 60, 55, 50, 45 mph (linear in between), which is also the upper bound of E; flagged unverified.

Urban street (HCM 6 Ch. 18)

Base free-flow speed from a field or Sf0=25.6+0.47 SplS_{f0} = 25.6 + 0.47\, S_{pl} (mph), with SplS_{pl} the speed limit. LOS by the travel speed STS_T as a percentage of the base free-flow speed, 100 ST/Sf0100\, S_T / S_{f0}: A >80> 80, B >67> 67, C >50> 50, D >40> 40, E >30> 30, F otherwise or when v/c>1v/c > 1 (HCM 2010 used 85 for A). Here v/c=vp/cv/c = v_p / c with the urban lane capacity c=1900×g/Cc = 1900 \times g/C (855 veh/h/ln855\,\mathrm{veh/h/ln} at g/C=0.45g/C = 0.45). Without an observed speed only v/cv/c is reported.

Pedestrian and bicycle (NCHRP Report 616; HCM 2010 Ch. 17)

Ip=6.0468+Fw+Fv+Fs,Ib=0.760+Fw′+Fv′+Fs′+Fp(21)I_{p} = 6.0468 + F_{w} + F_{v} + F_{s}, \qquad I_{b} = 0.760 + F_{w}' + F_{v}' + F_{s}' + F_{p} \tag{21}

Pedestrian terms: Fw=−1.2276ln⁡(Wv+0.5 W1+50 ppk+Wbuffb+WaAfsw)F_{w} = -1.2276 \ln(W_{v} + 0.5\, W_{1} + 50\, p_{pk} + W_{buf} f_{b} + W_{aA} f_{sw}), Fv=0.0091 vm/(4Nth)F_{v} = 0.0091\, v_{m} / (4 N_{th}), Fs=4 (SR/100)2F_{s} = 4\, (S_{R}/100)^{2}. Bicycle terms: Fw′=−0.005 We2F_{w}' = -0.005\, W_{e}^{2}, Fv′=0.507ln⁡ ⁣(vma/(4Nth))F_{v}' = 0.507 \ln\!\big(v_{ma} / (4 N_{th})\big), Fs′=0.199 (1.1199ln⁡(SRa−20)+0.8103)(1+0.1038 PHVa)2F_{s}' = 0.199\, \big(1.1199 \ln(S_{Ra} - 20) + 0.8103\big)(1 + 0.1038\, P_{HVa})^{2}, Fp=7.066/Pc2F_{p} = 7.066 / P_{c}^{2}. Here WvW_v is the volume-adjusted outside width (ft), W1W_1 the bicycle lane plus shoulder width, ppkp_{pk} the parking occupancy share, WbufW_{buf} the buffer width with barrier factor fb=5.37f_b = 5.37 (else 1), WaA=min⁡(Wsw,10)W_{aA} = \min(W_{sw}, 10) the sidewalk width with fsw=6.0−0.3 WaAf_{sw} = 6.0 - 0.3\, W_{aA}, vmv_m the directional flow (veh/h), NthN_{th} the through lanes, SRS_R the running speed (mph), WeW_e the effective width, vma=max⁡(vm,4Nth)v_{ma} = \max(v_m, 4 N_{th}), SRa=max⁡(SR,21)S_{Ra} = \max(S_R, 21), PHVaP_{HVa} the adjusted heavy-vehicle percentage and PcP_c the pavement rating (0.5 to 5). Letters: A ≤2.00\le 2.00, B ≤2.75\le 2.75, C ≤3.50\le 3.50, D ≤4.25\le 4.25, E ≤5.00\le 5.00, F above.

Walkway (FHWA-RD-98-107; Pushkarev & Zupan 1975)

vp=v1515 WE,Ap=60 Spvp,v15=Vh4 PHF(22)v_{p} = \frac{v_{15}}{15\, W_{E}}, \qquad A_{p} = \frac{60\, S_{p}}{v_{p}}, \qquad v_{15} = \frac{V_{h}}{4\, \mathrm{PHF}} \tag{22}

where vpv_p is the unit flow, v15v_{15} the peak 15-minute two-way pedestrian volume, WEW_E the effective width after shy distances, ApA_p the space per pedestrian, SpS_p the walking speed and VhV_h the hourly volume when no 15-minute volume is given. The model is evaluated in ft (vpv_p in p/min/ft\mathrm{p/min/ft}, ApA_p in ft2/p\mathrm{ft^2/p}) and reported in p/min/m\mathrm{p/min/m} and m2/p\mathrm{m^2/p} with SI units. The letter is the worse of the space and flow letters, from the average-flow or the platoon table. Comfort flags: PROWAG 1.2 m clear width and 1.5 m passing space.

Every table can be overridden and carries its source, edition and a verified flag. HCM text is not reproduced; only equations and numeric thresholds as published in the cited open sources.

Parking

of,b=Vf,bSf,b,Ceff=τ Sf,Cprac=ϕ Sf(23)o_{f,b} = \frac{V_{f,b}}{S_{f,b}}, \qquad C_{\mathrm{eff}} = \tau\, S_{f}, \qquad C_{\mathrm{prac}} = \phi\, S_{f} \tag{23}

where of,bo_{f,b} is the occupancy of block face ff at beat bb, Vf,bV_{f,b} the vehicles counted, Sf,bS_{f,b} the legal spaces available at that beat (spaces in an unavailable window count as zero; vehicles above the spaces are kept and flagged), SfS_f the legal spaces, τ=0.85\tau = 0.85 the target occupancy (85 % rule; Shoup 2005) and ϕ=0.85\phi = 0.85 on-street or 0.900.90 off-street (planning conventions).

Plate survey: consecutive sightings of one token are one stay, with minimum duration tn−t1t_n - t_1 and estimated duration tn−t1+bt_n - t_1 + b for first and last sightings t1t_1, tnt_n and beat length bb; stays at session edges are censored. Overstay is judged against the posted limit on the minimum basis by default.

T=NsSf,Th=TH,U=∑st^sSf H(24)T = \frac{N_{s}}{S_{f}}, \qquad T_{h} = \frac{T}{H}, \qquad U = \frac{\sum_{s} \hat{t}_{s}}{S_{f}\, H} \tag{24}

where TT is the turnover, NsN_s the number of stays on the face (a vehicle that leaves and returns counts twice), HH the survey hours, t^s\hat{t}_s the estimated duration of stay ss (h) and UU the utilisation (space-hours used over space-hours supplied). Mean and median durations also use the estimated durations.

Pricing: SFMTA demand-responsive policy (5 December 2017) on the mean occupancy oˉ\bar{o} of the rate period: oˉ≥0.80\bar{o} \ge 0.80: +0.25+0.25; 0.60≤oˉ<0.800.60 \le \bar{o} < 0.80: hold; oˉ<0.60\bar{o} < 0.60: −0.25-0.25; rates kept in [0.50, 8.00][0.50,\ 8.00] per hour. The SFpark pilot table is the other built-in example; both are configurable.

spare=∑f∈Rmax⁡ ⁣(0,  Ceff,f−Vf,b)(25)\text{spare} = \sum_{f \in \mathcal{R}} \max\!\left(0,\; C_{\mathrm{eff},f} - V_{f,b}\right) \tag{25}

where R\mathcal{R} is the set of block faces whose midpoint lies within the walking radius (straight line or walk graph) and bb the chosen beat (default the study-wide peak).

Processing algorithms

Provider 02TODLab. Every algorithm copies its inputs first, works in the working CRS and writes outputs with real field types; nothing is styled inside the run. The tables below are generated from the algorithm definitions.

TOD

Station catchments (buffers, pedsheds, polygons) zero2todlab:tod_catchments

Builds the catchment of every station: one polygon per station and label.

Catchments: Euclidean buffers (label = radius, e.g. 400; area exactly πr2\pi r^2; 400 m and 800 m are the 5- and 10-minute walk), network pedsheds (label net800: street pieces reached within the walking budget, the last edge trimmed at the exact budget point, buffered by the pedshed buffer and dissolved; one-way streets are walked both ways; the station's connector to the street is subtracted from the budget) or your own polygons joined by station id (label poly). Pedshed ratio Rped=Aped/πr2R_{\mathrm{ped}} = A_{\mathrm{ped}} / \pi r^2 with ApedA_{\mathrm{ped}} the pedshed area and rr the budget.

Output fields: station_id, label, kind (buffer / network / poly), area_ha, pedshed_ratio (network catchments only).

Geographic or non-metric input is reprojected to the UTM zone of the layer centre; the outputs are written in that working CRS and the log says so.

References

Parameters

NameDescriptionTypeDefault
STATIONSStationssource
STATION_IDStation id fieldfieldstation_id
RADIIBuffer radii (m, comma-separated)string400, 800optional
NETWORK_RADIINetwork pedshed budgets (m, comma-separated; needs streets)stringoptional
STREETSStreet centre lines (for pedsheds and design indicators)sourceoptional
PEDSHED_BUFFERPedshed buffer around reached streets (m)number50.0advanced
MAX_SNAPLargest station-to-street distance (m)number200.0advanced
CATCHMENTSCatchment polygons with a station id field (optional, label 'poly')sourceoptional
OUTPUTCatchmentssink

Outputs

NameDescriptionType
OUTPUTCatchmentsoutputVector
CATCHMENT_COUNTNumber of catchment polygonsoutputNumber

Station-area 5D indicators zero2todlab:tod_indicators

5D built-environment indicators per station and catchment (Cervero & Kockelman 1997; Ewing & Cervero 2010), as fields indicator_label (e.g. activity_density_400): residents, jobs and dwellings and their densities per ha; activity density (P+J)/AC(P + J)/A_C per ha; normalised land-use entropy E=−∑kpkln⁡pk/ln⁡KE = -\sum_k p_k \ln p_k / \ln K (Frank et al. 2004; polygons by area, points by weight); jobs-population balance B=1−∣J−rP∣/(J+rP)B = 1 - \lvert J - rP \rvert / (J + rP) with JJ jobs, PP residents and rr the regional jobs per resident (or the value given); street length, intersections (degree ≥3\ge 3) per km2\mathrm{km^2} and pedestrian street share; destinations and Hansen gravity G=∑dwd e−βdG = \sum_d w_d\, e^{-\beta d} (Hansen 1959; set β>0\beta > 0 to enable); transit stops; population-weighted mean distance to the station (network distance in a pedshed); nearest station.

Polygon population, jobs and dwellings are areal-weighted: a polygon PP adds xP ∣P∩C∣/∣P∣x_P \,\lvert P \cap C \rvert / \lvert P \rvert to catchment CC (Goodchild & Lam 1980).

Catchments: Euclidean buffers (label = radius, e.g. 400; area exactly πr2\pi r^2; 400 m and 800 m are the 5- and 10-minute walk), network pedsheds (label net800: street pieces reached within the walking budget, the last edge trimmed at the exact budget point, buffered by the pedshed buffer and dissolved; one-way streets are walked both ways; the station's connector to the street is subtracted from the budget) or your own polygons joined by station id (label poly). Pedshed ratio Rped=Aped/πr2R_{\mathrm{ped}} = A_{\mathrm{ped}} / \pi r^2 with ApedA_{\mathrm{ped}} the pedshed area and rr the budget.

Geographic or non-metric input is reprojected to the UTM zone of the layer centre; the outputs are written in that working CRS and the log says so.

References

Parameters

NameDescriptionTypeDefault
STATIONSStationssource
STATION_IDStation id fieldfieldstation_id
RADIIBuffer radii (m, comma-separated)string400, 800optional
NETWORK_RADIINetwork pedshed budgets (m, comma-separated; needs streets)stringoptional
STREETSStreet centre lines (for pedsheds and design indicators)sourceoptional
PEDSHED_BUFFERPedshed buffer around reached streets (m)number50.0advanced
MAX_SNAPLargest station-to-street distance (m)number200.0advanced
CATCHMENTSCatchment polygons with a station id field (optional, label 'poly')sourceoptional
PEDESTRIAN_FIELDStreet type field for the pedestrian share (e.g. highway)fieldoptional, advanced
PEDESTRIAN_VALUESValues counted as pedestrian streetsstringpedestrian, footway, living_street, path, steps, residentialoptional, advanced
POPULATIONResidents (points or polygons)sourceoptional
POPULATION_FIELDResidents count field (empty: 1 per feature)fieldoptional
JOBSJobs (points or polygons)sourceoptional
JOBS_FIELDJobs count field (empty: 1 per feature)fieldoptional
DWELLINGSDwellings (points or polygons)sourceoptional
DWELLINGS_FIELDDwellings count field (empty: 1 per feature)fieldoptional
LANDUSELand use (polygons by area, points by weight)sourceoptional
LANDUSE_FIELDLand-use category fieldfieldoptional
LANDUSE_WEIGHT_FIELDLand-use point weight fieldfieldoptional, advanced
DESTINATIONSDestinations (points)sourceoptional
DESTINATION_WEIGHT_FIELDDestination weight fieldfieldoptional
GRAVITY_BETAHansen gravity decay β\beta (per m; 0: off)number0.0
TRANSIT_STOPSTransit stops (points)sourceoptional
JOBS_PER_RESIDENTJobs per resident rr (0: regional ratio)number0.0advanced
OUTPUTStations with indicatorssink
CATCHMENTS_OUTCatchmentssinkoptional

Outputs

NameDescriptionType
OUTPUTStations with indicatorsoutputVector
CATCHMENTS_OUTCatchmentsoutputVector

GTFS node indicators per station zero2todlab:gtfs_node_service

Node indicators of the node-place model from a local GTFS Schedule feed (zip file) for one service date (calendar.txt and calendar_dates.txt honoured, times past 24:00:00 included) and a time window: departures (distinct trips boarding at the station in the window), routes (distinct route_id), modes (distinct route_type), peak_departures_per_hour (busiest clock hour) and min_headway_min =Tw/nmax⁡= T_w / n_{\max}, the window minutes TwT_w over the departures nmax⁡n_{\max} of the most frequent route and direction (mean headway, TCQSM). A stop belongs to the nearest station within the stop radius; stops sharing a parent_station follow the station of their group. No network request is made.

Geographic or non-metric input is reprojected to the UTM zone of the layer centre; the outputs are written in that working CRS and the log says so.

References

Parameters

NameDescriptionTypeDefault
STATIONSStationssource
STATION_IDStation id fieldfieldstation_id
GTFSGTFS feed (zip)file
DATEService date (YYYY-MM-DD)string
WINDOWTime window (HH:MM-HH:MM)string07:00-09:00
STOP_RADIUSStop-to-station radius (m)number150.0
PARENT_STATIONStops sharing a parent_station join the same stationbooleanTrueadvanced
OUTPUTStations with node indicatorssink

Outputs

NameDescriptionType
OUTPUTStations with node indicatorsoutputVector

Node-place model zero2todlab:node_place

Bertolini's node-place model on an indicator table (for example the output of the indicator and GTFS tools). Node and place indices are weighted means of min-max normalised indicators (equal weights unless given as name=weight; ...). Classes, with node NN, place LL and band δ\delta: unsustained node when N−L>δN - L > \delta; unsustained place when L−N>δL - N > \delta; otherwise stress when 12(N+L)≥s\tfrac{1}{2}(N + L) \ge s, dependency when 12(N+L)≤d\tfrac{1}{2}(N + L) \le d, else balanced. Band δ=0.2\delta = 0.2, stress s=0.7s = 0.7 and dependency d=0.3d = 0.3 are package conventions, stated as such.

Output: the input with node, place and np_class.

References

Parameters

NameDescriptionTypeDefault
INPUTStation indicator layer or tablesource
STATION_IDStation id fieldfieldstation_id
NODE_FIELDSNode indicatorsfield
PLACE_FIELDSPlace indicatorsfield
NODE_WEIGHTSNode weights (name=weight; ...; empty: equal)stringoptional, advanced
PLACE_WEIGHTSPlace weights (name=weight; ...; empty: equal)stringoptional, advanced
BANDBalance bandnumber0.2
STRESSStress thresholdnumber0.7
DEPENDENCYDependency thresholdnumber0.3
OUTPUTNode-place classessink

Outputs

NameDescriptionType
OUTPUTNode-place classesoutputVector
BALANCEDBalanced stationsoutputNumber
COUNTSStations per classoutputString

Composite TOD index zero2todlab:tod_composite

A composite index (OECD & JRC 2008) of chosen indicators: each is normalised (min-max or z-score), cost indicators (lower is better, e.g. mean distance to the station) are inverted, and the score is the weighted sum Si=∑kwkzikS_i = \sum_k w_k z_{ik} with ∑kwk=1\sum_k w_k = 1; rank 1 = highest score.

Weights: equal; manual (name=weight; ...); AHP, the principal eigenvector of a pairwise comparison matrix on Saaty's 1-9 scale given as a:b=3; a:c=5; b:c=2 (a is 3 times as important as b; 1/31/3 for the reverse; every pair needed), with CI=(λmax⁡−n)/(n−1)\mathrm{CI} = (\lambda_{\max} - n)/(n - 1) and CR=CI/RIn\mathrm{CR} = \mathrm{CI}/\mathrm{RI}_n; the run refuses CR>0.10\mathrm{CR} > 0.10 (Saaty 1980); or PCA (components with eigenvalue λc>1\lambda_c > 1, squared loadings weighted by explained variance, unrotated).

Output: the input with tod_score and tod_rank.

References

Parameters

NameDescriptionTypeDefault
INPUTStation indicator layer or tablesource
STATION_IDStation id fieldfieldstation_id
FIELDSIndicatorsfield
COST_FIELDSCost indicators (lower is better)fieldoptional
NORMALIZATIONNormalisationenum: Min-max / Z-scoreMin-max
WEIGHTINGWeightingenum: Equal / AHP / PCA / ManualEqual
AHP_JUDGEMENTSAHP judgements (a:b=value; ...)stringoptional
MANUAL_WEIGHTSManual weights (name=weight; ...)stringoptional
OUTPUTComposite TOD indexsink

Outputs

NameDescriptionType
OUTPUTComposite TOD indexoutputVector
CRAHP consistency ratiooutputNumber
WEIGHTSWeights usedoutputString

Traffic counts

Count quality control zero2todlab:counts_quality

Flags problems in hourly counts per station, never changing the data: missing hours, zero runs (default 6 h or longer), constant runs (4 h), values above a ceiling, and robust outliers z=0.6745 ∣x−x~∣/MAD>5z = 0.6745\, \lvert x - \tilde{x} \rvert / \mathrm{MAD} > 5 (x~\tilde{x} the median) within each day-of-week ×\times hour group (Iglewicz & Hoaglin 1993). Directions and classes are summed per hour first.

The hourly count table (a CSV file or any table) needs one row per station, hour and (optionally) direction or vehicle class: a station id, a date-time (or a clock time plus a date column) and a volume. Rows without a volume are missing hours. Hour ending shifts stamps that mark the end of the hour back by one hour.

Outputs: a station table (hours_total, hours_flagged, completeness, first and last hour, issue count) and an issue table (kind, start, end, hours, detail).

References

Parameters

NameDescriptionTypeDefault
COUNTSHourly count table (CSV or table)source
COUNT_STATIONStation id columnfieldstation
COUNT_DATETIMEDate-time column (hour start)fielddatetime
COUNT_VOLUMEVolume columnfieldvolume
COUNT_DIRECTIONDirection column (for D)fieldoptional
COUNT_CLASSVehicle class column (FHWA 1-13, for the truck share)fieldoptional, advanced
COUNT_DATEDate column (when the time column holds clock times)fieldoptional, advanced
HOUR_ENDINGStamps mark the end of the hourbooleanFalseadvanced
ZERO_RUNZero run length that is flagged (h)number6advanced
CONSTANT_RUNConstant run length that is flagged (h)number4advanced
OUTLIER_ZRobust z above which an hour is an outliernumber5.0advanced
MAX_HOURLYHourly ceiling (0: none)number0.0advanced
OUTPUTQuality per stationsink
ISSUESQuality issuessinkoptional

Outputs

NameDescriptionType
OUTPUTQuality per stationoutputVector
ISSUESQuality issuesoutputVector
HOURS_FLAGGEDFlagged hours (all stations)outputNumber

AADT at continuous count stations zero2todlab:ccs_aadt

AADT of every continuous count station (CCS). Hour-based (FHWA TMG 2022 §3.1.4.7): MADTm=∑jwjm∑h(1nhjm∑iVOLihjm)∑jwjm,AADT=∑mdm MADTm∑mdm\mathrm{MADT}_m = \frac{\sum_j w_{jm} \sum_h \big( \frac{1}{n_{hjm}} \sum_i \mathrm{VOL}_{ihjm} \big)}{\sum_j w_{jm}}, \qquad \mathrm{AADT} = \frac{\sum_m d_m\, \mathrm{MADT}_m}{\sum_m d_m} AASHTO (TMG 2013 §3.2.1): AADT=17∑i[112∑j(1nij∑kVOLijk)]\mathrm{AADT} = \frac{1}{7} \sum_i \Big[ \frac{1}{12} \sum_j \Big( \frac{1}{n_{ij}} \sum_k \mathrm{VOL}_{ijk} \Big) \Big] Symbols as in Eqs. (12) and (13) of the methods section. Simple: mean of complete days. Empty month ×\times day-of-week cells are skipped with a note. Design hour: K=V30/AADTK = V_{30}/\mathrm{AADT} and DD = peak-direction share at that hour (TMG 2022 §3.1.2). PHF=V/(4V15)\mathrm{PHF} = V/(4 V_{15}) at the design hour from 15-minute counts; NULL for hourly tables.

The hourly count table (a CSV file or any table) needs one row per station, hour and (optionally) direction or vehicle class: a station id, a date-time (or a clock time plus a date column) and a volume. Rows without a volume are missing hours. Hour ending shifts stamps that mark the end of the hour back by one hour.

A station is continuous when its kind field says ccs, or, without one, when it has at least the given number of complete days; other stations are listed and left out (use the short-count tool). Outputs: a station table and an optional MADT table (station, month, madt).

References

Parameters

NameDescriptionTypeDefault
COUNTSHourly count table (CSV or table)source
COUNT_STATIONStation id columnfieldstation
COUNT_DATETIMEDate-time column (hour start)fielddatetime
COUNT_VOLUMEVolume columnfieldvolume
COUNT_DIRECTIONDirection column (for D)fieldoptional
COUNT_CLASSVehicle class column (FHWA 1-13, for the truck share)fieldoptional, advanced
COUNT_DATEDate column (when the time column holds clock times)fieldoptional, advanced
HOUR_ENDINGStamps mark the end of the hourbooleanFalseadvanced
STATIONSCount stations (optional: kind and group fields)sourceoptional
STATION_IDStation id fieldfieldstationoptional
KIND_FIELDKind field (ccs / short; empty: by complete days)fieldoptional
METHODAADT method at continuous stationsenum: Hour-based (FHWA TMG 2022) / AASHTO (TMG 2013) / Simple mean of daysHour-based (FHWA TMG 2022)
DROP_FLAGGEDDrop hours flagged by quality controlbooleanTrue
MIN_DAYSComplete days that make a station continuousnumber300advanced
DESIGN_HOURDesign hour nn (K=Vn/AADTK = V_n / \mathrm{AADT})number30advanced
OUTPUTAADT per continuous stationsink
MADTMonthly average daily trafficsinkoptional

Outputs

NameDescriptionType
OUTPUTAADT per continuous stationoutputVector
MADTMonthly average daily trafficoutputVector
STATIONS_CCSContinuous stationsoutputNumber

Seasonal factor groups zero2todlab:factor_groups

Expansion factors from the continuous stations: monthly fm=AADT/MADTmf_m = \mathrm{AADT}/\mathrm{MADT}_m, day-of-week fj=AADT/ADTjf_j = \mathrm{AADT}/\mathrm{ADT}_j and month ×\times day-of-week fmj=AADT/MADWmjf_{mj} = \mathrm{AADT}/\mathrm{MADW}_{mj}. A group factor is the mean fˉ\bar{f} over its nn stations, with relative precision t0.975, n−1 sf/(n fˉ)t_{0.975,\,n-1}\, s_f / (\sqrt{n}\, \bar{f}) (TMG 2022 §3.1.4.5, §3.2.6.2). Groups come from a station field, else from k-means on the monthly factor vectors (deterministic for the seed; a reviewable starting point, NCHRP Report 1081), else one group all.

The hourly count table (a CSV file or any table) needs one row per station, hour and (optionally) direction or vehicle class: a station id, a date-time (or a clock time plus a date column) and a volume. Rows without a volume are missing hours. Hour ending shifts stamps that mark the end of the hour back by one hour.

Output: a long table group, type (monthly / dow / month_dow), month, dow (00 = Monday), factor, precision, stations.

References

Parameters

NameDescriptionTypeDefault
COUNTSHourly count table (CSV or table)source
COUNT_STATIONStation id columnfieldstation
COUNT_DATETIMEDate-time column (hour start)fielddatetime
COUNT_VOLUMEVolume columnfieldvolume
COUNT_DIRECTIONDirection column (for D)fieldoptional
COUNT_CLASSVehicle class column (FHWA 1-13, for the truck share)fieldoptional, advanced
COUNT_DATEDate column (when the time column holds clock times)fieldoptional, advanced
HOUR_ENDINGStamps mark the end of the hourbooleanFalseadvanced
STATIONSCount stations (optional: kind and group fields)sourceoptional
STATION_IDStation id fieldfieldstationoptional
KIND_FIELDKind field (ccs / short; empty: by complete days)fieldoptional
GROUP_FIELDFactor group field (empty: k-means or one group)fieldoptional
METHODAADT method at continuous stationsenum: Hour-based (FHWA TMG 2022) / AASHTO (TMG 2013) / Simple mean of daysHour-based (FHWA TMG 2022)
DROP_FLAGGEDDrop hours flagged by quality controlbooleanTrue
MIN_DAYSComplete days that make a station continuousnumber300advanced
DESIGN_HOURDesign hour nn (K=Vn/AADTK = V_n / \mathrm{AADT})number30advanced
K_GROUPSNumber of k-means groups (0: field or one group)number0
SEEDRandom seed of k-meansnumber42advanced
OUTPUTFactorssink

Outputs

NameDescriptionType
OUTPUTFactorsoutputVector
GROUPSNumber of groupsoutputNumber

Short-count expansion to AADT zero2todlab:short_count_expand

AADT of short counts (e.g. 48 h) expanded with the factors of their group built from the continuous stations in the same table: AADT=VOL24⋅M⋅D⋅A⋅G\mathrm{AADT} = \mathrm{VOL}_{24} \cdot M \cdot D \cdot A \cdot G averaged over the complete days (TMG 2022 §3.2.8; the TMG worked example 518×0.95×1.24≈610518 \times 0.95 \times 1.24 \approx 610), axle correction A=V/(Nax/2)A = V / (N_{\mathrm{ax}}/2) for VV vehicles and NaxN_{\mathrm{ax}} axles, growth G=(1+r)tG = (1 + r)^t. Without a complete calendar day, consecutive 24-hour blocks are used. The 95 % interval uses the group's relative precision of the month and day-of-week factors.

The hourly count table (a CSV file or any table) needs one row per station, hour and (optionally) direction or vehicle class: a station id, a date-time (or a clock time plus a date column) and a volume. Rows without a volume are missing hours. Hour ending shifts stamps that mark the end of the hour back by one hour.

A short count belongs to the group named in the group field; with one group, every short count uses it. Output: one row per short count with aadt, aadt_lo, aadt_hi, factor_group, k_fac and d_fac (group means).

References

Parameters

NameDescriptionTypeDefault
COUNTSHourly count table (CSV or table)source
COUNT_STATIONStation id columnfieldstation
COUNT_DATETIMEDate-time column (hour start)fielddatetime
COUNT_VOLUMEVolume columnfieldvolume
COUNT_DIRECTIONDirection column (for D)fieldoptional
COUNT_CLASSVehicle class column (FHWA 1-13, for the truck share)fieldoptional, advanced
COUNT_DATEDate column (when the time column holds clock times)fieldoptional, advanced
HOUR_ENDINGStamps mark the end of the hourbooleanFalseadvanced
STATIONSCount stations (optional: kind and group fields)sourceoptional
STATION_IDStation id fieldfieldstationoptional
KIND_FIELDKind field (ccs / short; empty: by complete days)fieldoptional
GROUP_FIELDFactor group field (empty: k-means or one group)fieldoptional
METHODAADT method at continuous stationsenum: Hour-based (FHWA TMG 2022) / AASHTO (TMG 2013) / Simple mean of daysHour-based (FHWA TMG 2022)
DROP_FLAGGEDDrop hours flagged by quality controlbooleanTrue
MIN_DAYSComplete days that make a station continuousnumber300advanced
DESIGN_HOURDesign hour nn (K=Vn/AADTK = V_n / \mathrm{AADT})number30advanced
K_GROUPSNumber of k-means groups (0: field or one group)number0advanced
AXLE_FACTORAxle correction factor AAnumber1.0
GROWTH_RATEAnnual growth rate rr (0.020.02 = 2 percent)number0.0advanced
GROWTH_YEARSYears of growth ttnumber0.0advanced
OUTPUTAADT of short countssink

Outputs

NameDescriptionType
OUTPUTAADT of short countsoutputVector
EXPANDEDShort counts with an AADToutputNumber

AADT on road segments zero2todlab:segment_aadt

The whole counts-to-segments chain: quality control, AADT at continuous stations, factor groups, short-count expansion, matching to segments and the model for uncounted links.

Count stations are matched to road segments by a shared id field, else to the nearest segment within the snap tolerance; two directional stations on one segment are summed; an unmatched station is listed, never dropped silently. Continuous stations give AADT directly, short counts are expanded with their factor group. Segment fields: aadt, aadt_src (ccs / short / model / NULL), aadt_lo, aadt_hi, aadt_year, k_fac, d_fac, ddhv =AADT⋅K⋅D= \mathrm{AADT} \cdot K \cdot D, phf, trk_pct, count_stations.

Uncounted links (optional): ln⁡AADT=Xβ+ε\ln \mathrm{AADT} = X\boldsymbol{\beta} + \boldsymbol{\varepsilon} by OLS with the chosen categorical and numeric segment fields (ln⁡x\ln x for the log fields) and optionally ln⁡(Pr+1)\ln(P_r + 1) with PrP_r the population within the radius (Mohamad et al. 1998; Zhao & Chung 2001); retransformation with Duan's smearing factor S=1n∑ieε^iS = \frac{1}{n}\sum_i e^{\hat{\varepsilon}_i} (Duan 1983); 95 % prediction interval exp⁡ ⁣(x⊤β^±t0.975, n−p s1+x⊤(X⊤X)−1x) S\exp\!\Big( \mathbf{x}^{\top} \hat{\boldsymbol{\beta}} \pm t_{0.975,\,n-p}\, s \sqrt{1 + \mathbf{x}^{\top} (X^{\top} X)^{-1} \mathbf{x}} \Big)\, S leave-one-out residuals ε^i/(1−hii)\hat{\varepsilon}_i/(1 - h_{ii}) give LOOCV RMSE and MAPE. A category level unseen in the counted links gives NULL. The model needs n≥p+5n \ge p + 5 counted segments, else it is skipped with a message.

The hourly count table (a CSV file or any table) needs one row per station, hour and (optionally) direction or vehicle class: a station id, a date-time (or a clock time plus a date column) and a volume. Rows without a volume are missing hours. Hour ending shifts stamps that mark the end of the hour back by one hour.

Geographic or non-metric input is reprojected to the UTM zone of the layer centre; the outputs are written in that working CRS and the log says so.

References

Parameters

NameDescriptionTypeDefault
COUNT_STATIONSCount stations (points)source
STATION_IDStation id fieldfieldstation
KIND_FIELDKind field (ccs / short; empty: by complete days)fieldoptional
GROUP_FIELDFactor group fieldfieldoptional
SEGMENT_ID_FIELDSegment id field (same name on both layers; empty: nearest)fieldoptional
COUNTSHourly count table (CSV or table)source
COUNT_STATIONStation id columnfieldstation
COUNT_DATETIMEDate-time column (hour start)fielddatetime
COUNT_VOLUMEVolume columnfieldvolume
COUNT_DIRECTIONDirection column (for D)fieldoptional
COUNT_CLASSVehicle class column (FHWA 1-13, for the truck share)fieldoptional, advanced
COUNT_DATEDate column (when the time column holds clock times)fieldoptional, advanced
HOUR_ENDINGStamps mark the end of the hourbooleanFalseadvanced
SEGMENTSRoad segmentssource
SNAP_TOLERANCESnap tolerance (m)number25.0
METHODAADT method at continuous stationsenum: Hour-based (FHWA TMG 2022) / AASHTO (TMG 2013) / Simple mean of daysHour-based (FHWA TMG 2022)
K_GROUPSNumber of k-means groups (0: field or one group)number0advanced
MODELEstimate uncounted segments with the log-linear modelbooleanTrue
MODEL_FIELDSModel covariatesfieldoptional
LOG_FIELDSCovariates entered as ln⁡x\ln xfieldoptional, advanced
POPULATIONPopulation (adds ln⁡(Pr+1)\ln(P_r + 1), PrP_r the population within the radius)sourceoptional
POPULATION_FIELDPopulation fieldfieldoptional
POPULATION_RADIUSPopulation radius (m)number500.0advanced
DROP_FLAGGEDDrop hours flagged by quality controlbooleanTrueadvanced
MIN_DAYSComplete days that make a station continuousnumber300advanced
DESIGN_HOURDesign hour nnnumber30advanced
PHFDefault peak-hour factornumber0.92advanced
SEEDRandom seednumber42advanced
OUTPUTSegments with AADTsink
STATIONS_OUTCount stations with AADTsinkoptional

Outputs

NameDescriptionType
OUTPUTSegments with AADToutputVector
STATIONS_OUTCount stations with AADToutputVector
COUNTEDCounted segmentsoutputNumber
MODELLEDModelled segmentsoutputNumber
LOOCV_MAPELOOCV MAPE (percent)outputNumber

Level of service

Motorised level of service zero2todlab:auto_los

Flow rate (HCM 6): vp=AADT⋅K⋅D/(PHF⋅N⋅fHV)v_p = \mathrm{AADT} \cdot K \cdot D / (\mathrm{PHF} \cdot N \cdot f_{HV}), fHV=1/(1+PT(ET−1))f_{HV} = 1/\big(1 + P_T (E_T - 1)\big), ET=2.0E_T = 2.0 on level terrain. KK, DD and PHF\mathrm{PHF} come from the parameters, else from the k_fac, d_fac and phf fields of the AADT tool, else 0.10, 0.55 and 0.92 (0.95 freeway).

Basic freeway (HCM 6 Ch. 12): c=2200+10 (min⁡(FFS,70)−50)c = 2200 + 10\,(\min(\mathrm{FFS}, 70) - 50) pc/h/ln\mathrm{pc/h/ln}; breakpoint BP=1000+40 (75−FFS)\mathrm{BP} = 1000 + 40\,(75 - \mathrm{FFS}); S=FFSS = \mathrm{FFS} up to BP\mathrm{BP}, else S=FFS−(FFS−c/45) ((vp−BP)/(c−BP))2S = \mathrm{FFS} - (\mathrm{FFS} - c/45)\,\big((v_p - \mathrm{BP})/(c - \mathrm{BP})\big)^2; density ρ=vp/S\rho = v_p/S; LOS A ρ≤11\rho \le 11, B ≤18\le 18, C ≤26\le 26, D ≤35\le 35, E ≤45 pc/mi/ln\le 45\,\mathrm{pc/mi/ln}, F above or when vp>cv_p > c. Multilane: c=1900+20 (min⁡(FFS,60)−45)c = 1900 + 20\,(\min(\mathrm{FFS}, 60) - 45), BP=1400\mathrm{BP} = 1400, the same speed-flow form with c/Dcc/D_c in place of c/45c/45 and the E bound DcD_c set by FFS (table flagged unverified). Urban street (HCM 6 Ch. 18): base FFS from a field or Sf0=25.6+0.47 SplS_{f0} = 25.6 + 0.47\, S_{pl} (mph); LOS by travel speed as a percent of base FFS: A >80> 80, B >67> 67, C >50> 50, D >40> 40, E >30> 30, F otherwise or when v/c>1v/c > 1. Without an observed travel speed only v/cv/c is reported (los_basis = v/c screening). v/c=vp/cv/c = v_p/c, with the urban lane capacity c=1900×g/Cc = 1900 \times g/C.

Output fields: facility, v_p, ffs_kmh, capacity, v_c, speed_kmh, speed_pct, density_pckmln, density_pcmiln, los, los_basis, los_notes, los_range (letters at the ends of the 95 % AADT interval aadt_lo to aadt_hi when the segment carries one). US-calibrated models rank links relative to each other outside the US.

References

Parameters

NameDescriptionTypeDefault
SEGMENTSRoad segments with AADTsource
FACILITY_FIELDFacility field (freeway / multilane / urban)fieldoptional
DEFAULT_FACILITYFacility when the field is emptyenum: Basic freeway / Multilane / Urban streetUrban street
AADT_FIELDAADT fieldfieldaadt
LANES_FIELDLanes per direction fieldfieldlanes
KKK factor (empty: k_fac field or 0.10)numberoptional
DDD factor (empty: d_fac field or 0.55)numberoptional
PHFPeak-hour factor (empty: phf field or default)numberoptional
TRUCK_FIELDHeavy vehicle percent fieldfieldoptional
E_TPassenger-car equivalent of heavy vehicles ETE_Tnumber2.0advanced
FFS_FIELDFree-flow speed field (km/h)fieldoptional
SPEED_LIMIT_FIELDSpeed limit field (km/h)fieldoptional
SPEED_FIELDObserved travel speed field (km/h, urban streets)fieldoptional
URBAN_LANE_CAPACITYUrban lane capacity (veh/h/ln=1900×g/C\mathrm{veh/h/ln} = 1900 \times g/C)number855.0advanced
OUTPUTMotorised LOSsink

Outputs

NameDescriptionType
OUTPUTMotorised LOSoutputVector
LOS_FSegments at LOS FoutputNumber

Pedestrian and bicycle level of service zero2todlab:ped_bike_los

Segment LOS after NCHRP Report 616 (Dowling et al. 2008; HCM 2010 Ch. 17). Pedestrian link score Ip=6.0468+Fw+Fv+FsI_p = 6.0468 + F_w + F_v + F_s (cross-section, motor-vehicle volume and speed terms); bicycle link score Ib=0.760+Fw′+Fv′+Fs′+FpI_b = 0.760 + F_w' + F_v' + F_s' + F_p (pavement); the terms are given in Eq. (21) of the methods section. Letters A ≤2.00\le 2.00, B ≤2.75\le 2.75, C ≤3.50\le 3.50, D ≤4.25\le 4.25, E ≤5.00\le 5.00, F above. The walkway LOS (FHWA-RD-98-107) is computed too when pedestrian volumes are mapped; see the walkway tool. Comfort flags: PROWAG 1.2 m clear width and 1.5 m passing space; other flags are screening heuristics.

One feature is one side or direction. Map each streetlos column to a field; the motor-vehicle volume falls back to AADT⋅K⋅D\mathrm{AADT} \cdot K \cdot D from the aadt, k_fac and d_fac fields of the AADT tool when volume_vph is not mapped. Missing inputs give NULL and a los_notes entry, never a letter. Bicycle LOS here is the NCHRP 616 perceived-quality score, not level of traffic stress (LTS).

References

Parameters

NameDescriptionTypeDefault
SEGMENTSStreet segmentssource
MAP_OUTSIDE_LANEoutside_lane: outside through lane width WolW_{ol} (m / ft)fieldoptional
MAP_BIKE_LANEbike_lane: bicycle lane width WblW_{bl} (m / ft)fieldoptional
MAP_SHOULDERshoulder: paved shoulder or parking lane width WosW_{os} (m / ft)fieldoptional, advanced
MAP_CURBcurb: curb present (yes/no, default yes) (-)fieldoptional, advanced
MAP_PARKING_OCCUPANCYparking_occupancy: share of on-street parking occupied ppk∈[0,1]p_{pk} \in [0, 1] (-)fieldoptional, advanced
MAP_PARKING_STRIPEDparking_striped: parking spaces striped (yes/no) (-)fieldoptional, advanced
MAP_BUFFERbuffer: buffer between sidewalk and road WbufW_{buf} (m / ft)fieldoptional
MAP_BARRIERbarrier: continuous barrier ≥0.9 m\ge 0.9\,\mathrm{m} (3 ft3\,\mathrm{ft}) in the buffer (yes/no) (-)fieldoptional, advanced
MAP_SIDEWALK_WIDTHsidewalk_width: sidewalk width excluding the buffer (m / ft)fieldoptional
MAP_BUILDING_EDGEbuilding_edge: none / building / window_display / fence / low_wall (-)fieldoptional, advanced
MAP_OBSTRUCTIONSobstructions: ';'-separated obstruction names or widths in the walking path (m / ft)fieldoptional, advanced
MAP_VOLUME_VPHvolume_vph: motor-vehicle flow in this direction (veh/h)fieldoptional
MAP_THROUGH_LANESthrough_lanes: through lanes in this direction (-)fieldoptional
MAP_SPEEDspeed: motor-vehicle running speed (km/h / mph)fieldoptional
MAP_HEAVY_VEHICLE_PCTheavy_vehicle_pct: heavy vehicles (%)fieldoptional, advanced
MAP_PAVEMENT_RATINGpavement_rating: pavement condition Pc∈[0.5,5]P_c \in [0.5, 5] (-)fieldoptional
MAP_DIVIDEDdivided: divided street (yes/no) (-)fieldoptional, advanced
MAP_PED_VOLUME_15MINped_volume_15min: peak 15-min two-way pedestrian volume (p/15 min)fieldoptional
MAP_PED_VOLUME_HOURped_volume_hour: hourly two-way pedestrian volume (with phf) (p/h)fieldoptional, advanced
MAP_PHFphf: peak-hour factor for ped_volume_hour (-)fieldoptional, advanced
MAP_WALK_SPEEDwalk_speed: pedestrian walking speed (m/s / ft/s)fieldoptional, advanced
MAP_FACILITYfacility: bicycle facility type (-)fieldoptional, advanced
MAP_BIKE_BUFFERbike_buffer: buffer beside the bicycle lane (m / ft)fieldoptional, advanced
UNITSUnits of the mapped fieldsenum: SI (m, km/h, m/s) / US (ft, mph, ft/s)SI (m, km/h, m/s)
PLATOONPlatoon-adjusted walkway LOSbooleanFalse
VOLUME_FROM_AADTVolume from AADT×K×D\mathrm{AADT} \times K \times D when volume_vph is not mappedbooleanTrue
K_DEFAULTKK when the layer has no k_facnumber0.1advanced
D_DEFAULTDD when the layer has no d_facnumber0.55advanced
OUTPUTPedestrian and bicycle LOSsink

Outputs

NameDescriptionType
OUTPUTPedestrian and bicycle LOSoutputVector
PED_RATEDSegments with a pedestrian letteroutputNumber
BIKE_RATEDSegments with a bicycle letteroutputNumber

Walkway level of service zero2todlab:walkway_los

Walkway LOS (FHWA-RD-98-107, Rouphail et al. 1998; Pushkarev & Zupan 1975): unit flow vp=v15/(15 WE)v_p = v_{15} / (15\, W_E) in p/min/m\mathrm{p/min/m} (p/min/ft\mathrm{p/min/ft} in US units) and space Ap=60 Sp/vpA_p = 60\, S_p / v_p; the letter is the worse of the space and flow letters, from the average-flow or the platoon-adjusted table. The effective width WEW_E is the sidewalk width minus shy distances to the building edge, the kerb and obstructions (street-furniture widths flagged unverified, as in streetlos). The 15-minute volume v15v_{15} comes from ped_volume_15min or from Vh/(4⋅PHF)V_h / (4 \cdot \mathrm{PHF}) with VhV_h = ped_volume_hour.

Output fields: effective_width, unit_flow, ped_space, walkway_los_space, walkway_los_flow, walkway_los, los_units, los_notes.

References

Parameters

NameDescriptionTypeDefault
SEGMENTSSidewalk segmentssource
MAP_BUFFERbuffer: buffer between sidewalk and road WbufW_{buf} (m / ft)fieldoptional, advanced
MAP_BARRIERbarrier: continuous barrier ≥0.9 m\ge 0.9\,\mathrm{m} (3 ft3\,\mathrm{ft}) in the buffer (yes/no) (-)fieldoptional, advanced
MAP_SIDEWALK_WIDTHsidewalk_width: sidewalk width excluding the buffer (m / ft)fieldoptional
MAP_BUILDING_EDGEbuilding_edge: none / building / window_display / fence / low_wall (-)fieldoptional, advanced
MAP_OBSTRUCTIONSobstructions: ';'-separated obstruction names or widths in the walking path (m / ft)fieldoptional
MAP_PED_VOLUME_15MINped_volume_15min: peak 15-min two-way pedestrian volume (p/15 min)fieldoptional
MAP_PED_VOLUME_HOURped_volume_hour: hourly two-way pedestrian volume (with phf) (p/h)fieldoptional, advanced
MAP_PHFphf: peak-hour factor for ped_volume_hour (-)fieldoptional, advanced
MAP_WALK_SPEEDwalk_speed: pedestrian walking speed (m/s / ft/s)fieldoptional, advanced
UNITSUnits of the mapped fieldsenum: SI (m, km/h, m/s) / US (ft, mph, ft/s)SI (m, km/h, m/s)
PLATOONPlatoon-adjusted walkway LOSbooleanFalse
OUTPUTWalkway LOSsink

Outputs

NameDescriptionType
OUTPUTWalkway LOSoutputVector
RATEDSegments with a walkway letteroutputNumber

Parking

Parking occupancy and capacity zero2todlab:parking_occupancy

Occupancy at a beat o=V/So = V/S, vehicles over legal spaces available at that beat (spaces in an unavailable window count as zero; vehicles above the legal spaces are kept and flagged over_cap). Effective capacity Ceff=τ SC_{\mathrm{eff}} = \tau\, S with target τ=0.85\tau = 0.85 (85 % rule; Shoup 2005); practical capacity Cprac=ϕ SC_{\mathrm{prac}} = \phi\, S with facility factor ϕ=0.85\phi = 0.85 on-street or 0.900.90 off-street (planning conventions). A face is above target when its peak occupancy exceeds the effective capacity.

Block faces are lines or polygons with an id and the number of legal spaces (and optionally a zone, space type, facility on_street / off_street, posted time limit in minutes, unavailable windows "07:00-09:00;16:00-18:00" and the hourly rate). The count table holds one row per face and beat: face id, beat time (date-time, or clock time plus a date column) and vehicles counted.

Outputs: block faces (face_id, zone, spaces, peak_occ, peak_rate, peak_beat, eff_cap, prac_cap, above_tgt, surplus, mean_occ), one feature per face and beat (beat as date-time, occupied, capacity, rate, eff_cap, over_cap; loaded with temporal properties so the Temporal Controller animates it) and a zone table.

Geographic or non-metric input is reprojected to the UTM zone of the layer centre; the outputs are written in that working CRS and the log says so.

References

Parameters

NameDescriptionTypeDefault
FACESBlock facessource
FACE_IDFace id fieldfieldface_id
SPACESLegal spaces fieldfieldspaces
ZONEZone fieldfieldoptional
SPACE_TYPESpace type fieldfieldoptional, advanced
FACILITYFacility field (on_street / off_street)fieldoptional, advanced
UNAVAILABLEUnavailable windows fieldfieldoptional, advanced
COUNTSOccupancy counts (CSV or table)source
COUNT_FACEFace id columnfieldface_id
COUNT_TIMEBeat columnfieldbeat
COUNT_DATEDate column (for clock times)fieldoptional, advanced
COUNT_VALUEVehicles columnfieldvehicles
TARGETTarget occupancy (85 percent rule)number0.85
ON_STREET_FACTORPractical capacity factor, on-streetnumber0.85advanced
OFF_STREET_FACTORPractical capacity factor, off-streetnumber0.9advanced
BEAT_MINUTESBeat length (min; empty: inferred)numberoptional, advanced
OUTPUTOccupancy per block facesink
BEATSOccupancy by beatsinkoptional
ZONESOccupancy per zonesinkoptional

Outputs

NameDescriptionType
OUTPUTOccupancy per block faceoutputVector
BEATSOccupancy by beatoutputVector
ZONESOccupancy per zoneoutputVector
FACES_ABOVEFaces above the targetoutputNumber
PEAK_BEATStudy-wide peak beatoutputString

Parking turnover and duration (plate survey) zero2todlab:parking_turnover

From a licence-plate beat survey: consecutive sightings of one token on one face are one stay (gaps up to the tolerance bridged); minimum duration tn−t1t_n - t_1, estimated tn−t1+bt_n - t_1 + b with beat length bb; stays at a session edge are censored. Turnover T=Ns/ST = N_s / S, stays over spaces (and per hour, T/HT/H); utilisation U=∑st^s/(S H)U = \sum_s \hat{t}_s / (S\, H), estimated space-hours over spaces ×\times survey hours HH; overstay against the posted limit on the conservative minimum basis by default.

Privacy: the sightings table should carry hashed tokens (see Hash licence plates). If it carries a raw plate column instead, give a salt: plates are normalised (NFKC, upper case, letters and digits) and replaced by HMAC-SHA256 (RFC 2104) in memory, never stored. Processing history records parameter values, so prefer the salt file parameter (only its path is recorded) for real surveys. Plates are personal data under GDPR and KVKK.

Block faces are lines or polygons with an id and the number of legal spaces (and optionally a zone, space type, facility on_street / off_street, posted time limit in minutes, unavailable windows "07:00-09:00;16:00-18:00" and the hourly rate). The count table holds one row per face and beat: face id, beat time (date-time, or clock time plus a date column) and vehicles counted.

Outputs: block faces with turnover, turnover_h, mean_dur, med_dur (min), overstay (count; NULL without a limit), overstay_sh, utilization; optionally the hashed stays as CSV.

References

Parameters

NameDescriptionTypeDefault
FACESBlock facessource
FACE_IDFace id fieldfieldface_id
SPACESLegal spaces fieldfieldspaces
ZONEZone fieldfieldoptional
SPACE_TYPESpace type fieldfieldoptional, advanced
FACILITYFacility field (on_street / off_street)fieldoptional, advanced
UNAVAILABLEUnavailable windows fieldfieldoptional, advanced
TIME_LIMITPosted time limit field (min)fieldoptional
COUNTSOccupancy counts (CSV or table)source
COUNT_FACEFace id columnfieldface_id
COUNT_TIMEBeat columnfieldbeat
COUNT_DATEDate column (for clock times)fieldoptional, advanced
COUNT_VALUEVehicles columnfieldvehicles
TARGETTarget occupancy (85 percent rule)number0.85
ON_STREET_FACTORPractical capacity factor, on-streetnumber0.85advanced
OFF_STREET_FACTORPractical capacity factor, off-streetnumber0.9advanced
BEAT_MINUTESBeat length (min; empty: inferred)numberoptional, advanced
SIGHTINGSPlate sightings (CSV or table)source
SIGHT_FACEFace id columnfieldface_id
SIGHT_TIMEBeat columnfieldbeat
SIGHT_DATEDate column (for clock times)fieldoptional, advanced
SIGHT_TOKENToken column (hashed plates)stringtokenoptional
RAW_PLATERaw plate column (hashed in memory; needs a salt)stringplateoptional, advanced
SALTSalt for raw plates (at least 16 bytes)stringoptional, advanced
SALT_FILESalt file (first line; for raw plates)fileoptional
MAX_GAPMissed beats bridged inside one staynumber0advanced
OVERSTAY_BASISOverstay basisenum: Minimum duration / Estimated durationMinimum durationadvanced
OUTPUTTurnover per block facesink
STAYS_CSVStays (hashed, CSV)fileDestinationoptional

Outputs

NameDescriptionType
OUTPUTTurnover per block faceoutputVector
STAYS_CSVStays (hashed, CSV)outputFile
STAYSStaysoutputNumber

Demand-responsive parking pricing zero2todlab:parking_pricing

Rate recommendations from the mean occupancy in the rate period, at the block-face, zone or study level. SFMTA policy (5 Dec 2017): mean occupancy oˉ≥0.80\bar{o} \ge 0.80: +0.25+0.25; 0.60≤oˉ<0.800.60 \le \bar{o} < 0.80: hold; oˉ<0.60\bar{o} < 0.60: −0.25-0.25; rates kept in [0.50, 8.00][0.50,\ 8.00]. SFpark pilot: the pilot's occupancy bands. Both are configurable examples, not rules for another city.

Block faces are lines or polygons with an id and the number of legal spaces (and optionally a zone, space type, facility on_street / off_street, posted time limit in minutes, unavailable windows "07:00-09:00;16:00-18:00" and the hourly rate). The count table holds one row per face and beat: face id, beat time (date-time, or clock time plus a date column) and vehicles counted.

Output: block faces with mean_occ, rate, price_occ (mean occupancy used), rec_rate and rate_change.

References

Parameters

NameDescriptionTypeDefault
FACESBlock facessource
FACE_IDFace id fieldfieldface_id
SPACESLegal spaces fieldfieldspaces
ZONEZone fieldfieldoptional
SPACE_TYPESpace type fieldfieldoptional, advanced
FACILITYFacility field (on_street / off_street)fieldoptional, advanced
UNAVAILABLEUnavailable windows fieldfieldoptional, advanced
RATEHourly rate fieldfieldrate
COUNTSOccupancy counts (CSV or table)source
COUNT_FACEFace id columnfieldface_id
COUNT_TIMEBeat columnfieldbeat
COUNT_DATEDate column (for clock times)fieldoptional, advanced
COUNT_VALUEVehicles columnfieldvehicles
TARGETTarget occupancy (85 percent rule)number0.85
ON_STREET_FACTORPractical capacity factor, on-streetnumber0.85advanced
OFF_STREET_FACTORPractical capacity factor, off-streetnumber0.9advanced
BEAT_MINUTESBeat length (min; empty: inferred)numberoptional, advanced
POLICYPricing policyenum: SFMTA (2017) / SFpark pilotSFMTA (2017)
RATE_PERIODRate period (HH:MM-HH:MM; empty: all beats)stringoptional
LEVELRecommendation levelenum: Block face / Zone / Whole studyBlock face
OUTPUTRate recommendationssink

Outputs

NameDescriptionType
OUTPUTRate recommendationsoutputVector
RAISEDFaces with a rate increaseoutputNumber
LOWEREDFaces with a rate decreaseoutputNumber

Spare parking near destinations zero2todlab:parking_spare_capacity

For each destination, the block faces whose midpoint lies within the walking radius (straight line, or along the street network when streets are given) and their spare capacity at one beat: spare=∑fmax⁡(0, Ceff,f−Vf)\text{spare} = \sum_f \max(0,\ C_{\mathrm{eff},f} - V_f) over the faces ff in reach (eff_cap and occupied at that beat). The beat defaults to the study-wide peak (the beat with the most vehicles).

Input: the occupancy by beat output of the occupancy tool. Output fields: dest_fid, faces_in_reach, spaces, occupied_at_beat, eff_cap, spare, beat, reach.

References

Parameters

NameDescriptionTypeDefault
DESTINATIONSDestinations (points)source
BEATSOccupancy by beat (from the occupancy tool)source
RADIUSWalking radius (m)number300.0
STREETSStreets (network distance; empty: straight line)sourceoptional
BEATBeat (YYYY-MM-DDTHH:MM; empty: study-wide peak)stringoptional
OUTPUTSpare capacity near destinationssink

Outputs

NameDescriptionType
OUTPUTSpare capacity near destinationsoutputVector
SPARE_TOTALSum of spare spacesoutputNumber

Hash licence plates zero2todlab:hash_plates

Copies a CSV of plate sightings with the plate column replaced by a token: the plate is normalised (NFKC, upper case, letters and digits only) and hashed with HMAC-SHA256 (RFC 2104) under a secret salt of at least 16 bytes, truncated to 16 hex characters. The same plate and salt always give the same token, so stays can be built; another salt gives unlinkable tokens. The file is streamed row by row; the raw plates never enter a QGIS layer.

Keep the salt secret and outside the project. Processing history records parameter values: prefer the salt file (only its path is recorded). Plates are personal data under GDPR and KVKK.

Parameters

NameDescriptionTypeDefault
INPUTRaw sightings CSVfile
PLATE_COLUMNPlate columnstringplate
TOKEN_COLUMNToken column writtenstringtoken
SALTSalt (at least 16 bytes)stringoptional
SALT_FILESalt file (first line)fileoptional
OUTPUTHashed sightings CSVfileDestination

Outputs

NameDescriptionType
OUTPUTHashed sightings CSVoutputFile
ROWSRows writtenoutputNumber

Workflow

Demo district zero2todlab:demo_district

A deterministic synthetic district (EPSG:32635) with planted values for every module: 8 stations with residents, jobs, land use, streets, transit stops and a GTFS feed for Wed 12 Mar 2025 (07:00-09:00); 6 continuous and 4 short count stations with a full 2025 hourly table and 60 road segments; 12 block faces in 3 zones with hourly beats 08:00-17:00 and hashed plate sightings. The same tables feed the dock's demo and the test suites.

Parameters

NameDescriptionTypeDefault
STATIONSDemo stationssink
POPULATIONDemo residentssink
JOBSDemo jobssink
LANDUSEDemo land usesink
STREETSDemo streetssink
STOPSDemo transit stopssink
DESTINATIONSDemo destinationssink
COUNT_STATIONSDemo count stationssink
COUNTSDemo hourly countssink
SEGMENTSDemo road segmentssink
FACESDemo block facessink
PARKING_COUNTSDemo parking countssink
SIGHTINGSDemo plate sightings (hashed)sink
PARKING_DESTINATIONSDemo parking destinationssink
GTFSDemo GTFS feedfileDestination

Outputs

NameDescriptionType
STATIONSDemo stationsoutputVector
POPULATIONDemo residentsoutputVector
JOBSDemo jobsoutputVector
LANDUSEDemo land useoutputVector
STREETSDemo streetsoutputVector
STOPSDemo transit stopsoutputVector
DESTINATIONSDemo destinationsoutputVector
COUNT_STATIONSDemo count stationsoutputVector
COUNTSDemo hourly countsoutputVector
SEGMENTSDemo road segmentsoutputVector
FACESDemo block facesoutputVector
PARKING_COUNTSDemo parking countsoutputVector
SIGHTINGSDemo plate sightings (hashed)outputVector
PARKING_DESTINATIONSDemo parking destinationsoutputVector
GTFSDemo GTFS feedoutputFile
SERVICE_DATEGTFS service dateoutputString

TOD and traffic lab (all modules) zero2todlab:todlab_full_run

Runs every module whose inputs are given, in the dock's order, and writes the HTML report: TOD (stations; buffers and pedsheds, 5D indicators, GTFS node indicators, node-place model and composite index with equal weights), AADT (count stations, hourly table and road segments), motorised LOS and pedestrian and bicycle LOS on the AADT segments, and the parking survey (faces, counts, optional hashed sightings, pricing when a rate field is given). Indicator names for the node-place model and the composite index are the output field names of the indicator step, e.g. departures, routes and activity_density_400, landuse_entropy_800.

Each module's formulas are in the help of its own tool and in the report.

Geographic or non-metric input is reprojected to the UTM zone of the layer centre; the outputs are written in that working CRS and the log says so.

References

Parameters

NameDescriptionTypeDefault
STATIONSTOD: stationssourceoptional
STATION_IDTOD: station id fieldfieldstation_idoptional
RADIITOD: buffer radii (m)string400, 800optional
NETWORK_RADIITOD: network pedshed budgets (m; needs streets)stringoptional
STREETSTOD: streetssourceoptional
PEDESTRIAN_FIELDTOD: street type fieldfieldoptional, advanced
POPULATIONTOD: residentssourceoptional
POPULATION_FIELDTOD: residents fieldfieldoptional
JOBSTOD: jobssourceoptional
JOBS_FIELDTOD: jobs fieldfieldoptional
LANDUSETOD: land usesourceoptional
LANDUSE_FIELDTOD: land-use category fieldfieldoptional
DESTINATIONSTOD: destinationssourceoptional
DESTINATION_WEIGHT_FIELDTOD: destination weight fieldfieldoptional
GRAVITY_BETATOD: Hansen gravity β\beta (per m; 0: off)number0.0advanced
TRANSIT_STOPSTOD: transit stopssourceoptional
GTFSTOD: GTFS feed (zip)fileoptional
GTFS_DATETOD: GTFS service date (YYYY-MM-DD)stringoptional
GTFS_WINDOWTOD: GTFS windowstring07:00-09:00optional
NODE_FIELDSTOD: node indicators (comma-separated)stringoptional
PLACE_FIELDSTOD: place indicatorsstringoptional
COMPOSITE_FIELDSTOD: composite indicatorsstringoptional
COST_FIELDSTOD: cost indicators among themstringoptional
COUNT_STATIONSAADT: count stationssourceoptional
COUNT_STATION_IDAADT: station id fieldfieldstationoptional
KIND_FIELDAADT: kind fieldfieldoptional
GROUP_FIELDAADT: factor group fieldfieldoptional
COUNTSAADT: hourly count tablesourceoptional
COUNT_STATIONAADT: station columnfieldstationoptional
COUNT_DATETIMEAADT: date-time columnfielddatetimeoptional
COUNT_VOLUMEAADT: volume columnfieldvolumeoptional
COUNT_DIRECTIONAADT: direction columnfieldoptional
COUNT_CLASSAADT: vehicle class columnfieldoptional, advanced
COUNT_DATEAADT: date column (for clock times)fieldoptional, advanced
HOUR_ENDINGAADT: stamps mark the end of the hourbooleanFalseadvanced
SEGMENTSAADT: road segmentssourceoptional
MODEL_FIELDSAADT: model covariatesfieldoptional
FACILITY_FIELDLOS: facility fieldfieldoptional
LANES_FIELDLOS: lanes per direction fieldfieldlanesoptional
FFS_FIELDLOS: free-flow speed field (km/h)fieldoptional
SPEED_LIMIT_FIELDLOS: speed limit field (km/h)fieldoptional
SPEED_FIELDLOS: observed travel speed field (km/h)fieldoptional
PEDBIKE_MAPLOS: pedestrian and bicycle mapping (column=field; ...)stringoptional
FACESParking: block facessourceoptional
FACE_IDParking: face id fieldfieldface_idoptional
SPACESParking: spaces fieldfieldspacesoptional
ZONEParking: zone fieldfieldoptional
TIME_LIMITParking: time limit field (min)fieldoptional
RATEParking: hourly rate fieldfieldoptional
PARKING_COUNTSParking: occupancy countssourceoptional
SIGHTINGSParking: hashed plate sightingssourceoptional
RATE_PERIODParking: rate period (HH:MM-HH:MM)stringoptional
TOD_STATIONSTOD stationssinkoptional
TOD_CATCHMENTSTOD catchmentssinkoptional
AADT_SEGMENTSSegments with AADT and LOSsinkoptional
AADT_STATIONSCount stations with AADTsinkoptional
PARKING_FACESParking block facessinkoptional
PARKING_BEATSParking occupancy by beatsinkoptional
REPORTHTML reportfileDestinationoptional

Outputs

NameDescriptionType
TOD_STATIONSTOD stationsoutputVector
TOD_CATCHMENTSTOD catchmentsoutputVector
AADT_SEGMENTSSegments with AADT and LOSoutputVector
AADT_STATIONSCount stations with AADToutputVector
PARKING_FACESParking block facesoutputVector
PARKING_BEATSParking occupancy by beatoutputVector
REPORTHTML reportoutputHtml
MODULESModules runoutputString

Worked demo example

The numbers below come from running every module on the demo district with the settings of the test suites (TOD: buffers of 400 and 800 m and an 800 m pedshed, node = departures and routes, place = activity density 400 and land-use entropy 800, composite of activity density 400, departures and mean distance 400 as a cost; AADT: kind and group fields, model covariates fclass and lanes; parking: rate period 09:00-12:00). The demo generator plants the values the analysis must recover.

TOD stations

Activity density 400 =(P+J)/AC= (P + J) / A_C with AC=π (400 m)2=50.27 haA_C = \pi\,(400\,\mathrm{m})^2 = 50.27\,\mathrm{ha}. The node-place columns here use two node and two place indicators, so their classes differ from the planted ones, which are defined on departures and activity density 400 alone; the test suites check the planted classes with that choice.

StationResidents 400Jobs 400Activity density 400 (/ha) Departures 07-09NodePlaceClassPlanted class (departures / density) TOD scoreRank
S12,7601,84091.511201.0000.700unsustained nodestress0.6332
S23,0002,00099.471050.7580.750stressstress0.9501
S31,8001,20059.68700.5830.500balancedbalanced0.5003
S41,6801,12055.70800.4670.475balancedbalanced0.3506
S560040019.89300.0500.250dependencydependency0.2008
S61,08072035.81900.5170.350balancedunsustained node0.4674
S72,4001,60079.58350.0750.625unsustained placeunsustained place0.4674
S81,5601,04051.73200.0000.450unsustained placeunsustained place0.3007

Counts and AADT

Continuous station C1: AADT 5,504.6 (planted 5,504.6), K=0.0986K = 0.0986, D=0.55D = 0.55, method hourly_weighted. Short count K1 expanded with its group: AADT 3,564.6 (planted 3,564.6), 95 % interval 3,564.6-3,564.6 (zero width here: every urban counter of the demo carries the same seasonal pattern, so the group factors have no spread; real groups give a real interval). Segments: 10 counted, 49 modelled; model n=10n = 10, adjusted R2=0.909R^2 = 0.909, LOOCV MAPE=12.6 %\mathrm{MAPE} = 12.6\,\%, smearing factor S=1.0032S = 1.0032. One segment of the unseen class service stays NULL, and count station U1 (40 m from any road, tolerance 25 m) is reported unmatched.

Level of service

Motorised LOS letters on the 60 segments: A 4, B 7, C 13, D 11, E 16, F 8, none 1. A hand check: AADT=20 000\mathrm{AADT} = 20\,000, K=0.10K = 0.10, D=0.55D = 0.55, PHF=0.92\mathrm{PHF} = 0.92, N=2N = 2 lanes, PT=0.05P_T = 0.05, FFS=100 km/h\mathrm{FFS} = 100\,\mathrm{km/h} freeway gives fHV=1/1.05f_{HV} = 1/1.05, vp=20 000×0.10×0.550.92×2×(1/1.05)=627.72 pc/h/ln,v_p = \frac{20\,000 \times 0.10 \times 0.55}{0.92 \times 2 \times (1/1.05)} = 627.72\,\mathrm{pc/h/ln}, density ρ=vp/FFS=10.10 pc/mi/ln\rho = v_p/\mathrm{FFS} = 10.10\,\mathrm{pc/mi/ln} (6.28 pc/km/ln6.28\,\mathrm{pc/km/ln}), LOS A.

Parking

FaceZoneSpacesPeak occupiedPeak rate Above 85 %TurnoverMean duration (min)OverstaysRecommended rate
F01Z110111.10010.400195.022.25
F02Z11370.53800.308135.001.75
F03Z11680.50000.250195.021.75
F04Z119211.10510.211180.022.25
F05Z21160.54500.273180.0NULL1.75
F06Z21480.57100.214180.0NULL1.75
F07Z217181.05910.176120.0NULL2.25
F08Z220100.50000.150240.0NULL1.75
F09Z31260.50000.250160.0NULL0.75
F10Z315161.06710.200180.0NULL1.25
F11Z318100.55600.167200.0NULL0.75
F12Z31060.60000.300120.0NULL0.75

Study-wide peak beat: 2025-03-12T12:00.

Limitations

Privacy

Licence plates are personal data under the GDPR and the Turkish KVKK (Law No. 6698). Plates are normalised (NFKC, upper case, letters and digits only) and replaced by HMAC-SHA256 (RFC 2104) with a secret salt of at least 16 bytes, truncated to 16 hex characters. In the dock the salt lives only in memory; it is never written to the project, the settings, the log or the report, and a raw plate column is never loaded into a QGIS layer. Processing history records parameter values, so in Processing prefer the salt file parameter (only its path is recorded).

References

  1. AASHTO (2009). AASHTO Guidelines for Traffic Data Programs, 2nd ed. American Association of State Highway and Transportation Officials, Washington, DC.
  2. Bertolini, L. (1999). Spatial development patterns and public transport: the application of an analytical model in the Netherlands. Planning Practice & Research, 14(2), 199-210.
  3. Calthorpe, P. (1993). The Next American Metropolis: Ecology, Community, and the American Dream. Princeton Architectural Press, New York.
  4. Cervero, R., Kockelman, K. (1997). Travel demand and the 3Ds: density, diversity, and design. Transportation Research Part D, 2(3), 199-219.
  5. Dowling, R., Reinke, D., Flannery, A., Ryus, P., Vandehey, M., Petritsch, T., Landis, B., Rouphail, N., Bonneson, J. (2008). Multimodal Level of Service Analysis for Urban Streets. NCHRP Report 616. Transportation Research Board, Washington, DC.
  6. Duan, N. (1983). Smearing estimate: a nonparametric retransformation method. Journal of the American Statistical Association, 78(383), 605-610.
  7. Ewing, R., Cervero, R. (2010). Travel and the built environment: a meta-analysis. Journal of the American Planning Association, 76(3), 265-294.
  8. Federal Highway Administration (2013). Traffic Monitoring Guide. FHWA-PL-13-015. U.S. Department of Transportation, Washington, DC.
  9. Federal Highway Administration (2022). Traffic Monitoring Guide. U.S. Department of Transportation, Washington, DC.
  10. Frank, L. D., Andresen, M. A., Schmid, T. L. (2004). Obesity relationships with community design, physical activity, and time spent in cars. American Journal of Preventive Medicine, 27(2), 87-96.
  11. MobilityData (2024). GTFS Schedule Reference. https://gtfs.org/schedule/reference/
  12. Goodchild, M. F., Lam, N. S.-N. (1980). Areal interpolation: a variant of the traditional spatial problem. Geo-Processing, 1, 297-312.
  13. Guerra, E., Cervero, R., Tischler, D. (2012). Half-mile circle: does it best represent transit station catchments? Transportation Research Record, 2276, 101-109.
  14. Transportation Research Board (2010). Highway Capacity Manual 2010. TRB, Washington, DC.
  15. Transportation Research Board (2016). Highway Capacity Manual, Sixth Edition: A Guide for Multimodal Mobility Analysis. TRB, Washington, DC.
  16. Hansen, W. G. (1959). How accessibility shapes land use. Journal of the American Institute of Planners, 25(2), 73-76.
  17. Iglewicz, B., Hoaglin, D. C. (1993). How to Detect and Handle Outliers. ASQC Quality Press, Milwaukee.
  18. Mohamad, D., Sinha, K. C., Kuczek, T., Scholer, C. F. (1998). Annual average daily traffic prediction model for county roads. Transportation Research Record, 1617, 69-77.
  19. National Academies of Sciences, Engineering, and Medicine (2024). NCHRP Research Report 1081 (factor groups for traffic monitoring). Transportation Research Board, Washington, DC.
  20. OECD, JRC (2008). Handbook on Constructing Composite Indicators: Methodology and User Guide. OECD Publishing, Paris.
  21. U.S. Access Board (2023). Accessibility Guidelines for Pedestrian Facilities in the Public Right-of-Way, 36 CFR Part 1190, R302.3-R302.4.
  22. Porta, S., Renne, J. L. (2005). Linking urban design to sustainability: formal indicators of social urban sustainability field research in Perth, Western Australia. Urban Design International, 10(1), 51-64.
  23. Pushkarev, B., Zupan, J. M. (1975). Urban Space for Pedestrians. MIT Press, Cambridge, MA.
  24. Reusser, D. E., Loukopoulos, P., Stauffacher, M., Scholz, R. W. (2008). Classifying railway stations for sustainable transitions: balancing node and place functions. Journal of Transport Geography, 16(3), 191-202.
  25. Rouphail, N., Hummer, J., Milazzo, J., Allen, P. (1998). Recommended Procedures for Chapter 13, Pedestrians, of the Highway Capacity Manual. FHWA-RD-98-107.
  26. San Francisco Municipal Transportation Agency (2017). Demand-Responsive Parking Pricing Policies: On-Street Parking Meters and Off-Street Lots (5 December 2017).
  27. Saaty, T. L. (1980). The Analytic Hierarchy Process. McGraw-Hill, New York.
  28. Shoup, D. C. (2005). The High Cost of Free Parking. APA Planners Press, Chicago.
  29. Vale, D. S. (2015). Transit-oriented development, integration of land use and transport, and pedestrian accessibility: combining node-place model with pedestrian shed ratio to evaluate and classify station areas in Lisbon. Journal of Transport Geography, 45, 70-80.
  30. Zhao, F., Chung, S. (2001). Contributing factors of annual average daily traffic in a Florida county: exploration with geographic information system and regression models. Transportation Research Record, 1769, 113-122.

Citation and licence

Eminoğlu, Y. (2026). 02TODLab - TOD and Traffic Lab (version 0.1.2) [QGIS plugin]. https://gitlab.com/geophilo1/zero2todlab. https://doi.org/10.5281/zenodo.24263644. The DOI 10.5281/zenodo.24263644 always resolves to the latest version; version 0.1.2 has DOI https://doi.org/10.5281/zenodo.24263645. Please also cite the method papers above.

GPL-2.0-or-later. Copyright (C) 2026 Yusuf Eminoğlu (Geophilo). The vendored todindex, aadtkit, streetlos, parkingstudy and transitfreq packages are MIT-licensed. Repository: https://gitlab.com/geophilo1/zero2todlab; issues: https://gitlab.com/geophilo1/zero2todlab/-/work_items; homepage: https://geophilo.com/zero2todlab/.