Update: 2026-07-06 17:51:16
This commit is contained in:
@@ -55,6 +55,7 @@ export function analyzeByZone(samples: RideSample[]): ZoneAnalysis[] {
|
||||
|
||||
/**
|
||||
* Analyze pricing by zone type (centre, mid, suburb, outskirts).
|
||||
* Passes countryCode to classifyZoneType so the correct city center is used.
|
||||
*/
|
||||
export function analyzeByZoneType(
|
||||
samples: RideSample[]
|
||||
@@ -62,7 +63,8 @@ export function analyzeByZoneType(
|
||||
const typeMap = new Map<string, number[]>();
|
||||
|
||||
for (const s of samples) {
|
||||
const zoneType = classifyZoneType(s.startLat, s.startLng);
|
||||
// Pass countryCode so we use the correct city center (not always Amman)
|
||||
const zoneType = classifyZoneType(s.startLat, s.startLng, s.countryCode);
|
||||
if (!typeMap.has(zoneType)) typeMap.set(zoneType, []);
|
||||
typeMap.get(zoneType)!.push(s.ppk);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user