Retail Site Selection with CARTO Workflows and Snowflake: A Step-by-Step Tutorial
Finding the perfect location for a new retail store is both an art and a science. Today's retail decision-makers need to leverage cloud data warehouses and spatial analysis to evaluate potential sites at scale. This tutorial walks you through using CARTO Workflows with Snowflake to identify optimal retail locations, enrich site data with spatial insights, and visualize results in Builder.
By the end of this guide, you'll understand how to connect Snowflake data to CARTO, run spatial enrichment analyses with isochrones and trade areas, and create interactive maps that drive site selection decisions.
Why Spatial Analysis Matters for Retail
Retail site selection is fundamentally a spatial problem. The best location isn't just about foot traffic or demographics—it's about understanding the relationship between your store, customers, competitors, and local geography. Traditional analysis relies on spreadsheets and static reports. Modern approaches combine cloud data with spatial intelligence.
Consider these key questions that spatial analysis helps answer:
- Who lives and works within 15 minutes of your proposed site?
- How does foot traffic vary by time of day across potential locations?
- What trade areas do competitor stores serve?
- Which neighborhoods have demographic profiles matching your target customer?
- How accessible is each site via public transit or major roads?
CARTO Workflows brings these capabilities together: connect to Snowflake, enrich location data with isochrones and demographics, filter candidates based on spatial criteria, and hand off refined datasets to Builder for visualization and stakeholder engagement.
Prerequisites and Setup
Before you start, gather these components:
- CARTO account: Access to Workflows and Builder. Log in here or request a demo.
- Snowflake account: With read access to your data warehouse. Your data should include candidate store locations (latitude, longitude columns) and supporting tables like demographics or sales history.
- Sample data: For this tutorial, we'll use a public retail dataset with candidate locations. You can also use your own store list.
- Browser: Chrome, Firefox, Safari, or Edge for accessing CARTO and Snowflake.
Step 1: Connect Snowflake to CARTO Workflows
CARTO Workflows integrates directly with Snowflake, so your data stays in the warehouse while you perform spatial analysis. Here's how to establish the connection:
Set Up Your Snowflake Connection
- Log into your CARTO account and navigate to Workflows (left sidebar).
- Click + New Workflow.
- In the workflow canvas, click the Data node to start building.
- Choose Snowflake as your data source.
- Enter your Snowflake connection details:
- Account: Your Snowflake account identifier (e.g.,
xy12345.us-east-1) - Warehouse: The compute warehouse to use (e.g.,
COMPUTE_WH) - Database: Your database name (e.g.,
RETAIL_DB) - Schema: The schema containing your tables (e.g.,
PUBLIC) - User / Password: Snowflake credentials with read access
- Account: Your Snowflake account identifier (e.g.,
- Click Test Connection to verify. You should see a success message.
- Click Save.
Pro tip: For production workflows, use OAuth or API keys instead of passwords. This secures your credentials and makes rotation easier.
Query Your Candidate Locations
Now that you're connected, write a SQL query to pull your candidate store locations. In the Snowflake node, write or paste SQL like this:
SELECT store_id, location_name, latitude, longitude, estimated_rent_sqft, neighborhood FROM candidate_stores WHERE status = 'active' AND latitude IS NOT NULL AND longitude IS NOT NULL
This query returns candidate locations with their names, coordinates, rental costs, and neighborhoods. Click Run Query to preview the results.
You should see a preview table with your data. If the query returns zero rows, check that your table name and column names match your schema.
Step 2: Enrich Data with Isochrones and Trade Areas
Raw location data isn't enough. You need to understand what's accessible from each candidate site. Isochrones are a CARTO superpower: they show the area reachable within a given travel time (e.g., 15 minutes by car or 10 minutes walking).
Add an Isochrone Enrichment Node
- In your workflow, add a new node by clicking + next to the Snowflake node.
- Select Enrichment → Isochrone.
- Configure the isochrone parameters:
- Input: Connect to your Snowflake query output.
- Longitude column: Select the longitude field.
- Latitude column: Select the latitude field.
- Travel mode: Choose Car (for drive-time analysis).
- Travel time: Set to 15 minutes (typical for retail trade areas).
- Click Run. The output will include a new
isochrone_geomcolumn with polygon geometries representing the 15-minute service area around each location.
The isochrone shows what customers can reach from your store. Use this to estimate market potential and analyze competitor overlap.
Enrich with Demographics Inside Isochrones
Next, find out what demographics live within each isochrone:
- Add another enrichment node: + → Enrichment → Demographics.
- Set the input to the isochrone output.
- Select relevant demographic variables:
- Population (total count)
- Median household income
- Age groups (18-24, 25-34, 35-49, 50+)
- Education attainment
- Set the geography to Isochrone (not the point location).
- Click Run.
This gives you aggregate statistics for every location's trade area. You'll see the total population and income within 15 minutes of each candidate site—critical for evaluating market size and purchasing power.
Step 3: Filter and Score Locations
With demographic and accessibility data in hand, you now filter candidates based on business rules. CARTO Workflows includes a Filter node for this.
Create Business Rule Filters
- Add a Filter node to your workflow.
- Connect the demographics-enriched output to it.
- Define filter criteria (examples for a mid-market retailer):
- Population within isochrone ≥ 25,000
- Median household income ≥ $50,000
- Estimated rent/sqft ≤ $35
- Not in direct competition (optional: filter out locations within 2 miles of competitor stores)
- Click Run. Candidates that don't meet your criteria are removed.
Checkpoint: How many candidates passed your filters? If the number is too high or too low, adjust thresholds and re-run.
Score Locations (Optional)
For more sophisticated ranking, add a Formula node to compute a composite score:
score = (population / 50000) * 40 + (median_income / 100000) * 30 + ((50 - rent_sqft) / 50) * 20 + competitor_distance_score * 10
This example weights population (40%), income (30%), affordability (20%), and competition distance (10%). Adjust weights to match your business priorities. The result is a single score column for ranking all remaining candidates.
Step 4: Export Results to Snowflake and Builder
Your enriched and filtered dataset is ready to visualize. CARTO Workflows can save results back to Snowflake or directly to Builder.
Save to Snowflake Table
- Add a Snowflake Write output node.
- Configure:
- Table name:
retail_site_candidates_enriched - Write mode: Replace (or Append if keeping history)
- Table name:
- Click Run to save your enriched dataset back to Snowflake.
Your data warehouse now contains a new table with all enrichments: isochrones, demographics, and scores. This allows other teams to query and analyze the data further.
Create a Map in Builder
- From the Workflows output, click Open in Builder (or navigate to Builder separately).
- Create a new map and add a layer from your Snowflake table.
- Choose your candidate locations as points (latitude/longitude).
- Symbolize by score: high-scoring sites are green, medium are yellow, low are red.
- Add a choropleth layer showing population or income density to provide geographic context.
- Add widgets for filtering by score, neighborhood, or rental cost.
- Enable feature popups to show store name, isochrone stats, and score when clicked.
Your final map is an interactive tool: stakeholders can explore candidate sites, zoom into trade areas, and understand the spatial and demographic factors behind each recommendation.
Best Practices and Tips
- Iterate on filters: Start broad, then refine. Run the workflow multiple times with different thresholds to understand trade-offs.
- Validate with local knowledge: Spatial analysis is powerful, but combine it with on-the-ground insights. Visit high-scoring locations to confirm suitability.
- Test different isochrone times: Try 10, 15, and 20-minute isochrones to see how results change. Some businesses (quick service) may have tighter trade areas than others (shopping centers).
- Use multiple data sources: Combine Snowflake data with CARTO's public demographic data, or import your own foot traffic, sales, or custom data layers.
- Schedule workflows: If you refresh candidate lists regularly, use CARTO Workflows' scheduling to automate enrichment on a weekly or monthly cadence.
- Share results easily: Publish your Builder map as a public or shared link for stakeholders, boards, and partner teams to review and comment.
Troubleshooting Common Issues
No data returned from Snowflake: Check that table and column names are correct and that your schema permissions include read access. Test your SQL query directly in Snowflake first.
Isochrone enrichment is slow: This is normal for large datasets (1,000+ locations). Consider filtering to a smaller candidate set before enrichment, or break analysis into geographic regions.
Population numbers seem off: Verify that the demographic aggregation is set to your intended geography (whole isochrone, not individual census blocks). Also check data currency—demographic datasets are typically updated annually.
Map performance is sluggish: If your Builder map has thousands of points, use clustering or heatmaps instead of individual markers. Add filters to show only top-scoring candidates by default.
Next Steps
Now that you've mastered Workflows for site selection, explore advanced use cases:
- Competitive cannibalization: Analyze overlap between existing stores and new candidates to avoid cannibalizing sales from current locations.
- Expansion planning: Use Workflows to identify gaps in your current store network and prioritize new markets.
- Real estate optimization: Combine spatial analysis with lease negotiation data to model rent affordability across regions.
- Customer segmentation: Blend location-based customer data with transactional history to refine target demographics for each site.
Want to dive deeper? Try the CARTO Academy Workflows template for retail site selection. It provides a pre-built workflow you can customize for your own data. Alternatively, explore CARTO's data enrichment documentation for additional geospatial functions and techniques.
Ready to find your next winning location? Schedule a demo with a CARTO specialist to walk through your specific use case and learn how Workflows can accelerate your site selection process.





