Metrics

How can I add metrics on Routes Analysis console

Before we go into how to add metrics, let's define what they are:

❓What are metrics?

Metrics let you answer the who, what, and where with respect to an entity and create clusters of areas depending on unique properties. They are the building blocks of Locale and allow you to help gather useful insights​​ faster and hence take quick actions and run more experiments on the ground. They are created upon the entities chosen by the user.

Entities are any moving or stationary component in your business with a location & time component. For instance: orders, riders, users, stores, and so on. Internally, they are used to define the relationships between data sources.

How do we make it happen on Locale? We parse these questions as SQL queries to help you get better and faster insights.

Like routes where the most number of delays occur.

πŸ›  How to create metrics?

Here are the following steps you can follow to create metrics that you can visualize and analyze on routes analysis.

  • In the Metric studio on the left, click on the Add New Metric.

  • When the window appears, you will only see Event Count Metric in the Metric Type option as only events can be visualized on routes analysis.

  • Click on the Event Count Metric.

βœ… Event Count Metric

This metric calculates the number of times an event has occurred at a fixed asset. Fixed Assets are entities of their business that don’t move as time passes. Since the Routes Analysis console analyzes and visualizes to and fro movements between two points, there would be two corresponding events in this case.

For example, order_started can be the first event (Entity Event) and order_completed can be the Second Event.

πŸͺ What are the required fields?

Metric Name

This is a name given to the metric by the user.

✨ Pro tip: Name the metrics in a way that is understood across the organization by all the team members.

Entity

These are components of your business that have both a location and time component.

✨Note: The entities differ based on the user’s data and industry. In this case, it is likely to be orders for logistics, e-commerce and delivery companies and trips for ride hailing and micromobility companies.

Entity Event:

In routes analysis, this is the first event that occurs for every entity. For a logistics company, it can be when the order is placed or the delivery is started. For a mobility company, it can be the start of a trip. Examples are: trip_started, order_started, order_placed and so on.

Second Event:

It is the corresponding event that happens after the first event. For a logistics company, it can be when the order reaches a warehouse, or when the good has been delivered. For a mobility company, it can be the end of a trip. Examples are: trip_ended, order_completed and so on.

The Second Event field is available only in the Routes Analysis console.

Entity property

These are properties that are associated with the entity. Select a property that you want to visualize. For example, if you want to visualize total trips you can select trip_id. If you want to see something like median or average trip duration,select trip_duration and so on.

Aggregation

This field appears as soon as we choose the event property. What do we mean by aggregation?

It is basically the calculation of all the data points in one hexagon or a polygon.

✨ Note: This aggregation is performed on the event property field. For properties like user id, trip id where no two values can be the same we can only perform count or unique count.

There are different ways in which this calculation can be done:

  • Count: It is basically the counts of all data points in that particular area.

For example, there are three users in a hexagon with installs 45, 78, and 56. When you hover over the hexagon, you will see 3.

  • Unique count: It is similar to the count function as above, but all the duplicate values are excluded.

For example, there are three users in a hexagon with installs 45, 78, 56, and 56. When you hover over the hexagon, you will see 3. Here, 56 is only counted once.

  • Average: As the name suggests, it basically shows the average of all values associated with any entity.

For example, there are three users in a hexagon with installs 45, 78, and 56. When you hover over the hexagon, you will see an average of the three numbers, 59.67

  • Maximum: As the name suggests, it basically shows the largest of all values associated with any entity.

For example, there are three users in a hexagon with installs 45, 78, and 56. When you hover over the hexagon, you will see 78.

  • Minimum: As the name suggests, it basically shows the smallest of all values associated with any entity.

For example, there are three users in a hexagon with installs 45, 78, and 56. When you hover over the hexagon, you will see 45.

  • Median: As the name suggests, it basically shows the median of all values associated with any entity.

For example, there are three users in a hexagon with installs 45, 78, and 56. When you hover over the hexagon, you will see 56.

  • Sum: As the name suggests, it basically shows the smallest of all values associated with any entity.

For example, there are three users in a hexagon with installs 45, 78, and 56. When you hover over the hexagon, you will see 179.

Last updated