science Bu ürün veya özellik deneyseldir (GKST öncesi). GKST öncesi ürünler ve özelliklere verilen destek sınırlı olabilir. Ayrıca bu ürünler ve özelliklerde yapılan değişiklikler, GKST öncesi diğer sürümlerle uyumlu olmayabilir. GKST Öncesi Teklifler, Google Haritalar Platformu Hizmete Özgü Şartlar'a tabidir. Daha fazla bilgi için lansman aşamalarının açıklamalarını inceleyin. Places Insights'ı test etmek için kaydolun.
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
PLACES_COUNT_PER_GEO işlevi, aranacak coğrafi alan dizisini alır ve alan başına yer sayısı tablosunu döndürür. Örneğin, arama alanı olarak bir posta kodu dizisi belirtirseniz yanıtta her posta kodu için ayrı bir satır içeren bir tablo yer alır.
PLACES_COUNT_PER_GEO işlevi tablo döndürdüğünden, FROM ifadesiyle çağırın.
Giriş parametreleri:
Zorunlu: Arama alanını belirten geographiesfiltre parametresi. geographies parametresi, noktaları, çizgi dizilerini ve poligonları destekleyen BigQuery GEOGRAPHY veri türü tarafından tanımlanan bir değer dizisi alır.
İsteğe bağlı: Aramanızı daraltmak için ek filtre parametreleri.
Şunu döndürür:
Her coğrafi alan için bir satır içeren bir tablo. Tabloda geography (GEOGRAPHY), count (INT64) ve sample_place_ids (ARRAY<STRING>) sütunları bulunur. sample_place_ids sütunu, her coğrafi alan için en fazla 250 yer kimliği içerir.
Örnek: New York City'nin her ilçesindeki restoran sayısını hesaplama
Bu örnek, New York City'deki her ilçede faaliyet gösteren restoranların sayılarının yer aldığı bir tablo oluşturur.
Bu örnekte, county_geom'nin basitleştirilmiş bir sürümünü döndürmek için BigQuery
ST_SIMPLIFY
işlevi kullanılır. ST_SIMPLIFY işlevi, neredeyse düz kenar zincirlerini tek bir uzun kenarla değiştirir.
Aşağıdaki resimlerde, her ilçenin ana hattı da dahil olmak üzere bu verilerin Looker Studio'da dolu bir harita olarak gösterildiği görülmektedir:
Verilerinizi Looker Studio'ya aktarmak için:
Sonuçları oluşturmak için yukarıdaki işlevi çalıştırın.
BigQuery sonuçlarında Open in -> Looker Studio'yu (Şurada aç: Looker Studio) tıklayın. Sonuçlarınız otomatik olarak Looker Studio'ya aktarılır.
Looker Studio, varsayılan bir rapor sayfası oluşturur ve bu sayfayı sonuçların başlığı, tablosu ve çubuk grafiğiyle başlatır.
Sayfadaki her şeyi seçip silin.
Raporunuza dolu harita eklemek için Ekle -> Dolu harita'yı tıklayın.
Grafik türleri -> Kurulum bölümünde alanları aşağıda gösterildiği gibi yapılandırın:
Doldurulmuş harita yukarıdaki gibi görünür. Haritanın görünümünü daha fazla yapılandırmak için isteğe bağlı olarak Grafik türleri ->
Stiller'i seçebilirsiniz.
Yer İşletmeleri Analizleri sonuçlarını görselleştirme hakkında daha fazla bilgi ve örnek için Sorgu sonuçlarını görselleştirme başlıklı makaleyi inceleyin.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-09-06 UTC."],[],[],null,["The `PLACES_COUNT_PER_GEO` function takes an array of geographic areas to search\nand returns a table of places counts per area. For example, if you specify an\narray of zip codes as the search area, the response contains a table with a\nseparate row for each zip code.\n\nBecause the `PLACES_COUNT_PER_GEO` function returns a table, call it using\na `FROM` clause.\n\n- Input parameters:\n\n - **Required** : The `geographies`\n [filter parameter](/maps/documentation/placesinsights/experimental/filter-params) that specifies the search area. The\n `geographies` parameter takes an array of values defined by the BigQuery\n [`GEOGRAPHY`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#geography_type)\n data type, which supports points, linestrings, and polygons.\n\n - **Optional** : Additional [filter](/maps/documentation/placesinsights/experimental/filter-params) parameters to refine your\n search.\n\n- Returns:\n\n - A table with one row per geographic area. The table contains the columns `geography` (`GEOGRAPHY`) and `count` (`INT64`).\n\nExample: Calculate the number of restaurants in each county of New York City\n\nThis example generates a table of counts of operational restaurants per county\nin New York City.\n| **Note:** Because the response table contains a `geographies` field, you can visualize it using tools that support BigQuery `GEOGRAPHY` types. For an example of visualizing the results of a function, see [Visualize\n| results](#visualize_results). For more information and example on visualizing Places Insights results, see [Visualize query results](/maps/documentation/placesinsights/visualize-data).\n\nThis example uses the [United States Census Bureau\nData](https://console.cloud.google.com/marketplace/product/united-states-census-bureau/us-geographic-boundaries)\nBigQuery [public dataset](https://cloud.google.com/bigquery/public-data) to get\nthe boundaries for the three counties in New York City: \"Queens\",\"Kings\", \"New\nYork\". The boundaries of each county are contained in the `county_geom` column.\n\nThis example then uses the BigQuery\n[`ST_SIMPLIFY`](https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions#st_simplify)\nfunction to return a simplified version of `county_geom`. The `ST_SIMPLIFY`\nfunction replaces nearly straight chains of edges with a single long edge. \n\n```googlesql\nDECLARE geos ARRAY\u003cGEOGRAPHY\u003e;\n\nSET geos = (SELECT ARRAY_AGG(ST_SIMPLIFY(county_geom, 100))\n FROM `bigquery-public-data.geo_us_boundaries.counties`\n WHERE county_name IN (\"Queens\",\"Kings\", \"New York\") AND state_fips_code = \"36\");\n\nSELECT * FROM `maps-platform-analytics-hub.sample_places_insights_us.PLACES_COUNT_PER_GEO`(\n JSON_OBJECT(\n 'geographies', geos,\n 'types', [\"restaurant\"],\n 'business_status', [\"OPERATIONAL\"]\n )\n);\n```\n\nThe response for the function:\n\nVisualize results\n\nThe following images show this data displayed in Looker Studio as a filled map,\nincluding the outline of each county:\n\nTo import your data into Looker Studio:\n\n1. Run the function above to generate the results.\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 Filled map** to add a filled map to your report.\n\n6. Under **Chart types -\\\u003e Setup** configure the fields as shown below::\n\n7. The filled map appears as above. You can optionally select **Chart types -\\\u003e\n Styles** to further configure the appearance of the map.\n\nFor more information and example on visualizing Places Insights results, see\n[Visualize query results](/maps/documentation/placesinsights/visualize-data)."]]