Accumulated road data refers to data you can build over time for your selected routes. You start receiving data once you create a route with Roads Selection API. This data can then be used for in-depth analysis, strategic planning, and understanding of long-term behavior of routes.

Accumulated road data is provided as time series data, which includes:

- Trip duration
- [Speed reading intervals (SRIs)](https://developers.google.com/maps/documentation/roads-management-insights/rmi-concepts.md.txt#speed-reading-intervals)
- Route geometry

## Set up BigQuery

Before you can access your road data in BigQuery, you must set up your Google
Cloud project and subscribe to the data exchange.

### Prerequisites

Ensure your Google Cloud project and account have the following configurations:

1. **Enable the BigQuery API.** For instructions, see [Query a public dataset
   with the Google Cloud
   console](https://cloud.google.com/bigquery/docs/quickstarts/query-public-dataset-console).
2. **Enable the Analytics Hub API.** See [Analytics Hub
   API](https://console.cloud.google.com/apis/api/analyticshub.googleapis.com/metrics).
3. **Grant necessary IAM roles.** Ensure your account has the following roles to perform subscriber tasks and create datasets:
4. [Analytics Hub Subscriber](https://cloud.google.com/bigquery/docs/analytics-hub-grant-roles#ah-subscriber-role) (`roles/analyticshub.subscriber`)
   - [BigQuery User](https://cloud.google.com/bigquery/docs/access-control#bigquery.user) (`roles/bigquery.user`)

### Subscribe to your data exchange

Your road data is shared with you through a private data exchange in BigQuery
(Analytics Hub). You will receive a specific subscribe link from a Google
partner to access your data. This dataset adheres to the following naming
convention:

```html
historical_roads_data_PROJECT_NUMBER.
```

To subscribe to your data:

1. **Click the subscribe link provided by your Google partner.** This link will take you directly to the data exchange in the Google Cloud console.
2. In the Google Cloud console, review the data exchange details.
3. Click the **Subscribe** button in the dialog.
4. When the subscription is complete, the linked dataset appears in the BigQuery **Explorer** panel in the Google Cloud console. You can now use the table names shown in the Explorer panel to access the data in your SQL queries.

## BigQuery tables

Accumulated road data of your selected routes is hosted under an isolated
BigQuery dataset of a Google-owned cloud project. It is shared with you through
a private data exchange created exclusively for you in BigQuery sharing
(Analytics Hub). To access the data, you need to subscribe to the data
exchange and create a linked dataset under your Google Cloud project.

The shared BigQuery dataset includes a few BigQuery tables that are defined and
created by Google. The following are the details of each table.

### `historical_travel_time` table

Following is the schema for BigQuery table `historical_travel_time`:

| Name | Mode | Type | Description |
|---|---|---|---|
| selected_route_id | NULLABLE | STRING | `selected_route_id` of the route |
| display_name | NULLABLE | STRING | Display name of the route |
| record_time | NULLABLE | TIMESTAMP | The timestamp when the route data is computed |
| duration_in_seconds | NULLABLE | FLOAT | The traffic-aware duration of the route. Omitted (`NULL`) when `has_road_closure` is `true`. |
| static_duration_in_seconds | NULLABLE | FLOAT | The traffic-unaware duration of the route |
| route_geometry | NULLABLE | GEOGRAPHY | The traffic-aware polyline geometry of the route |
| road_segment_ids | REPEATED | STRING | The road segments along the route, represented as Place IDs |
| has_road_closure | NULLABLE | BOOLEAN | Whether there is a full road closure on the route. When `true`, `duration_in_seconds` is omitted (`NULL`) because the route is impassable. A `NULL` value indicates that road closure information is undetermined. |

#### Table behaviors and facts

- The table is partitioned by day and has a 10-year expiration set for each partition.
- The table is updated every hour with latest traffic data written in batch.
- Once a new route is created in Roads Selection API, expect to wait up to 1 hour to see the data available in this table.
- Once a route is deleted from Roads Selection API, no new data is written to this table for the route. However, historical data remains until expiration.
- The road segments along the route follow topological order and are always connected.
- The `has_road_closure` flag is consistent with the full road closure status on Google Maps.

### `recent_roads_data` table

**Note** : This table is available only when your contract includes [Real-time
road data](https://developers.google.com/maps/documentation/roads-management-insights/real-time-data).

Different from `historical_travel_time`, this table also holds offset-based
[speed reading intervals](https://developers.google.com/maps/documentation/roads-management-insights/rmi-concepts.md.txt#speed-reading-intervals)
(`speed_reading_offsets`) and legacy coordinate-based speed reading intervals
(`speed_reading_intervals`). Here is the schema in BigQuery:

| Name | Mode | Type | Description |
|---|---|---|---|
| selected_route_id | NULLABLE | STRING | `selected_route_id` of the route |
| display_name | NULLABLE | STRING | Display name of the route |
| record_time | NULLABLE | TIMESTAMP | The timestamp when the route data is computed |
| duration_in_seconds | NULLABLE | FLOAT | The traffic-aware duration of the route. Omitted (`NULL`) when `has_road_closure` is `true`. |
| static_duration_in_seconds | NULLABLE | FLOAT | The traffic-unaware duration of the route |
| route_geometry | NULLABLE | GEOGRAPHY | The traffic-aware polyline geometry of the route |
| speed_reading_intervals | REPEATED | RECORD | Legacy coordinate-based speed reading intervals. May stop being populated on or after January 13, 2027. Use `speed_reading_offsets` instead. See [Speed reading intervals](https://developers.google.com/maps/documentation/roads-management-insights/rmi-concepts.md.txt#speed-reading-intervals). |
| speed_reading_intervals.interval_coordinates | REPEATED | GEOGRAPHY | Legacy. May stop being populated on or after January 13, 2027. Use `speed_reading_offsets` instead. The geometry for this interval |
| speed_reading_intervals.speed | NULLABLE | STRING | Legacy. May stop being populated on or after January 13, 2027. Use `speed_reading_offsets` instead. The classification of the speed for this interval. Possible values: NORMAL, SLOW, TRAFFIC_JAM. In this legacy field, heavy traffic jams (dark red) are also reported as TRAFFIC_JAM; TRAFFIC_JAM_HEAVY is never used. |
| road_segment_ids | REPEATED | STRING | The road segments along the route, represented as Place IDs |
| speed_reading_offsets | REPEATED | RECORD | Offset-based speed reading intervals representing traffic density across the route; each interval is demarcated by the distance offset from the start of the route. Omitted when `has_road_closure` is `true`. See [Speed reading intervals](https://developers.google.com/maps/documentation/roads-management-insights/rmi-concepts.md.txt#speed-reading-intervals). |
| speed_reading_offsets.start_offset | NULLABLE | INTEGER | The distance offset from the start of the route in meters for the start of the interval (inclusive) |
| speed_reading_offsets.end_offset | NULLABLE | INTEGER | The distance offset from the start of the route in meters for the end of the interval (exclusive; equals the `start_offset` of the subsequent interval) |
| speed_reading_offsets.speed | NULLABLE | STRING | The classification of the speed for this interval, aligned with the colors in the Google Maps traffic layer. Possible values: NORMAL (green), SLOW (yellow), TRAFFIC_JAM (red), TRAFFIC_JAM_HEAVY (dark red, available as of October 8, 2026) |
| has_road_closure | NULLABLE | BOOLEAN | Whether there is a full road closure on the route. When `true`, `duration_in_seconds` and `speed_reading_offsets` are omitted because the route is impassable. A `NULL` value indicates that road closure information is undetermined. |

#### Table behaviors and facts

- The table is partitioned by day and has a 60-day expiration set for each partition.
- The table is updated every hour with latest traffic data written in batch.
- Once a new route is created in Roads Selection API, expect to wait up to 1 hour to see the data available in this table.
- Once a route is deleted from Roads Selection API, no new data will be written to this table for the route. However, historical data remains until expiration.
- The road segments along the route follow topological order and are always connected.
- The `speed_reading_offsets` column is populated for rows recorded on or after October 8, 2026. Earlier rows have empty arrays.
- The legacy `speed_reading_intervals` column might stop being populated on or after January 13, 2027. Use `speed_reading_offsets` instead.
- The `has_road_closure` flag is consistent with the full road closure status on Google Maps.

### `routes_status` table

The table contains the selected routes metadata and status information. It aims
to provide an easier way of viewing all routes and status. It can be joined with
the other two tables for data filtering. Here is the schema in BigQuery:

| Name | Mode | Type | Description |
|---|---|---|---|
| selected_route_id | NULLABLE | STRING | `selected_route_id` of the route |
| display_name | NULLABLE | STRING | Display name of the route |
| status\* | NULLABLE | STRING | [Status](https://developers.google.com/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes.md.txt#State) of the route |
| validation_error | NULLABLE | STRING | [Validation error](https://developers.google.com/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes.md.txt#validationerror) of the route |
| low_road_usage_start_time | NULLABLE | TIMESTAMP | The time when the route first observed low road usage during re-validation. It is associated with VALIDATION_ERROR_LOW_ROAD_USAGE. |
| route_attributes | NULLABLE | STRING | Custom attributes for the selected route |
| dynamic_routing | NULLABLE | BOOLEAN | Indicates whether the route is dynamic (`true`) or fixed (`false`). See [`dynamicRouting`](https://developers.google.com/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes.md.txt#SelectedRoute.FIELDS.dynamic_routing). |
| origin | NULLABLE | GEOGRAPHY | Origin waypoint of the route |
| destination | NULLABLE | GEOGRAPHY | Destination waypoint of the route |
| intermediates | REPEATED | GEOGRAPHY | Intermediate waypoints of the route |
| static_route_geometry | NULLABLE | GEOGRAPHY | The polyline geometry of the static route calculated without live traffic from the waypoints |
| road_segment_ids | REPEATED | STRING | The road segments along the static route calculated without live traffic, represented as Place IDs |

> [!NOTE]
> **Note:** Route status in this table starts with `STATUS_` instead of `STATE_`. It is otherwise consistent with Roads Selection API.

#### Table behaviors and facts

- Only routes in STATUS_RUNNING or STATUS_INVALID status are included in this table.
- Routes metadata and status are updated every hour, non-stop.
- Once a new route is created in Roads Selection API, expect to wait up to 1 hour to see the route available in this table.
- Once a route is deleted from Roads Selection API, expect to wait up to 1 hour to see the selected route being removed from this table.
- For fixed routes (`dynamic_routing: false`), the Place IDs in `road_segment_ids` automatically update to reflect changes in Google's road network while still representing the same route. For dynamic routes (`dynamic_routing: true`), `road_segment_ids` is not updated.