Live request path
The sequence below focuses on what happens during a real dashboard analysis run.
Enter the analysis inputs
The user chooses an hour and types a location in InputForm. The component searches the local location index, resolves coordinates, and stores the last run in localStorage.
Route the request to the dashboard
The home page builds a query string from the submitted hour, location, latitude, and longitude, then navigates to /dashboard.
Request a prediction
DashboardPage calls getPrediction, which sends GET /predict with the chosen hour, location, latitude, and longitude.
Build features and score the models
PredictorService loads the saved model artifact, build_features creates temporal and geographic features, and the demand and supply models score the request.
Produce the explanation layer
InsightService turns the numeric gap into severity, explanation strings, and recommended actions using the threshold rules and peak-hour logic.
Persist the result and refresh analytics
The dashboard posts the prediction snapshot to MongoDB, then loads hourly trends, location trends, and model validation metrics in parallel.
Render the operational view
PredictionCard, MapView, TrendCharts, and the validation monitor turn the API responses into an analyst-friendly dashboard.