science 這項產品或功能目前處於預先發布階段,也就是正式發布前的版本。正式發布前的產品和功能僅提供有限支援,且正式發布前產品和功能的變更可能與其他正式發布前版本不相容。正式發布前產品/功能受到《
Google 地圖平台服務專屬條款》規範。詳情請參閱
推出階段說明。
註冊即可試用 Places Insights!
以視覺化方式呈現查詢結果
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
分析和商業智慧工具對於發掘 BigQuery 資料的洞察資訊至關重要。BigQuery 支援多種 Google 和第三方資料視覺化工具,可用於分析地點洞察資料的查詢結果,包括:
- Looker Studio
- BigQuery Geo Viz
- Colab 筆記本
- Google Earth Engine
以下範例說明如何在下列項目中將結果視覺化:
- Looker Studio:這個平台可讓您建構及使用資料視覺化、資訊主頁和報表。
- BigQuery Geo Viz:BigQuery 中的地理空間資料視覺化工具,使用 Google Maps API。
如要進一步瞭解如何使用其他工具將資料視覺化,請參閱 BigQuery 說明文件。
查詢要視覺化的資料
以下視覺化範例使用下列查詢,產生紐約市設有輪椅無障礙入口的餐廳數量。這項查詢會傳回每個地理點的餐廳數量資料表,每個點的大小為 0.005 度。
由於您無法對 GEOGRAPHY
點執行 GROUP BY
作業,因此這項查詢會使用 BigQuery ST_ASTEXT
函式,將每個點轉換為 STRING
WKT 點表示法,並將該值寫入 geo_txt
欄。然後使用 geo_txt
執行 GROUP BY
。
SELECT
geo_txt, -- STRING WKT geometry value.
ST_GEOGFROMTEXT(geo_txt) AS geo, -- Convert STRING to GEOGRAPHY value.
count
FROM (
-- Create STRING WKT representation of each GEOGRAPHY point to
-- GROUP BY the STRING value.
SELECT WITH AGGREGATION_THRESHOLD
ST_ASTEXT(ST_SNAPTOGRID(point, 0.005)) AS geo_txt,
COUNT(*) AS count
FROM
`places_insights___us___sample.places_sample`
WHERE
'restaurant' IN UNNEST(types)
AND wheelchair_accessible_entrance = true
GROUP BY
geo_txt
)
下圖顯示這項查詢的輸出範例,其中 count
包含每個點的餐廳數量:

運用 Looker Studio 以圖表呈現資料
下圖顯示 Looker Studio 中的熱度圖資料。熱度圖會顯示密度,從低 (綠色) 到高 (紅色)。

將資料匯入 Looker Studio
如要將資料匯入 Looker Studio,請按照下列步驟操作:
在「查詢資料以視覺化」中執行上述查詢。
在 BigQuery 結果中,按一下「在 Looker Studio 中開啟」。系統會自動將結果匯入 Looker Studio。
Looker Studio 會建立預設報表頁面,並以結果的標題、表格和長條圖初始化。

選取網頁上的所有內容並刪除。
按一下「插入」->「熱度圖」,即可在報表中加入熱度圖。
在「圖表類型 -> 設定」下方,設定欄位,如下所示:

熱視圖會如上所示。您可以視需要選取「圖表類型」->「樣式」,進一步設定地圖外觀。
使用 BigQuery Geo Viz 呈現資料
下圖顯示 BigQuery Geo Viz 中以填滿地圖形式呈現的資料。填滿的地圖會顯示各點格的餐廳密度,點越大代表密度越高。

將資料匯入 BigQuery Geo Viz
如要將資料匯入 BigQuery Geo Viz,請按照下列步驟操作:
在「查詢資料以視覺化」中執行上述查詢。
在 BigQuery 結果中,按一下「Open in -> GeoViz」(在 GeoViz 中開啟)。
畫面會開啟「查詢」步驟。
選取「執行」按鈕來執行查詢。地圖會自動顯示地圖上的點。
選取「資料」即可查看資料。
在「資料」部分中,按一下「新增樣式」按鈕。
選取「fillColor」,然後使用滑桿啟用「以資料為準」樣式。
將其餘欄位設為如下所示:

按一下「套用樣式」,將樣式套用至地圖。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-17 (世界標準時間)。
[null,null,["上次更新時間:2025-07-17 (世界標準時間)。"],[],[],null,["Analysis and [business intelligence\ntools](https://cloud.google.com/bigquery/docs/data-analysis-tools-intro) are\ncrucial to helping you discover insights from your BigQuery data. BigQuery\nsupports several Google and third-party [data visualization\ntools](https://cloud.google.com/bigquery/docs/geospatial-visualize) that you can\nuse to analyze the results of your queries on Places Insights data, including:\n\n- Looker Studio\n- BigQuery Geo Viz\n- Colab notebooks\n- Google Earth Engine\n\nThe example below describes how to visualize your results in:\n\n- Looker Studio, a platform that lets you build and consume data visualizations, dashboards, and reports.\n- BigQuery Geo Viz, a geospatial data visualization tool in BigQuery using Google Maps APIs.\n\nSee the [BigQuery\ndocumentation](https://cloud.google.com/bigquery/docs/geospatial-visualize) for\nmore information on visualizing your data using other tools.\n\nQuery data to visualize\n\nThe visualization examples below use the following query to generate a count of\nrestaurants in New York City with a wheelchair accessible entrance.\nThis query returns a table of restaurant\ncounts per geographical *point* where the size of each point is 0.005 degrees.\n\nBecause you cannot perform a `GROUP BY` operation on a `GEOGRAPHY` point, this\nquery uses the BigQuery\n[`ST_ASTEXT`](https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions#st_astext)\nfunction to convert each point into the `STRING`\n[WKT](https://en.wikipedia.org/wiki/Well-known_text) representation of the\npoint, and writes that value to the `geo_txt` column. It then performs the\n`GROUP BY` using `geo_txt`. \n\n```googlesql\nSELECT\n geo_txt, -- STRING WKT geometry value.\n ST_GEOGFROMTEXT(geo_txt) AS geo, -- Convert STRING to GEOGRAPHY value.\n count\nFROM (\n -- Create STRING WKT representation of each GEOGRAPHY point to\n -- GROUP BY the STRING value.\n SELECT WITH AGGREGATION_THRESHOLD\n ST_ASTEXT(ST_SNAPTOGRID(point, 0.005)) AS geo_txt,\n COUNT(*) AS count\n FROM\n `places_insights___us___sample.places_sample`\n WHERE\n 'restaurant' IN UNNEST(types)\n AND wheelchair_accessible_entrance = true\n GROUP BY\n geo_txt\n)\n```\n\nThe following image shows an example output to this query where `count`\ncontains the number of restaurants for each point:\n\nVisualize data using Looker Studio\n\nThe following images show this data displayed in Looker Studio as a heatmap. The\nheatmap shows density from low (green) to high (red).\n\nImport your data into Looker Studio\n\nTo import your data into Looker Studio:\n\n1. Run the query above in [Query data to visualize](#query_data_to_visualize).\n\n2. In the BigQuery results, click **Open in -\\\u003e Looker Studio**. Your results\n are automatically imported into Looker Studio.\n\n3. Looker Studio creates a default report page and initializes it with a title,\n table, and bar graph of the results.\n\n4. Select everything on the page and delete it.\n\n5. Click **Insert -\\\u003e Heatmap** to add a heatmap to your report.\n\n6. Under **Chart types -\\\u003e Setup** configure the fields as shown below::\n\n7. The heatmap appears as above. You can optionally select **Chart types -\\\u003e\n Styles** to further configure the appearance of the map.\n\nVisualize data using BigQuery Geo Viz\n\nThe following images show this data displayed in BigQuery Geo Viz as a filled\nmap. The filled map shows the restaurant density by point cell, where the larger\nthe point corresponds to the higher density.\n\nImport your data into BigQuery Geo Viz\n\nTo import your data into BigQuery Geo Viz:\n\n1. Run the query above in [Query data to visualize](#query_data_to_visualize).\n\n2. In the BigQuery results, click **Open in -\\\u003e GeoViz**.\n\n3. The display opens to the **Query** step.\n\n4. Select the **Run** button to run the query. The map automatically shows\n the points on the map.\n\n5. Select **Data** to view the data.\n\n6. In the **Data** section, click the **Add styles** button.\n\n7. Select **fillColor** and then use the slider to enable **Data-driven**\n styling.\n\n8. Set the remaining fields as shown below:\n\n9. Click **Apply Style** to apply the styles to the map."]]