Identifying customers potentially affected by an active fire in California

In this example we will see how we can identify customers potentially affected by an active fire in California using CARTO Workflows.

To start it, please click on "+ New workflow" in the main page of the Workflows section. If it will be your first workflow, click on "Create your first workflow".

Choose the data warehouse connection that you want to use. In this case, please select the CARTO Data Warehouse connection to find the data sources used in this example.

Now you can drag and drop the data sources and components that you want to use from the explorer on the left side of the screen into the Workflow canvas that is located at the center of the interface.

Now, let's add the usa_states_boundaries data table into our workflow from the demo_tables dataset available in the CARTO Data Warehouse connection.

Then, let’s filter only the boundary of the state of California using the SIMPLE_FILTER component.\

Next, let’s add a new data source with data from the directory of active fires that you can find as fires_worldwide in demo_tables inside your CARTO Data Warehouse.

Next, let’s add the SPATIAL_FILTER component to filter only the fires that fall inside the digital boundary of the state of California.

Now, we will use the ST_BUFFER component in order to generate a 5 km radius buffer around each of the active fires in California.

Next, we add a data source with a sample of customer data from an illustrative CRM system, that includes their home location. You can find it as customers_geocoded in demo_tables inside your CARTO Data Warehouse.

Now let’s add another SPATIAL_FILTER component to know which of our customers live within the 5 km buffer around the active fires and thus could potentially be affected.

Add the COUNT component to complete the workflow so to calculate the number of our customers who are at risk of being affected by a fire. After that, click on the Run button to execute all the workflow steps as you have configured them in the canvas.\

Analyze the results of your workflow to understand the number of customers potentially affected by fires. Results at every step of the workflow are also available in the Results panel so you can see, for example, the specific details of the affected customers in order to contact them directly (or whatever action you consider appropriate).

If you want to see the clients affected by the California fires located on a map, click on the second SPATIAL_FILTER component on your workflow to see the list of them and, in the "map" tab of the Results panel and debugging of results, click on the "Create map" button.

Then, automatically, a map in CARTO Builder will open with this data as a source and there you can style it as you see fit to obtain a visualization suitable to your needs.

\

Last updated