arrow_back

Connected Sheets: Qwik Start

登录 加入
访问 700 多个实验和课程

Connected Sheets: Qwik Start

实验 1 小时 universal_currency_alt 免费 show_chart 入门级
info 此实验可能会提供 AI 工具来支持您学习。
访问 700 多个实验和课程

GSP870

Google Cloud self-paced labs logo

Overview

Connected Sheets brings you the power and scale of a BigQuery data warehouse to the familiar context of Google Sheets. With Connected Sheets, you can analyze billions of rows and petabytes of data in Sheets without specialized knowledge of computer languages like SQL.

This makes it easy for anyone, not just data analysts, to apply pivot tables, charts, and formulas to massive datasets and hone in on their most valuable customers or product lines; develop forecasting models, uncover trends, and perform ad hoc analysis with ease.

What you will do

In this lab, you:

  • Connect a BigQuery dataset to Google Sheets.
  • Use Formulas to find the percentage of taxi trips that included a tip.
  • Use Charts to inspect popularity and trends of payment types.
  • Use Pivot tables to find out when taxi rides are the most expensive.
  • Use Extracts to import raw data from BigQuery to Connected Sheets.
  • Use Calculated columns to create a new column from transformations/combinations of existing columns.
  • Use Scheduled refresh to set up automatic data refreshes for your analyses.

Setup and requirements

Before you click the Start Lab button

Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.

This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.

To complete this lab, you need:

  • Access to a standard internet browser (Chrome browser recommended).
Note: Use an Incognito (recommended) or private browser window to run this lab. This prevents conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.
  • Time to complete the lab—remember, once you start, you cannot pause a lab.
Note: Use only the student account for this lab. If you use a different Google Cloud account, you may incur charges to that account.

Task 1. Open Google Sheets

  1. Click the Start Lab button. On the left is a panel populated with the temporary credentials that you must use for this lab.

Lab Details panel

  1. In a new incognito window, open the Google Sheets home page.

  2. In the Google Sign in page, paste the username from the Connection Details panel, then copy and paste the password.

Note: If you see the Choose an account page, click Use another account. Note: You must use the credentials from the Connection Details panel. Do not use your Qwiklabs credentials. If you have your own Google Cloud account, do not use it for this lab (avoids incurring charges).
  1. Click through the subsequent pages:
  • Accept the terms and conditions.
  • Do not add recovery options or two-factor authentication (because this is a temporary account).
  • Do not sign up for free trials.

After a few moments, you will be at the Google Sheets home page.

  1. In your Google Sheets tab, click on the Blank Spreadsheet button under Start a New Spreadsheet to create a new sheet. You will connect this sheet to a BigQuery dataset in the following steps.

The Blank button

Task 2. Connect to a BigQuery dataset

The data you will be analyzing will be taxi trips in Chicago. Start by connecting the public Chicago taxi dataset that's available in BigQuery to Google Sheets.

  1. Select Data > Data Connectors > Connect to BigQuery.

The navigation path to the Connect to BigQuery option

  1. If you see a Connect and Analyze big data in Sheets pop-up, click Get Connected.

  2. Select YOUR PROJECT ID > Public datasets > chicago_taxi_trips.

  3. Select taxi_trips and click Connect.

After about a minute, you should see a success message. You have just connected a BigQuery dataset to Google Sheets!

Task 3. Formulas

Next you will look at how to use Formulas with Connected Sheets. First, find out how many taxi companies there are in Chicago.

  1. Select Function > COUNTUNIQUE and add it to a new sheet.

The navigation path to Countunique

  1. Ensure New Sheet is selected and click Create to add it to a new sheet.

  2. Specify the company column by changing the value of your cell at row 1, column A to this:

=COUNTUNIQUE(taxi_trips!company)
  1. Click Apply.

Looks like there are 176 taxi companies in Chicago (your results may vary depending on the date the data is accessed).

Next, find the percentage of taxi rides in Chicago that included a tip.

  1. Using the COUNTIF function, find the total number of trips that included a tip. Copy and paste this function into the cell at row1, column D:
=COUNTIF(taxi_trips!tips,">0")
  1. Click Apply.

  2. Now, use the COUNTIF function to find the total number of trips where the fare was greater than 0. Add this function into the cell at row1, column E:

=COUNTIF(taxi_trips!fare,">0")
  1. Click Apply.

Click Check my progress to verify the objective. Use Formulas in Connected sheet

  1. Finally, compare the values from the previous two steps. Add this function into the cell at row1, column F:
=D1/E1

Turns out around 38.6% of taxi trips in Chicago included a tip (your results may vary depending on the date the data is accessed).

Task 4. Charts

What forms of payments are people using for their taxi rides? How has revenue from mobile payments changed over time?

Try viewing this information with Charts.

  1. Return to the taxi_trips tab by clicking on it at the bottom of your Google Sheets page.

  2. Click on the Chart button. Ensure New Sheet is selected and click Create.

  3. In the Chart editor window, under Chart type, select Pie chart.

  4. Various columns of the data are listed to the right. Drag payment_type to the Label field. Then drag fare into the Value field and click Apply.

  5. The value of Cash payments slightly edges out the value of Credit Card payments.

  6. Under Value > Fare, change Sum to Count. Click Apply.

  7. Now, the Cash transactions significantly outnumber Credit Card transactions, implying that the latter has a higher average value.

Next, find out how mobile payments have changed over time by using a line chart.

  1. Return to the taxi_trips tab by selecting it at the bottom of your Google Sheets page.

  2. Select the Chart button. Ensure New Sheet is selected and click Create.

  3. Click on the Chart Type dropdown and select the first option under Line.

  4. Drag trip_start_timestamp to the X-axis field.

  5. Check the Group by option and select Year-Month from the dropdown list.

  6. Drag fare into the Series field.

  7. Click Apply.

The overall revenue peaked in 2015. But, how have mobile payments changed over time?

  1. Under Filter click Add > payment_type.

  2. Select the Showing all items status dropdown.

  3. Click on the Filter by Condition dropdown and select Text contains from the list.

  4. Input mobile in the Value field.

  5. Click OK.

  6. Click Apply to generate a new line chart.

From the chart, you should see that mobile payments have been on a general upward trend. What other observations can you make from the graph?

Click Check my progress to verify the objective. Use Charts

Task 5. Pivot tables

At which time of day are there the highest amount of taxi rides? In the following section, you will analyze this using pivot tables.

  1. Return to the taxi_trips tab by selecting it at the bottom of your Google Sheets page.

  2. Click on the Pivot table button.

  3. Ensure New sheet is selected and click Create.

  4. Drag trip_start_timestamp into the Rows field.

  5. Choose Hour for the Group By option.

  6. Drag fare into the Values field.

  7. Select COUNTA for the Summarize by option.

  8. Click Apply.

You should now see a table that lists the number of rides per hour of the day (military time).

At which time of day do you see the most taxi rides?

Next, break it down by day of the week.

  1. Drag trip_start_timestamp to the Columns field.

  2. Select Day of the week under the Group by option.

  3. Click Apply.

  4. Select the data range B3:H26 and select Format > Number > Number.

  5. Click on the decrease decimal place button twice to make the data easier to read.

Now, apply some conditional formatting.

  1. Select all your data cells by clicking on the top left cell (first value for Sunday) and then shift + clicking on the bottom right cell (last value for Saturday).

  2. With all your cells selected, click Format > Conditional formatting.

  3. Select Color scale.

  4. Select the colors under Preview and choose White to Green. This will make the high values green and the low values white.

  5. Click Done.

  6. Close the Conditional Formatting window by clicking the x.

  7. Now, observe that peak periods on weekends are in the early morning and peak periods on weekdays are around the start and end of typical office hours.

What about the most expensive times for taxis?

  1. In the Values field, change the Summarize by option to Average.
  2. Click Apply.

Turns out that Monday early morning taxi fares are the most expensive!

Feel free to explore other combinations of data using pivot table and see what other insights you can uncover!

Click Check my progress to verify the objective. Use Pivot tables

Task 6. Using Extract

Sometimes, you may find that you are only working with a small subset of the dataset. You may also want to take a closer look at the raw data itself. In such cases you might find it easier to import a subset of the dataset from BigQuery into Connected Sheets.

By default, Connected Sheets shows a preview of 500 rows of raw data in BigQuery. To import more data into Connected Sheets, you can use Extract.

For this example you will extract 25000 rows of data from the columns trip_start_timestamp, fare, tips, and tolls, ordered by latest trip first.

  1. Return to the taxi_trips tab by selecting it at the bottom of your Google Sheets page.

  2. Click on the Extract button.

  3. Ensure New sheet is selected and click Create.

  4. In the Extract editor window, click Edit under the Columns section and select the columns trip_start_timestamp, fare, tips, and tolls. Click outside the dropdown box to continue.

  5. Click Add under the Sort section and select trip_start_timestamp. Click on Desc to toggle between ascending and descending order.

  6. Under Row limit, leave 25000 as it is to import 25000 rows.

  7. Click Apply.

That's it! You have just extracted thousands of rows of raw data from BigQuery into Connected Sheets!

Click Check my progress to verify the objective. Using Extract

Task 7. Calculated columns

Calculated columns allows you to add new columns that are transformations or combinations of existing columns. You will create a calculated column that calculates tip percentage.

  1. Return to the taxi_trips tab by selecting it at the bottom of your Google Sheets page.
  2. Click on the Calculated columns button.

On the right you can see the columns of your dataset and the functions available. You can also click on the question mark in the description to see examples of calculated columns.

  1. Enter tip_percentage into the Calculated column name field.
  2. Then copy and paste the following formula into the formula field:
=IF(fare>0,tips/fare*100,0)
  1. Click Add.

  2. Click Apply.

Now you can see the percentage of the fare that was tipped under the tip_percentage column.

Click Check my progress to verify the objective. Calculated columns

Task 8. Refresh all / Scheduled refresh

By default, all the analyses that you do on Connected Sheets remain unchanged until you decide to refresh it. This means that even if the data in BigQuery changes, your charts and tables will not change unexpectedly.

Now you'll see how you can update your analyses to the latest data, or schedule regular updates.

  1. To update a chart or table, select it then click the Refresh button.

You can also click the Refresh options button, located beside the name of your dataset, followed by Refresh all to update all Connected Sheets analyzes to the latest data.

  1. To schedule a refresh, click on Schedule refresh near the bottom of the Refresh options sidebar.

  2. Finally, choose your desired frequency and time for the automatic data refreshes.

  3. Click Save.

Congratulations!

You have learned how to:

  • Connect a BigQuery dataset to Google Sheets.
  • Use Formulas to find the percentage of taxi trips that included a tip.
  • Use Charts to inspect popularity and trends of payment types.
  • Use Pivot tables to find out when taxi rides are the most expensive.
  • Use Extracts to import raw data from BigQuery to Connected Sheets.
  • Use Calculated columns to create a new column from transformations/combinations of existing columns.
  • Use Scheduled refresh to set up automatic data refreshes for your analyses.

Feel free to explore even more functions of Connected Sheets on your own. Happy analysing!

Google Cloud training and certification

...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.

Manual Last Updated May 27, 2024

Lab Last Tested May 27, 2025

Copyright 2025 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.

准备工作

  1. 实验会创建一个 Google Cloud 项目和一些资源,供您使用限定的一段时间
  2. 实验有时间限制,并且没有暂停功能。如果您中途结束实验,则必须重新开始。
  3. 在屏幕左上角,点击开始实验即可开始

使用无痕浏览模式

  1. 复制系统为实验提供的用户名密码
  2. 在无痕浏览模式下,点击打开控制台

登录控制台

  1. 使用您的实验凭证登录。使用其他凭证可能会导致错误或产生费用。
  2. 接受条款,并跳过恢复资源页面
  3. 除非您已完成此实验或想要重新开始,否则请勿点击结束实验,因为点击后系统会清除您的工作并移除该项目

此内容目前不可用

一旦可用,我们会通过电子邮件告知您

太好了!

一旦可用,我们会通过电子邮件告知您

一次一个实验

确认结束所有现有实验并开始此实验

使用无痕浏览模式运行实验

请使用无痕模式或无痕式浏览器窗口运行此实验。这可以避免您的个人账号与学生账号之间发生冲突,这种冲突可能导致您的个人账号产生额外费用。