Skip to content

@grabm/abm/analytics / Function: analyzeRun() ​

ts
import { analyzeRun } from '@grabm/abm/analytics'

Usage guide · Package exports

ts
function analyzeRun<R>(run, options?): object;

Calculate synchronous metrics and diagnostics without loading DOM or Plotly. Defaults to the urban profile and built-in registry; compare like-for-like inputs.

Type Parameters ​

R ​

R extends SharedGraphRunResult

Parameters ​

run ​

R

options? ​

AnalyzeOptions<R> = {}

Returns ​

object

accessibility ​

ts
accessibility: object;

accessibility.coverage10 ​

ts
coverage10: number;

accessibility.coverage15 ​

ts
coverage15: number;

accessibility.coverage5 ​

ts
coverage5: number;

accessibility.groups ​

ts
groups: object[];

accessibility.mode ​

ts
mode: "walk";

breakdowns ​

ts
breakdowns: object;

breakdowns.activities ​

ts
activities: object[];

breakdowns.cohorts ​

ts
cohorts: object[];

breakdowns.modes ​

ts
modes: object[];

breakdowns.outcomes ​

ts
outcomes: object[];

builtForm ​

ts
builtForm: object = builtFormAnalysisSchema;

builtForm.classifiedAreaM2 ​

ts
classifiedAreaM2: number;

builtForm.classifiedElementCount ​

ts
classifiedElementCount: number;

builtForm.diversity ​

ts
diversity: object;

builtForm.diversity.landUses ​

ts
landUses: object[];

builtForm.diversity.programmes ​

ts
programmes: object[];

builtForm.diversity.warnings ​

ts
warnings: string[];

builtForm.kind ​

ts
kind: "built-form";

builtForm.parking ​

ts
parking: object;

builtForm.parking.byKind ​

ts
byKind: object[];

builtForm.parking.total ​

ts
total: object = parkingAllocationSchema;

builtForm.parking.total.areaM2 ​

ts
areaM2: number;

builtForm.parking.total.estimatedSpaces ​

ts
estimatedSpaces: number | null;

builtForm.parking.total.facilityCount ​

ts
facilityCount: number;

builtForm.parking.total.kind ​

ts
kind: "motor-vehicle" | "accessible" | "bike-scooter" | "other" | "all";

builtForm.parking.total.shareOfClassifiedArea ​

ts
shareOfClassifiedArea: number;

builtForm.parking.warnings ​

ts
warnings: string[];

builtForm.unclassifiedElementCount ​

ts
unclassifiedElementCount: number;

builtForm.warnings ​

ts
warnings: string[];

demandTimeline ​

ts
demandTimeline: object[];

diagnosticExplanations ​

ts
diagnosticExplanations: string[];

edgeDetailCoverage? ​

ts
optional edgeDetailCoverage?: object;

edgeDetailCoverage.kind ​

ts
kind: "observed";

edgeDetailCoverage.omittedZeroEdges ​

ts
omittedZeroEdges: number;

edgeDetailCoverage.totalEdges ​

ts
totalEdges: number;

edges ​

ts
edges: object[];

facilities ​

ts
facilities: object[];

gateways ​

ts
gateways: object[];

kind ​

ts
kind: "abm-analysis";

metrics ​

ts
metrics: Record<string, {
  formula: string;
  id: string;
  label: string;
  normalizedValue: number | null;
  sampleSize: number;
  unit: string;
  value: number | null;
  warnings: string[];
}>;

observations ​

ts
observations: object[];

peakExplanations ​

ts
peakExplanations: object[];

profileId ​

ts
profileId: string;

runHash ​

ts
runHash: string;

score ​

ts
score: object;

score.components ​

ts
components: Record<string, {
  contribution: number;
  label: string;
  value: number;
  weight: number;
}>;

score.displayTotal ​

ts
displayTotal: number;

score.total ​

ts
total: number;

travelTimeDistribution ​

ts
travelTimeDistribution: object[];

trips ​

ts
trips: object;

trips.attempted ​

ts
attempted: number;

trips.cancelled ​

ts
cancelled: number;

trips.capacityRejected ​

ts
capacityRejected: number;

trips.completed ​

ts
completed: number;

trips.completionRate ​

ts
completionRate: number;

trips.generatedAgents ​

ts
generatedAgents: number;

trips.meanHopCount ​

ts
meanHopCount: number;

trips.meanTravelMinutes ​

ts
meanTravelMinutes: number;

trips.modeSplit ​

ts
modeSplit: Record<string, number>;

trips.p50HopCount ​

ts
p50HopCount: number;

trips.p50TravelMinutes ​

ts
p50TravelMinutes: number;

trips.p95HopCount ​

ts
p95HopCount: number;

trips.p95TravelMinutes ​

ts
p95TravelMinutes: number;

trips.travelEfficiency ​

ts
travelEfficiency: number;

trips.unreachable ​

ts
unreachable: number;

warnings ​

ts
warnings: string[];

Documentation for the grABM library.