Analytics Pipeline - S3-G31-Kotlin-QueueHub/mobile-app-android GitHub Wiki

Analytics Pipeline

New Features of the Analytics Service

The analytics service has been enhanced with new capabilities that allow for a more detailed analysis of user behavior and the popularity of locations. These features include:

Zone and Restaurant Analysis

  1. Most Frequent Zones:

    • The service now allows for the identification of the most visited zones by users. This helps understand which locations are of greatest interest and where activities are concentrated.
  2. Most Visited Restaurants:

    • An overall analysis of the most visited restaurants can now be obtained. This information is valuable for restaurant owners, as it reveals which establishments attract the most foot traffic and are popular among users.
  3. Restaurants by User:

    • In addition to general analysis, it is possible to review which restaurants are the most visited by each individual user. This provides a more personalized view of customer behavior, allowing businesses to create specific offers for their most frequent clients.

Wait Time Analysis

  1. Average Wait Times:
    • The service calculates the average wait times that users experience at each location. This metric is crucial for identifying which establishments have prolonged wait times, which can negatively impact customer satisfaction. With this information, owners can make informed decisions about queue management and resource allocation to enhance the user experience.

User Mobility Traceability

  1. Mobility Traceability:
    • The service generates traceability on user mobility according to the places they frequent. This involves tracking movement patterns, allowing organizations to understand how users navigate between different zones and restaurants. This information is critical for planning marketing strategies, improving customer flow management, and optimizing user experiences.

Pipeline Process of the Analytics Service

The pipeline in the analytics service consists of a series of functions designed to process data efficiently and generate actionable insights. The following describes each component of the pipeline:

Functions in the Pipeline

  1. queres_mapper()

    • Purpose: This function is used to extract information about places from various data sources. It retrieves data from the Queues, Places, and Queues/Places tables, which represent the relationship between a queue and a place. This extraction process is vital for consolidating relevant data for further analysis.
  2. process_restaurants()

    • Purpose: This function processes data related to restaurants. For each place, it counts the number of people who have successfully completed their wait in line and identifies the most frequent user. By utilizing the databases of Restaurants, Queues, and Turnos (turns), it provides insights into customer behavior and restaurant performance.
  3. process_turn()

    • Purpose: Unlike the previous function, this one does not take user data directly. Instead, it focuses on the turn ID. For each turn, it creates a record documenting the position of the place the user attended, the wait time, and the name of the place. This function leverages the Turnos, Queues, and Places databases to track user experiences and wait times effectively.

Output of the Pipeline

The output generated by these functions is provided in JSON format, which can be downloaded through the previously mentioned endpoints. This structured data allows for easy integration with visualization and analysis tools, making it simpler to interpret the insights generated.

General Pipeline Diagram

Example of Resulting Data:

place_efficience.json

user_behavior.json