Traffic Area Analytics NodeJS

Server-side traffic area analytics for a geocoded city using NodeJS

CodeSandbox is a third-party service and may use cookies to see your IP address and browser info. Cookie notice

View on GitHub
Loading the sandbox…
SDK 1.0.0-rc.7

A city name becomes a boundary polygon, and a week of traffic inside it prints as period averages and a day-by-day breakdown.

  • geocodeOne and geometryData turn the name into the city’s own boundary, so the analysis area is fetched rather than drawn by hand.
  • trafficAreaAnalytics aggregates over that boundary for the metrics and functionalRoadClasses asked for, so no per-road rollup happens here.
  • timedData.daily arrives with each date already a Date, ready to print.

Related examples