Analytics Toolbox for BigQuery

Analytics Toolbox for BigQuery

Examples

In this section we provide a set of examples that showcase how to leverage the functions of our Analytics Toolbox to unlock advanced spatial analyses in your data warehouse platform. They cover a broad range of use cases with methods for data transformations, enrichment, spatial indexing in Quadkey and H3, statistics, clustering, spatial data science methods and more.

The Analytics Toolbox can be leveraged from the SQL Query editor in Builder, your data warehouse console, or in SQL and Python Notebooks using the SQL clients provided by the different cloud platforms.

    Creating simple tilesets

    We provide a set of examples that showcase how to easily create simple tilesets allowing you to process and visualize very large spatial datasets stored in BigQuery. You should use it if you have a dataset with any geography type (point, line, or polygon) and you want to visualize it at an appropriate zoom level.

    Creating aggregation tilesets

    We provide a set of examples that showcase how to easily create aggregation tilesets allowing you to process and visualize very large spatial datasets stored in BigQuery. You can use this procedure if you have a point dataset (or anything that can be converted to points, such as polygon centroids) and you want to see it aggregated.

    An H3 grid of Starbucks locations and simple cannibalization analysis

    In this example we are going to demonstrate how fast and easy it is to make a visualization of an H3 grid to identify the concentration of Starbucks locations in the US.

    Enriching a quadkey grid with population data from the Data Observatory

    The pains of working with data in different spatial aggregations can be greatly eased by using spatial indexes. In this example we showcase how, in a single query, we can create a quadkey grid of resolution 15 of all supermarket POIs in the US and enrich it with population data.

    New police stations based on Chicago crime location clusters

    In this example we are going to use points clustering to analyze where to locate five new police stations in Chicago based on 5000 samples of crime locations.

    Analyzing weather stations coverage using a Voronoi diagram

    Voronoi diagrams are a very useful tool to build influence regions from a set of points and the Analytics Toolbox provides a convenient function to build them. An example application of these diagrams is the calculation of the coverage areas of a series of weather stations. In the following query we are going to calculate these influence areas in the state of New York. The result can be seen in the visualization below, where the color of each polygon indicates its area, which gives an insight on the coverage provided by the station.