
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Check tables is created
/ 10
Check penalty kick success rate
/ 20
Analyze shot distance
/ 20
Calculate shot distance
/ 5
Calculate shot angle
/ 5
Create BigQuery logistic regression model
/ 20
Make predictions from the model
/ 20
In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to complete the tasks on your own! An automated scoring system (shown on this page) will provide feedback on whether you have completed your tasks correctly.
When you take a challenge lab, you will not be taught new Google Cloud concepts. You are expected to extend your learned skills, like changing default values and reading and researching error messages to fix your own mistakes.
To score 100% you must successfully complete all tasks within the time period!
This lab is recommended for students who have enrolled in the Perform Predictive Data Analysis in BigQuery skill badge. Are you ready for the challenge?
Topics tested:
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:
Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the left is the Lab Details pane with the following:
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab Details pane.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Details pane.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
Use BigQuery to load the data from the Cloud Storage bucket, write and execute queries in BigQuery, analyze soccer event data. Then use BigQuery ML to train an expected goals model on the soccer event data and evaluate the impressiveness of World Cup goals.
Field | Value |
---|---|
Source | Cloud Storage |
Select file from Cloud Storage bucket | spls/bq-soccer-analytics/events.json |
File format | JSONL (Newline delimited JSON) |
Table name | |
Schema | Check the box marked Schema Auto detect
|
Field | Value |
---|---|
Source | Cloud Storage |
Select file from Cloud Storage bucket | spls/bq-soccer-analytics/tags2name.csv |
File format | CSV |
Table name | |
Schema | Check the box marked Auto detect
|
Click Check my progress to verify the objective
Points to consider:
players
table to get player names from their IDsClick Check my progress to verify the objective:
positions
field in the Points to consider:
isGoal
field by looking "inside" the tags field.SELECT
statement aggregates the number of shots, the number of goals and the percentage of goals from shots by distance rounded to the nearest meter.Click Check my progress to verify the objective:
Create some user-defined functions in BigQuery that help with shot distance and angle calculations, which help to prepare the soccer event data for eventual use in an ML model.
soccer
dataset using the following code-blocks:Click Check my progress to verify the objective
soccer
dataset using the following code-blocks:Click Check my progress to verify the objective
In this case, you build an expected goals model from the soccer event data to predict the likelihood of a shot going in for a goal given its type, distance, and angle.
Expected goals models are commonly used in soccer analytics to measure the quality of shots and finishing/saving ability given shot quality, and they have a variety of applications in both retrospective match analysis and making projections.
Points to consider:
SELECT
statement aggregates isGoal outcome variable along with features of interest from the event data, shot distance, and angle calculated using the user-defined functions defined in the previous step.World Cup
matches for model fitting purposes and include both "open play" & free kick shots (including penalties).Click Check my progress to verify the objective
This opens up a new tab that has information about the model that was just trained.
Now that you've fit an expected goals model of reasonable accuracy and explainability, you can apply it to "new" data - in this case, the 2018 World Cup (which was left out of the model fitting).
The logistic regression model
Points to consider:
SELECT
statement aggregates isGoal outcome variable along with features of interest from the event data, shot distance, and angle calculated using the user-defined functions defined in the previous step.World Cup
matches for model predictions and include both "open play" and free kick shots (including penalties).Click Check my progress to verify the objective
You have successfully completed the Predict Soccer Match Outcomes with BigQuery ML: Challenge Lab by engaging in various tasks involving soccer data and machine learning models. During this challenge, you uploaded files from Cloud Storage into BigQuery tables and executed queries to analyze the data within these tables. Additionally, you created user-defined functions in BigQuery to calculate the shot distance and shot angle. Utilizing BigQuery ML, you built an expected goals model and applied BigQuery ML's prediction functionality on "new" data from the 2018 World Cup to identify some of the most impressive goals in the tournament.
This self-paced lab is part of the Perform Predictive Data Analysis in BigQuery course. Enroll in any course that contains this lab and get immediate completion credit. Refer to the Google Cloud Skills Boost catalog for all available courses.
...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 3, 2024
Lab Last Tested January 24, 2024
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.
このコンテンツは現在ご利用いただけません
利用可能になりましたら、メールでお知らせいたします
ありがとうございます。
利用可能になりましたら、メールでご連絡いたします
One lab at a time
Confirm to end all existing labs and start this one