Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
In the Principal column, find all rows that identify you or a group that
you're included in. To learn which groups you're included in, contact your
administrator.
For all rows that specify or include you, check the Role column to see whether
the list of roles includes the required roles.
In the Principal column, find all rows that identify you or a group that
you're included in. To learn which groups you're included in, contact your
administrator.
For all rows that specify or include you, check the Role column to see whether
the list of roles includes the required roles.
Jika Anda tidak mengaktifkan penagihan untuk Google Cloud project yang digunakan dalam
tutorial ini, Anda harus mengupload dan menangani data di
sandbox BigQuery. Sandbox BigQuery memungkinkan Anda mempelajari
BigQuery dengan sekumpulan fitur terbatas BigQuery
tanpa biaya.
Dalam dialog Tambahkan data, di panel Filter Menurut, klik Set data publik.
Anda dapat menggunakan kolom Telusuri Marketplace atau filter untuk mempersempit penelusuran.
Pilih set data, lalu klik Tampilkan set data.
Di panel Explorer, set data Anda dipilih dan Anda dapat melihat
detailnya.
Opsional: Klik more_vertTampilkan tindakan di samping set data Anda untuk melihat opsi lainnya.
Setiap set data berisi tabel yang dapat Anda lihat dengan mengklik
arrow_rightAktifkan node di samping set data mana pun.
Membuat kueri set data publik
Pada langkah-langkah berikut, Anda akan membuat kueri set data publik Nama AS untuk menentukan
nama-nama yang paling umum di Amerika Serikat antara tahun 1910 dan 2013:
Jika kueri valid, tanda centang akan muncul bersama dengan jumlah
data yang diproses kueri. Jika kueri tidak valid,
tanda seru akan muncul bersama dengan pesan error.
Klik
Jalankan.
Nama yang paling umum tercantum di bagian Hasil kueri.
Baris header tabel berisi setiap nama kolom yang Anda pilih dalam
kueri.
Opsional: Untuk menampilkan durasi dan jumlah data yang diproses
kueri,
klik tab Informasi tugas di Hasil kueri.
Pembersihan
Agar akun Google Cloud Anda tidak dikenai biaya untuk
resource yang digunakan pada halaman ini, ikuti langkah-langkah berikut.
Menghapus project
Jika Anda menggunakan sandbox BigQuery untuk meng-kueri
set data publik, penagihan tidak akan diaktifkan untuk project Anda.
Cara termudah untuk menghilangkan penagihan adalah dengan menghapus project yang Anda
buat untuk tutorial.
Untuk menghapus project:
In the Google Cloud console, go to the Manage resources page.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-17 UTC."],[[["\u003cp\u003eThis guide explains how to locate and query public datasets in BigQuery using the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eBefore starting, you must enable billing for your Google Cloud project or use the BigQuery sandbox, which provides a limited, free environment.\u003c/p\u003e\n"],["\u003cp\u003eYou can access public datasets within the Google Cloud console by searching for "public datasets" in the \u003cstrong\u003eExplorer\u003c/strong\u003e pane.\u003c/p\u003e\n"],["\u003cp\u003eA step-by-step process is provided to run a SQL query against the "USA Names" public dataset to find the most common names between 1910 and 2013.\u003c/p\u003e\n"],["\u003cp\u003eThe tutorial covers how to delete the entire project to avoid incurring charges, as well as alternative options to preserve project IDs if necessary.\u003c/p\u003e\n"]]],[],null,["# Query a public dataset and visualize the results using BigQuery Studio\n======================================================================\n\nLearn how to query a public dataset and visualize the results by using\nBigQuery Studio.\n\n*** ** * ** ***\n\nTo follow step-by-step guidance for this task directly in the\nGoogle Cloud console, click **Guide me**:\n\n[Guide me](https://console.cloud.google.com/freetrial?redirectPath=/?walkthrough_id=bigquery--bigquery-quickstart-query-public-dataset)\n\n*** ** * ** ***\n\nBefore you begin\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n\n Make sure that you have the following role or roles on the project:\n\n BigQuery Job User, Service Usage Admin\n\n #### Check for the roles\n\n 1.\n In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/projectselector/iam-admin/iam?supportedpurview=project)\n 2. Select the project.\n 3.\n In the **Principal** column, find all rows that identify you or a group that\n you're included in. To learn which groups you're included in, contact your\n administrator.\n\n 4. For all rows that specify or include you, check the **Role** column to see whether the list of roles includes the required roles.\n\n #### Grant the roles\n\n 1.\n In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/projectselector/iam-admin/iam?supportedpurview=project)\n 2. Select the project.\n 3. Click person_add **Grant access**.\n 4.\n In the **New principals** field, enter your user identifier.\n\n This is typically the email address for a Google Account.\n\n 5. In the **Select a role** list, select a role.\n 6. To grant additional roles, click add **Add\n another role** and add each additional role.\n 7. Click **Save**.\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n\n Make sure that you have the following role or roles on the project:\n\n BigQuery Job User, Service Usage Admin\n\n #### Check for the roles\n\n 1.\n In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/projectselector/iam-admin/iam?supportedpurview=project)\n 2. Select the project.\n 3.\n In the **Principal** column, find all rows that identify you or a group that\n you're included in. To learn which groups you're included in, contact your\n administrator.\n\n 4. For all rows that specify or include you, check the **Role** column to see whether the list of roles includes the required roles.\n\n #### Grant the roles\n\n 1.\n In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/projectselector/iam-admin/iam?supportedpurview=project)\n 2. Select the project.\n 3. Click person_add **Grant access**.\n 4.\n In the **New principals** field, enter your user identifier.\n\n This is typically the email address for a Google Account.\n\n 5. In the **Select a role** list, select a role.\n 6. To grant additional roles, click add **Add\n another role** and add each additional role.\n 7. Click **Save**.\n\n1.\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n2. If you don't enable billing for the Google Cloud project that you use in this tutorial, then you query the public data in the BigQuery sandbox. The BigQuery sandbox lets you learn BigQuery with a limited set of BigQuery features at no charge.\n3. Ensure that the BigQuery API is enabled.\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=bigquery)\n\n If you created a new project, the BigQuery API is automatically\n enabled.\n\n\u003cbr /\u003e\n\nView a public dataset\n---------------------\n\nBigQuery public datasets are available by default in\nBigQuery Studio in a project named `bigquery-public-data`. In this\ntutorial you query the NYC Citi Bike Trips dataset. Citi Bike is a large bike\nshare program, with 10,000 bikes and 600 stations across Manhattan, Brooklyn,\nQueens, and Jersey City. This dataset includes Citi Bike trips since Citi Bike\nlaunched in September 2013.\n\n1. In the Google Cloud console, go to the **BigQuery Studio** page.\n\n [Go to BigQuery Studio](https://console.cloud.google.com/bigquery)\n2. In the **Explorer** pane, click\n **addAdd data**.\n\n3. In the **Add data** dialog, in the **Filter By** pane, click\n **Public datasets**.\n\n4. On the **Marketplace** page, in the **Search Marketplace** field, type `NYC\n Citi Bike Trips` to narrow your search.\n\n5. In the search results, click **NYC Citi Bike Trips**.\n\n6. On the **Product details** page, click **View dataset** . You can view\n information about the dataset on the **Details** tab.\n\nQuery a public dataset\n----------------------\n\nIn the following steps, you query the `citibike_trips` table to determine the\n100 most popular Citi Bike stations in the NYC Citi Bike Trips public dataset.\nThe query retrieves the station's name and location, and the number of\ntrips that started at that station.\n\nThe query uses the [ST_GEOGPOINT function](/bigquery/docs/reference/standard-sql/geography_functions#st_geogpoint)\nto create a point from each station's longitude and latitude parameters and\nreturns that point in a `GEOGRAPHY` column. The `GEOGRAPHY` column is used to\ngenerate a heatmap in the integrated geography data viewer.\n\n1. In the Google Cloud console, open the\n **BigQuery Studio** page.\n\n [Go to BigQuery Studio](https://console.cloud.google.com/bigquery)\n2. Click add_box\n **SQL query**.\n\n3. In the query editor, enter the following\n query:\n\n SELECT\n start_station_name,\n start_station_latitude,\n start_station_longitude,\n ST_GEOGPOINT(start_station_longitude, start_station_latitude) AS geo_location,\n COUNT(*) AS num_trips\n FROM\n `bigquery-public-data.new_york.citibike_trips`\n GROUP BY\n 1,\n 2,\n 3\n ORDER BY\n num_trips DESC\n LIMIT\n 100;\n\n If the query is valid, then a check mark appears along with the amount of\n data that the query processes. If the query is invalid, then an\n exclamation point appears along with an error message.\n\n\n4. Click\n **Run**.\n The most popular stations are listed in the\n **Query results**\n section.\n\n\n5. Optional: To display the duration of the job and the amount of data that the\n query job processed, click the **Job information** tab in the **Query\n results** section.\n\n6. Switch to the **Visualization**\n tab. This tab generates a map to quickly visualize your results.\n\n7. In the **Visualization configuration** panel:\n\n 1. Verify that **Visualization type** is set to **Map**.\n 2. Verify that **Geography column** is set to **`geo_location`**.\n 3. For **Data column** , choose **`num_trips`**.\n 4. Use the add **Zoom in** option to reveal the map of Manhattan.\n\n\nClean up\n--------\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\n### Delete the project\n\nIf you used the [BigQuery sandbox](/bigquery/docs/sandbox) to query\nthe public dataset, then billing is not enabled for your project, and you don't\nneed to delete the project.\n\n\nThe easiest way to eliminate billing is to delete the project that you\ncreated for the tutorial.\n\nTo delete the project:\n\n| **Caution** : Deleting a project has the following effects:\n|\n| - **Everything in the project is deleted.** If you used an existing project for the tasks in this document, when you delete it, you also delete any other work you've done in the project.\n| - **Custom project IDs are lost.** When you created this project, you might have created a custom project ID that you want to use in the future. To preserve the URLs that use the project ID, such as an `appspot.com` URL, delete selected resources inside the project instead of deleting the whole project.\n|\n|\n| If you plan to explore multiple architectures, tutorials, or quickstarts, reusing projects\n| can help you avoid exceeding project quota limits.\n1. In the Google Cloud console, go to the **Manage resources** page.\n\n [Go to Manage resources](https://console.cloud.google.com/iam-admin/projects)\n2. In the project list, select the project that you want to delete, and then click **Delete**.\n3. In the dialog, type the project ID, and then click **Shut down** to delete the project.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nWhat's next\n-----------\n\n- Learn about the [BigQuery sandbox](/bigquery/docs/sandbox).\n- Learn [how to create a dataset, load data, and query tables in\n BigQuery Studio](/bigquery/docs/quickstarts/load-data-console)."]]