Project Structure
Below is an overview of the files in the Beijing Taxi Heatmap Visualization project.
File and Directory Descriptions
File/Directory | Description |
---|---|
frontend/index.html |
The main HTML file for the frontend of the application. It sets up the structure of the web page, includes necessary scripts and styles, and contains the elements for user interaction such as sliders and buttons. |
frontend/api.js |
Contains functions to interact with the backend APIs. Handles fetching heatmap data based on user input and manages communication between the frontend and backend services. |
frontend/map.js |
Responsible for initializing and managing the map visualization using deck.gl and MapLibre GL. It defines functions to create and update layers on the map, such as heatmap layers. |
frontend/app.js |
The main JavaScript file for the application's functionality. It handles user interactions, manages state variables, and integrates components like map layers and heatmap updates. |
frontend/map-timer.js |
Manages the timing and animation aspects of the map visualization. |
frontend/timelapse-control.js |
Contains functions and event listeners for the time control sliders and buttons. |
frontend/progress-bar.js |
(Unused) Implements the visual progress bar that indicates the loading and fetching status of heatmap data. |
frontend/timelapse-bar.js |
Manages the timelapse slider functionality. |
backend/main.py |
The primary backend application file built with FastAPI. Defines API endpoint for fetching heatmap data, initializes spatial indexing, and handles data processing tasks. Matches the taxi data with the street network and sends the weighted street segments to the frontend for display. |