> For the complete documentation index, see [llms.txt](https://academy.carto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.carto.com/creating-workflows/workflow-templates/retail-and-cpg.md).

# Retail and CPG

### Estimate population around top performant retail stores

This example demonstrates how to use workflow to filter out the top retail stores that belong to a specific category and computes the population living around them.

[**Download example**](https://storage.googleapis.com/carto-workflows-examples/files/estimate_population_around_retail_stores.sql)

<div align="left"><figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/Rl73pUtvRJaYF3RVF5hN/Screenshot%202023-10-23%20at%2013.00.12.png" alt=""><figcaption></figcaption></figure></div>

### Commercial Hotspot Analysis. Identifying Optimal Locations for a New Pizza Place

Identifying an optimal location for a new store is not always an easy task, and we often do not have enough data at our disposal to build a solid model to predict potential revenues across an entire territory. In these cases, managers rely on different business criteria in order to make a sound decision for their expansion strategy. For example, they rely on defining their target market and segmenting population groups accordingly in order to locate the store closer to where the target market lives (e.g. areas with a great presence of youngsters).

In this example, we are going to use the [Hotspot Analysis](https://docs.carto.com/carto-user-manual/workflows/components/statistics#hotspot-analysis) component to explore good locations to open a new Pizza Hut restaurant in Honolulu, Hawaii. We will use H3 as our geographic support and population and distance to existing Pizza Hut stores as our criteria to identify hotspots. For a detailed description of this use case read [this guide](/advanced-spatial-analytics/spatial-analytics-for-bigquery/step-by-step-tutorials/opening-a-new-pizza-hut-location-in-honolulu.md).

[**Download example**](https://storage.googleapis.com/carto-workflows-examples/files/commercial_hotspots.sql)

<figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/SdKwxc4xzyKgkc0grYRa/Screenshot%202023-10-25%20at%2017.07.06.png" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://academy.carto.com/creating-workflows/workflow-templates/retail-and-cpg.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
