hands-on lab

Geofencing to Organize Your Geospatial Data

Difficulty: Intermediate
Duration: Up to 1 hour
Students: 64
Rating: 5/5
On average, students complete this lab in20m
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

This lab demonstrates how to group geospatial data based on their geographic attributes in BigQuery GIS using Python and Jupyter notebooks. The lab uses spatial joins to combine information from two of Google’s public datasets – the zip codes table and the Chicago crimes table – to count the number of crimes in each zip code of Chicago by year. In addition, the lab uses the geopandas package in Python to create a choropleth map showing crime hot spots in Chicago.

Learning Objectives

Upon completion of this lab, you will be able to:

  • Interact with BigQuery GIS datasets within Jupyter notebooks
  • Perform an analysis using spatial joins on GEOGRAPHY data
  • Create a choropleth map using geopandas

Intended Audience

This lab is intended for:

  • GIS engineers
  • Data engineers dealing with location-based data
  • Developers looking to leverage geospatial information

Prerequisites

You should possess:

  • Basic understanding of relational databases and ANSI SQL
  • Basic understanding of Python
  • Familiarity with BigQuery GIS's GEOGRAPHY datatype

Updates

August 20th, 2025 - Resvoled issue connecting to the lab's notebook

June 24th, 2025 - Updated GCP VM instance image

May 27th, 2025 - Migrated lab environment, updated lab permissions, and cleared Jupyter Notebook outputs

August 7th, 2024 - Added password protection to notebook

Covered topics

Hands-on Lab UUID

Lab steps

0 of 1 steps completed.Use arrow keys to navigate between steps. Press Enter to go to a step if available.
  1. Starting the Lab's Google Cloud Hosted JupyterLab Notebook