> Documentation index: https://developers.google.com/maps/documentation/llms.txt

Population Dynamics Insights (PDI) is a 330-dimensional embeddings dataset in BigQuery, aggregated at S2 cell level 12. A Google model generates the embeddings from aggregated Google Search trends and Google Maps busyness, points of interest, weather, and air quality data, for use in geospatial and predictive models.

## Population Dynamics Insights: key facts

- **Product:** Population Dynamics Insights
- **Also known as:** PDI, Population Dynamics embeddings
- **Category:** Analytics
- **Platform:** Dataset
- **Launch stage:** Preview
- **Lifecycle:** Active
- **Overview:** [Population Dynamics Insights overview](https://developers.google.com/maps/documentation/population-dynamics-insights/overview.md.txt)
- **Regional availability:** Limited. 17 countries (AU, BE, BR, CA, CH, DE, ES, FR, GB, IN, IT, JP, MX, NG, NL, PT, US); each country is a separate Analytics Hub listing. ([coverage details](https://developers.google.com/maps/documentation/population-dynamics-insights/cloud-setup.md.txt#available-listings))

## Population Dynamics Insights: when to use it

**Use Population Dynamics Insights when:**

- You need location embeddings that describe human behavior and environment as features for geospatial or predictive ML models in BigQuery.
- You need to find behaviorally similar locations, for example cosine similarity between S2 cells for expansion planning.
- You need to fill data gaps or predict regional outcomes by joining on `s2_cell_token` (`geo_id` in v1) or Place IDs.
**Don't use Population Dynamics Insights when:**

- You need exact POI counts, competitor locations, or brand density instead of latent embeddings. Use [Places Insights](https://developers.google.com/maps/documentation/placesinsights/quick-reference.md.txt) instead.
- You need PDI embeddings aggregated at US postal code level instead of S2 level 12 cells.
- You need sub-monthly (daily or weekly) forecasting for mature sites with multi-year history; use BigQuery `AI.FORECAST` (TimesFM) instead.

## Population Dynamics Insights: setup

- **Get started:** [Set up Population Dynamics Insights](https://developers.google.com/maps/documentation/population-dynamics-insights/cloud-setup.md.txt)
- **Reference:** [Population Dynamics Insights reference](https://developers.google.com/maps/documentation/population-dynamics-insights/reference.md.txt)
- **Release notes:** [Population Dynamics Insights release notes](https://developers.google.com/maps/documentation/population-dynamics-insights/release-notes.md.txt)

## Population Dynamics Insights: related products

- **Often used with:** [Places Insights](https://developers.google.com/maps/documentation/placesinsights/quick-reference.md.txt)

## Population Dynamics Insights: common mistakes

- **Problem:** You can't query the dataset until your account is onboarded and subscribed; there's no API key or public table. **Fix:** Submit the sign-up form, enable the BigQuery API and Analytics Hub API, get the Analytics Hub Subscription Owner (`roles/analyticshub.subscriptionOwner`) and BigQuery User (`roles/bigquery.user`) roles, then subscribe to each country's listing. See [/maps/documentation/population-dynamics-insights/cloud-setup](https://developers.google.com/maps/documentation/population-dynamics-insights/cloud-setup.md.txt).
- **Problem:** `S2_CELLIDFROMPOINT` returns a signed `INT64` (negative in some regions), which never matches the 7-character hex `s2_cell_token` (`geo_id` in v1) values, so joins return no rows. **Fix:** Convert points with `TO_S2_HEX(S2_CELLIDFROMPOINT(ST_GEOGPOINT(longitude, latitude), level => 12))` using the `TO_S2_HEX` helper from the docs. See [/maps/documentation/population-dynamics-insights/use-embeddings#convert_point_coordinates_to_s2_level_12_hex_tokens](https://developers.google.com/maps/documentation/population-dynamics-insights/use-embeddings.md.txt#convert_point_coordinates_to_s2_level_12_hex_tokens).
- **Problem:** `ST_GEOGPOINT` takes longitude first, then latitude. If you reverse them while converting points to S2 level 12 tokens, the query returns the wrong cells. **Fix:** Pass longitude first in `ST_GEOGPOINT(longitude, latitude)` before calling `S2_CELLIDFROMPOINT(..., level => 12)` and `TO_S2_HEX`. See [/maps/documentation/population-dynamics-insights/use-embeddings#convert_point_coordinates_to_s2_level_12_hex_tokens](https://developers.google.com/maps/documentation/population-dynamics-insights/use-embeddings.md.txt#convert_point_coordinates_to_s2_level_12_hex_tokens).
- **Problem:** The dataset has no polygon geometry for S2 cells, and BigQuery GIS can't convert an S2 token into a `GEOGRAPHY` polygon, so you can't map cells directly from the table. **Fix:** Decode tokens to polygons on the client, for example with Python `s2sphere` and `shapely`. To intersect custom boundaries, convert them to S2 level 12 tokens with `S2_COVERINGCELLIDS` and `TO_S2_HEX`. See [/maps/documentation/population-dynamics-insights/use-embeddings#get_s2_cell_geometry_from_an_s2_level_12_hex_token](https://developers.google.com/maps/documentation/population-dynamics-insights/use-embeddings.md.txt#get_s2_cell_geometry_from_an_s2_level_12_hex_token).
- **Problem:** Joining your data on geographic names with fuzzy string matching is error prone, and border S2 cells can intersect multiple administrative areas. **Fix:** Join on `s2_cell_token` (`geo_id` in v1) or filter repeated Place IDs in `administrative_area_level_1_ids` and `administrative_area_level_2_ids` (singular `_id` in v1) with `IN UNNEST(...)`. See [/maps/documentation/population-dynamics-insights/about-data#key_columns_and_metadata](https://developers.google.com/maps/documentation/population-dynamics-insights/about-data.md.txt#key_columns_and_metadata).
- **Problem:** The `features` column is a BigQuery `ARRAY<FLOAT64>`. ML libraries can't use it directly after you load it into `pandas`. **Fix:** Flatten the column or convert it into a NumPy matrix (for example, with `numpy.stack`) before training. See [/maps/documentation/population-dynamics-insights/about-data#key_columns_and_metadata](https://developers.google.com/maps/documentation/population-dynamics-insights/about-data.md.txt#key_columns_and_metadata).
- **Problem:** Model versions (`v1`, `v1.1`, and `v2.1`) each have a separate embedding space, so vectors and similarity scores are not comparable across versions. **Fix:** Keep all regions and months on the same model version. When moving to a new version, update slice offsets and retrain models, clusters, and thresholds. See [/maps/documentation/population-dynamics-insights/model-versions#model-versions-not-comparable](https://developers.google.com/maps/documentation/population-dynamics-insights/model-versions.md.txt#model-versions-not-comparable).
- **Problem:** Published full-country tables are not yet partitioned by `snapshot_date`, so filtering by date still scans all months of the `features` column. **Fix:** Materialize a working copy in your own BigQuery project with `PARTITION BY snapshot_date` before iterating to reduce query scan costs. See [/maps/documentation/population-dynamics-insights/use-embeddings#create-a-partitioned-working-copy](https://developers.google.com/maps/documentation/population-dynamics-insights/use-embeddings.md.txt#create-a-partitioned-working-copy).

## What you can do with Population Dynamics Insights

See the guides linked below for each task, or compare across products in the
[Capabilities Explorer](https://developers.google.com/maps/documentation/capabilities-explorer.md.txt).

- [Query 330-dimensional behavioral and environmental embeddings by S2 level 12 cell or administrative region in BigQuery.](https://developers.google.com/maps/documentation/population-dynamics-insights/about-data.md.txt) Preview
- [Convert point coordinates or custom polygons to S2 level 12 cell tokens to align business data with location embeddings.](https://developers.google.com/maps/documentation/population-dynamics-insights/use-embeddings.md.txt) Preview
- [Find behaviorally similar locations across regions using vector cosine similarity in BigQuery.](https://developers.google.com/maps/documentation/population-dynamics-insights/use-embeddings.md.txt) Preview
- [Join location embeddings with ground-truth outcomes in SQL or Python to train geospatial prediction and forecasting models.](https://developers.google.com/maps/documentation/population-dynamics-insights/use-embeddings.md.txt) Preview