# Finding stores in areas with weather risks

<div align="left"><figure><img src="https://3015558743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFEElAdsRIl9DzfMhbRlB%2Fuploads%2F8iAlvj1s2Th85m6IvcG5%2Fbeginner%20banner.png?alt=media&#x26;token=10e8f40a-3632-4920-87c3-6b0dca2a6775" alt="Beginner difficulty banner" width="175"><figcaption></figcaption></figure></div>

In this example we use CARTO Workflows to ingest data from a remote file containing temperature forecasts in the US together with weather risk data from NOAA, and data with the location of our stores; we will identify which of the stores are located in areas with weather risks or strong deviations in temperature.

To start creating the workflow, 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".

<figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/q6DMaWL7PVKHES3WAa17/workflows_+new.png" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/FRwuSpwi85YlSIeeHm6d/worfklows_connections.png" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/rmEQM89cEl58yPOW7Yvk/workflows_first_empty.png" alt=""><figcaption></figcaption></figure>

Now, let's add the *noaa\_warnings* data table into our workflow from the *demo\_tables* dataset available in the CARTO Data Warehouse connection.

<figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/tjXT1Cy469hlUjesD8eI/workflows_ex2_noaadata.png" alt=""><figcaption></figcaption></figure>

After that, let’s add the *retail\_stores* data table from the *demo\_tables* dataset, also available in the CARTO Data Warehouse connection.

<figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/RqNzGAmz9BxeQWSsZIfo/workflows_ex2_retailstores.png" alt=""><figcaption></figcaption></figure>

Now let's use the SPATIAL\_JOIN component to know which of our retail\_stores are in the warning areas.

<figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/QYCfm1gZHo597oidFdGr/workflows_ex2_join.png" alt=""><figcaption></figcaption></figure>

At that point we already have our stores within a NOAA Weather Warning and, if we deem it appropriate, we can send an email to share this warnings to anyone interested in this information using the SEND\_BY\_EMAIL component.

After that, we can use the IMPORT\_FROM\_URL component to import the temperature forecast from [Climate Prediction Center](https://www.cpc.ncep.noaa.gov/products/GIS/GIS_DATA/us_tempprcpfcst/index.php) using this URL in particular to take the latest temperature forecast in a Shapefile: <https://ftp.cpc.ncep.noaa.gov/GIS/us_tempprcpfcst/610temp_latest.zip>. These data will be consulted again with each execution of the workflow. It means that the results of the workflow will change if the data has been updated.

<figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/Le9XHS0El0wOg6KcvbB4/workflows_ex2_importurl.png" alt=""><figcaption></figcaption></figure>

Now, we are going to drop the geom\_joined column to keep only one geom column in order to avoid confusions.

<figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/APksbPzKpvXIfZbLvwDk/worfklows_ex2_dropcolumn.png" alt=""><figcaption></figcaption></figure>

We will proceed to make a new SPATIAL\_JOIN in order to have the temperature forecast associated to the stores.

<figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/GLADYF4xB55ZvLRJ1551/workflow_ex2_spatialjoin.png" alt=""><figcaption></figcaption></figure>

Finally, we conclude with this example saving the outcome in a new table using SAVE\_AS\_TABLE component. Remember that you should specify the fully qualified name of the new dataset in the field of this component.

<figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/5cKwvGpY0OAL1PYCkado/workflows_ex2_save.png" alt=""><figcaption></figcaption></figure>

We can use the "Create map" button in the map section of the Results panel to create a new Builder map and analyze the results in a map.

<figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/PNevjRsuyBgnZVTmbxBN/workflows_ex2_result.png" alt=""><figcaption></figcaption></figure>
