# Step-by-step tutorials

In this section we provide a set of examples that showcase how to leverage the functions of our [Analytics Toolbox for Snowflake](https://docs.carto.com/data-and-analysis/analytics-toolbox-for-snowflake) 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 Quadbin and H3, statistics, clustering, spatial data science methods and more.

{% hint style="info" %}
In order to get access to the data needed to replicate these tutorials in your Snowflake account, please subscribe to our public listing in Snowflake's Data Marketplace:&#x20;

[CARTO Academy - Data for tutorials and examples](https://app.snowflake.com/marketplace/listing/GZT0Z4CM1E9J2/carto-carto-academy-data-for-tutorials-and-examples)
{% endhint %}

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="step-by-step-tutorials/how-to-create-a-composite-score-with-your-spatial-data"><strong>How to create a composite score with your spatial data</strong></a></td><td>In this tutorial we show how to combine (spatial) variables into a meaningful composite indicator using CARTO Analytics Toolbox for Snowflake.</td><td><mark style="color:green;background-color:green;"><strong>STATISTICS</strong></mark></td><td><a href="https://3015558743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFEElAdsRIl9DzfMhbRlB%2Fuploads%2FJsj2LycuJ8fIeGnh8oby%2FCaptura%20de%20pantalla%202023-12-01%20a%20las%2011.58.23.png?alt=media&#x26;token=d7d73f32-39c5-4148-a453-5ca9662cdc88">Captura de pantalla 2023-12-01 a las 11.58.23.png</a></td><td><a href="step-by-step-tutorials/how-to-create-a-composite-score-with-your-spatial-data">how-to-create-a-composite-score-with-your-spatial-data</a></td></tr><tr><td><a href="step-by-step-tutorials/space-time-hotspot-analysis-identifying-traffic-accident-hotspots"><strong>Space-time hotspot analysis: Identifying traffic accident hotspots</strong></a></td><td>Spatiotemporal analysis plays a crucial role in extracting meaningful insights from data that possess both spatial and temporal components. This example shows how to identify space-time hotspots using the Analytics Toolbox.</td><td><mark style="color:green;background-color:green;"><strong>STATISTICS</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/nPj9xRwYWdDJvgbYwpmC/Captura%20de%20pantalla%202023-06-06%20a%20las%2017.57.17.png">Captura de pantalla 2023-06-06 a las 17.57.17.png</a></td><td><a href="step-by-step-tutorials/space-time-hotspot-analysis-identifying-traffic-accident-hotspots">space-time-hotspot-analysis-identifying-traffic-accident-hotspots</a></td></tr><tr><td><a href="step-by-step-tutorials/computing-the-spatial-autocorrelation-of-pois-locations-in-berlin"><strong>Computing the spatial autocorrelation of POI locations in Berlin</strong></a></td><td>In this example, we analyze the spatial correlation of POI locations in Berlin using OpenStreetMap data and the MORANS_I_H3 function available in the statistics module.</td><td><mark style="color:green;background-color:green;"><strong>STATISTICS</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/VDt6WyUhsU4nwIXGtMSR/spatial_autocorrelation_pois_berlin.png">spatial_autocorrelation_pois_berlin.png</a></td><td><a href="step-by-step-tutorials/computing-the-spatial-autocorrelation-of-pois-locations-in-berlin">computing-the-spatial-autocorrelation-of-pois-locations-in-berlin</a></td></tr><tr><td><a href="step-by-step-tutorials/identifying-amenity-hotspots-in-stockholm"><strong>Identifying amenity hotspots in Stockholm</strong></a></td><td>In this example we identify hotspots of amenity POIs in Stockholm using OpenStreetMap data and the GETIS_ORD_H3 procedure of the statistics module.</td><td><mark style="color:green;background-color:green;"><strong>STATISTICS</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/gZ7jTHTMQEG6dGdvETYQ/hotspots_amenity_pois_stockholm.png">hotspots_amenity_pois_stockholm.png</a></td><td><a href="step-by-step-tutorials/identifying-amenity-hotspots-in-stockholm">identifying-amenity-hotspots-in-stockholm</a></td></tr><tr><td><a href="https://docs.carto.com/data-and-analysis/analytics-toolbox-for-snowflake/examples/generating-trade-areas-based-on-drive-walk-time-isolines"><strong>Generating trade areas based on drive/walk-time isolines</strong></a></td><td><p>We generate trade areas based on drive/walk-time isolines from Snowflake console and from CARTO Builder.</p><p><br></p></td><td><mark style="color:orange;background-color:orange;"><strong>LDS</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/oVuN0qfI4v32aaLs3FAQ/generate.png">generate.png</a></td><td><a href="step-by-step-tutorials/generating-trade-areas-based-on-drive-walk-time-isolines">generating-trade-areas-based-on-drive-walk-time-isolines</a></td></tr><tr><td><a href="step-by-step-tutorials/geocoding-your-address-data"><strong>Geocoding your address data</strong></a></td><td>We provide an example that showcase how to easily geocode your address data using the Analytics Toolbox LDS module from the Snowflake console and from the CARTO Workspace.</td><td><mark style="color:orange;background-color:orange;"><strong>LDS</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/O6cfn63k7r9R2zwBxaLb/geocode%20(1).png">geocode (1).png</a></td><td><a href="step-by-step-tutorials/geocoding-your-address-data">geocoding-your-address-data</a></td></tr><tr><td><a href="https://docs.carto.com/data-and-analysis/analytics-toolbox-for-snowflake/examples/creating-spatial-index-tilesets"><strong>Creating spatial index tilesets</strong></a></td><td>We provide a set of examples that showcase how to easily create tilesets based on spatial indexes allowing you to process and visualize very large spatial datasets stored in Snowflake. You should use this procedure if you have a dataset that...</td><td><mark style="color:orange;background-color:yellow;"><strong>TILER</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/CMqwl0AF6Utc5iJEFeHx/uk_spatial_index_tileset%20(1).png">uk_spatial_index_tileset (1).png</a></td><td><a href="step-by-step-tutorials/creating-spatial-index-tilesets">creating-spatial-index-tilesets</a></td></tr><tr><td><a href="https://docs.carto.com/data-and-analysis/analytics-toolbox-for-snowflake/examples/a-quadkey-grid-of-stores-locations-and-simple-cannibalization-analysis"><strong>A Quadkey grid of stores locations and simple cannibalization analysis</strong></a></td><td>We are going to demonstrate how fast and easy it is to make a visualization of a Quadkey grid to identify the concentration of Starbucks locations in the US.</td><td><mark style="color:purple;background-color:yellow;"><strong>QUADBIN</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/NuQVR1heUqDQEWf2OLO8/starbucks-usa-quadkey-grid.png">starbucks-usa-quadkey-grid.png</a></td><td><a href="step-by-step-tutorials/a-quadkey-grid-of-stores-locations-and-simple-cannibalization-analysis">a-quadkey-grid-of-stores-locations-and-simple-cannibalization-analysis</a></td></tr><tr><td><a href="https://docs.carto.com/data-and-analysis/analytics-toolbox-for-snowflake/examples/minkowski-distance-to-perform-cannibalization-analysis"><strong>Minkowski distance to perform cannibalization analysis</strong></a></td><td>In this example we are going to showcase how to use the Minkowski distance to evaluate cannibalization across Starbucks stores in Los Ángeles, assuming that the ratio of cannibalization depends on the nearby store</td><td><mark style="background-color:yellow;"><strong>MEASUREMENTS</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/urKFmbdVGP2gE3Mc9IvH/minkowski-cannibalization-analysis.png">minkowski-cannibalization-analysis.png</a></td><td><a href="step-by-step-tutorials/minkowski-distance-to-perform-cannibalization-analysis">minkowski-distance-to-perform-cannibalization-analysis</a></td></tr><tr><td><a href="https://docs.carto.com/data-and-analysis/analytics-toolbox-for-snowflake/examples/computing-us-airport-connections-and-route-interpolations"><strong>Computing US airport connections and route interpolations</strong></a></td><td>In this example we will showcase how easily we can compute all the paths that interconnect the main four US airports using the Analytics Toolbox.</td><td><mark style="background-color:red;"><strong>TRANSFORMATIONS</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/GgZgj9aXL4wonNw1N9YM/sf-us-airport-connections-route-interpolations.png">sf-us-airport-connections-route-interpolations.png</a></td><td><a href="step-by-step-tutorials/computing-us-airport-connections-and-route-interpolations">computing-us-airport-connections-and-route-interpolations</a></td></tr><tr><td><a href="https://docs.carto.com/data-and-analysis/analytics-toolbox-for-snowflake/examples/new-supplier-offices-based-on-store-locations-clusters"><strong>New supplier offices based on store locations clusters</strong></a></td><td>In this example we are going to use points clustering to analyze where to locate 10 new supplier offices in US so they can best serve all Starbucks locations.</td><td><mark style="background-color:purple;"><strong>CLUSTERING</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/TkojALGbKx9eb1dPvKd0/supplier-offices-clusters.png">supplier-offices-clusters.png</a></td><td><a href="step-by-step-tutorials/new-supplier-offices-based-on-store-locations-clusters">new-supplier-offices-based-on-store-locations-clusters</a></td></tr><tr><td><a href="https://docs.carto.com/data-and-analysis/analytics-toolbox-for-snowflake/examples/analyzing-store-location-coverage-using-a-voronoi-diagram"><strong>Analyzing store location coverage using a Voronoi diagram</strong></a></td><td>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 area...</td><td><mark style="color:purple;background-color:green;"><strong>PROCESSING</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/tA1D2JQRgneK4PD6j9ZW/voronoi-store-location.png">voronoi-store-location.png</a></td><td><a href="step-by-step-tutorials/analyzing-store-location-coverage-using-a-voronoi-diagram">analyzing-store-location-coverage-using-a-voronoi-diagram</a></td></tr><tr><td><a href="https://docs.carto.com/data-and-analysis/analytics-toolbox-for-snowflake/examples/enrichment-of-catchment-areas-for-store-characterization"><strong>Enrichment of catchment areas for store characterization</strong></a></td><td><p>In this example we are going to characterize all Starbucks locations in the US by the total population covered by their catchment areas. We are going to define these catchment areas as a 3km buffer around each store.</p><p><br></p></td><td><mark style="color:blue;background-color:orange;"><strong>DATA</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/NRwKh5wsrgX7zadqOPiE/sf-enrichment-example-5.png">sf-enrichment-example-5.png</a></td><td><a href="step-by-step-tutorials/enrichment-of-catchment-areas-for-store-characterization">enrichment-of-catchment-areas-for-store-characterization</a></td></tr><tr><td><a href="step-by-step-tutorials/data-enrichment-using-the-data-observatory"><strong>Data enrichment using the Data Observatory</strong></a></td><td>In this guide you will learn how to perform data enrichment using data from your Data Observatory subscriptions and the different data enrichment methods available in the  Analytics Toolbox.</td><td><mark style="color:blue;background-color:orange;"><strong>DATA</strong></mark></td><td><a href="https://3015558743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFEElAdsRIl9DzfMhbRlB%2Fuploads%2FI5fqzQjlmdABV8H0zKDp%2FCaptura%20de%20pantalla%202023-12-01%20a%20las%2012.00.30.png?alt=media&#x26;token=5c2194c1-808c-4501-ac09-eb02460fb9bc">Captura de pantalla 2023-12-01 a las 12.00.30.png</a></td><td><a href="step-by-step-tutorials/data-enrichment-using-the-data-observatory">data-enrichment-using-the-data-observatory</a></td></tr><tr><td><a href="step-by-step-tutorials/applying-gwr-to-understand-airbnb-listings-prices"><strong>Applying GWR to understand Airbnb listings prices</strong></a></td><td>Geographically Weighted Regression (GWR) is a statistical regression method that models the local (e.g. regional or sub-regional) relationships between a set of predictor variables and an outcome of interest. Therefore, it should be used in lieu of a global model in those scenarios where these relationships vary spatially. In this example we are going to analyze the local relationships between Airbnb's listings in Berlin and the number of bedrooms and bathrooms available at these listings using the GWR_GRID procedure.</td><td><mark style="color:green;background-color:green;"><strong>STATISTICS</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/FM2002O8C7hsJTRPg5Y2/gwr-airbnb-listings-prices.png">gwr-airbnb-listings-prices.png</a></td><td><a href="step-by-step-tutorials/applying-gwr-to-understand-airbnb-listings-prices">applying-gwr-to-understand-airbnb-listings-prices</a></td></tr><tr><td><a href="step-by-step-tutorials/opening-a-new-pizza-hut-location-in-honolulu"><strong>Opening a new Pizza Hut location in Honolulu</strong></a></td><td>We find the best new location for a specific target demographics using spatial indexes and advanced statistical functions.</td><td><mark style="color:red;background-color:red;"><strong>RETAIL</strong></mark>  <mark style="color:green;background-color:green;"><strong>STATISTICS</strong></mark>  <mark style="color:purple;background-color:yellow;"><strong>H3</strong></mark>  <mark style="color:blue;background-color:orange;"><strong>DATA</strong></mark></td><td><a href="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/YHbednXiRyT5lfkXXZlf/pizza-hut-location-in-honolulu.png">pizza-hut-location-in-honolulu.png</a></td><td><a href="step-by-step-tutorials/opening-a-new-pizza-hut-location-in-honolulu">opening-a-new-pizza-hut-location-in-honolulu</a></td></tr></tbody></table>

[European Union’s Horizon 2020](https://ec.europa.eu/programmes/horizon2020/en) research and innovation programme under grant agreement No 960401.
