Visualize BigQuery GEOGRAPHY polygons with Looker Studio
Stay organized with collections
Save and categorize content based on your preferences.
This tutorial is intended for people who want to visualize GEOGRAPHY data from BigQuery using Looker Studio. To complete this tutorial, you'll need a BigQuery billing project. You don't need to know how to write SQL, and you can use the public dataset.
Goals
In this tutorial, you'll create a report that shows the affordability of rental properties in Washington state. You'll use a Google Map to visualize GEOGRAPHY data coming from a public BigQuery dataset.
In this tutorial, you'll accomplish the following:
The map won't appear yet. You'll need to add the field that uniquely identifies each location first.
In the Location section, click Invalid dimension, and then choose geo_id.
This field uniquely identifies each census tract.
In the Geospatialfield section, click Add metric, and then choose tract_geom.
This field contains the BigQuery GEOGRAPHY data that defines the polygons that you want to display.
The map should look like this:
Why is the map missing polygons? A Google Map in Looker Studio plots 100K points (polygon vertices) by default, but the tract_geom column contains 911,364 points. You can increase the number of points (up to a maximum of 1 million) or, to reduce the number of points, you can add a filter to focus on a specific area. In the STYLE tab of the chart properties panel, in the Filled Area Layer section, set the Max number of polygon vertices to 1,000,000.
Add a county filter
In the toolbar, click Add a control.
Select Drop-down list.
Set the Control field to county_name, and, for Default selection, enter King.
Now you should see all polygons for King County, which contains Seattle:
Style the map
The map's default color metric is Record Count. You can also choose a different metric.
In the Color metric section, choose percent_income_spent_on_rent.
Interact with the map
Depending on the options that you turned on, you can zoom and pan around and notice census tracts where people spend nearly half their income on rent, such as the University District in Seattle:
Change the tooltip
As you mouse over the map, you'll notice that the tooltip shows the geo_id, which isn't particularly meaningful in this context:
You can provide viewers with a more useful tooltip by changing the Tooltip dimension.
In the report, click Edit.
Select the map.
In the Tooltip section of the properties panel, choose lsad_name.
This field contains the human-readable census tract name:
Add more style to the map
You can customize the appearance of the map in the STYLE tab. For example, you could increase the fill opacity to 80% and change the color gradient from blue to red.
Congratulations
You've created a Google Map in Looker Studio that visualizes BigQuery GEOGRAPHY data.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Visualize BigQuery GEOGRAPHY polygons with Looker Studio\n\nThis tutorial is intended for people who want to visualize `GEOGRAPHY` data from BigQuery using Looker Studio. To complete this tutorial, you'll need a BigQuery billing project. You don't need to know how to write SQL, and you can use the public dataset.\n\nGoals\n-----\n\nIn this tutorial, you'll create a report that shows the affordability of rental properties in Washington state. You'll use a Google Map to visualize `GEOGRAPHY` data coming from a public BigQuery dataset.\n\nIn this tutorial, you'll accomplish the following:\n\n- [Create a new blank report](#create_a_new_blank_report)\n- [Add a Google Map to the report](#add_a_google_map_to_the_report)\n- [Configure the map](#configure_the_map)\n- [Style the map](#style_the_map)\n- [Interact with the map](#interact_with_the_map)\n- [Change the tooltip](#change_the_tooltip)\n- [Add more style to the map](#add_more_style_to_the_map)\n\n### Before you begin\n\nIf you don't already have a BigQuery billing project set up, you can [sign up for free](https://cloud.google.com/bigquery/).\n\nCreate a new blank report\n-------------------------\n\n1. [Sign in to Looker Studio.](https://lookerstudio.google.com)\n2. Click **Create** and then select **Report**.\n3. In the **Add data to report** panel, choose **BigQuery**.\n\n4. In the left navigation, choose **CUSTOM QUERY**.\n\n5. Select or enter your billing project ID.\n\n6. Under **Enter Custom Query**, paste the following SQL query:\n\n select\n ct.state_fips_code,\n ct.county_fips_code,\n c.county_name,\n ct.tract_ce,\n ct.geo_id,\n ct.tract_name,\n ct.lsad_name,\n ct.internal_point_lat,\n ct.internal_point_lon,\n ct.internal_point_geo,\n ct.tract_geom,\n acs.total_pop,\n acs.households,\n acs.male_pop,\n acs.female_pop,\n acs.median_age,\n acs.median_income,\n acs.income_per_capita,\n acs.gini_index,\n acs.owner_occupied_housing_units_median_value,\n acs.median_rent,\n acs.percent_income_spent_on_rent,\n from `bigquery-public-data.geo_census_tracts.census_tracts_washington` ct\n left join `bigquery-public-data.geo_us_boundaries.counties` c\n on (ct.state_fips_code || ct.county_fips_code) = c.geo_id\n left join `bigquery-public-data.census_bureau_acs.censustract_2018_5yr` acs\n on ct.geo_id = acs.geo_id\n\n | **Note:** This query retrieves data from BigQuery Public Datasets about US census tracts in Washington state. A census tract is a relatively small subdivision of a county. The query joins the geospatial data about the census tract boundaries with census statistics, such as population, age, income, and housing costs.\n7. Click **Add** to add this data to the report.\n\nAdd a Google Map to the report\n------------------------------\n\n1. Delete the table on the report page.\n2. Click **Add a chart.**\n3. In the **Google Maps** section, click **Filled map.**\n\nConfigure the map\n-----------------\n\nThe map won't appear yet. You'll need to add the field that uniquely identifies each location first.\n\n1. In the **Location** section, click **Invalid dimension** , and then choose **geo_id** .\n 1. This field uniquely identifies each census tract.\n2. In the **Geospatial** **field** section, click **Add metric** , and then choose **tract_geom** .\n 1. This field contains the BigQuery `GEOGRAPHY` data that defines the polygons that you want to display.\n\nThe map should look like this:\n\n\u003e **Why is the map missing polygons?** A Google Map in Looker Studio plots 100K points (polygon vertices) by default, but the **tract_geom** column contains 911,364 points. You can increase the number of points (up to a maximum of 1 million) or, to reduce the number of points, you can add a filter to focus on a specific area. In the **STYLE** tab of the chart properties panel, in the **Filled Area Layer** section, set the **Max number of polygon vertices** to **1,000,000** .\n\n### Add a county filter\n\n1. In the toolbar, click **Add a control**.\n2. Select **Drop-down list**.\n3. Set the **Control** field to **county_name** , and, for **Default selection** , enter **King**.\n\nNow you should see all polygons for King County, which contains Seattle:\n\nStyle the map\n-------------\n\nThe map's default color metric is **Record Count**. You can also choose a different metric.\n\nIn the **Color metric** section, choose **percent_income_spent_on_rent**.\n\nInteract with the map\n---------------------\n\nDepending on the options that you turned on, you can zoom and pan around and notice census tracts where people spend nearly half their income on rent, such as the University District in Seattle:\n\nChange the tooltip\n------------------\n\nAs you mouse over the map, you'll notice that the tooltip shows the `geo_id`, which isn't particularly meaningful in this context:\n\nYou can provide viewers with a more useful tooltip by changing the **Tooltip** dimension.\n\n1. In the report, click **Edit**.\n2. Select the map.\n3. In the **Tooltip** section of the properties panel, choose **lsad_name** .\n 1. This field contains the human-readable census tract name:\n\nAdd more style to the map\n-------------------------\n\nYou can customize the appearance of the map in the **STYLE** tab. For example, you could increase the fill opacity to 80% and change the color gradient from blue to red.\n\nCongratulations\n---------------\n\nYou've created a Google Map in Looker Studio that visualizes BigQuery `GEOGRAPHY` data.\n\nRelated resources\n-----------------\n\n- [Connect to Google BigQuery](/looker/docs/studio/connect-to-google-bigquery)\n- [BigQuery Public Datasets](https://console.cloud.google.com/marketplace/browse?q=geo&filter=solution-type:dataset) (several datasets with geographic polygon data)\n- [Google Maps reference](/looker/docs/studio/google-maps-reference)\n- [BigQuery geography functions](/bigquery/docs/reference/standard-sql/geography_functions)"]]