Supply either startDate (with an optional endDate) or days, as the two options are
mutually exclusive.
The lite endpoint runs the analysis synchronously and returns results immediately. The date range must not exceed 31 days, and you can submit only a single region.
// Continuous range: an omitted endDate defaults to three days ago
const result = await trafficAreaAnalytics({
startDate: '2024-08-01',
endDate: '2024-08-07',
functionalRoadClasses: ['MOTORWAY', 'MAJOR_ROAD', 'OTHER_MAJOR_ROAD', 'SECONDARY_ROAD', 'LOCAL_CONNECTING_ROAD', 'LOCAL_ROAD_HIGH_IMPORTANCE'],
hours: [7, 8, 9, 17, 18],
metrics: ['speed', 'congestionLevel'],
geometry: {
type: 'Polygon',
coordinates: [[[4.896128, 52.382402], [4.875701, 52.368459], [4.923611, 52.36341], [4.896128, 52.382402]]]
}
});
The parameters of the Traffic Area Analytics Lite service.