In recent years, the number of brick-and-mortar stores facing closure has swelled. In the retail sector, this phenomenon has come to be known as the retail apocalypse, but other sectors like banking are also being affected. However, this retail apocalypse is not affecting all retailers and some online retailers have even announced plans to open their first physical stores. In this context, it is more important than ever to consider cannibalization in both cases, when deciding which stores to keep or close, and when deciding where a new store should open. Spatial Data Science techniques are key to making a difference in tackling this challenge.
In this blogpost, a case study is presented in which a bank is interested in expanding in the provinces of Sevilla, Cádiz, and Málaga, in the south of Spain. Given their economic and business circumstances, they are only planning on opening 10 branches, and they would like to find locations where those branches can be accessible to as many people as possible. Therefore, the focus of our work will be on identifying the 10 locations that attract the largest number of visitors, while minimizing the potential cannibalization between branches. Human mobility data is a core component of our methodology.
This case study presents two main difficulties:
The methodology developed in order to identify the 10 optimal locations is described in detail in the next sections. The main steps followed are:
For data discovery, we take advantage of the location data streams available in CARTO’s Data Observatory and the enrichment toolkits available in CARTOframes so that we can easily bring in features from human mobility, socio-demographic, financial, and other data categories.
Since bank branches have higher utilization in places with higher footfall, and where the commercial activity is high, we identified the following data as relevant:
The following dashboard shows some of the data used. To learn more about the location data streams that CARTO offers, please visit our Location Data Streams Catalogue
.
The base of our method is the use of human mobility data from Vodafone Analytics. Therefore, we selected Vodafone’s 250m x 250m cell grid as the reference grid to project all the other features.
On the following map you can visualize the grid and the focus area (Sevilla, Málaga, and Cádiz).
We enrich the grid as described in the following sections:
Vodafone Analytics data provides insights on the number of people visiting any 250m x 250m grid cell covering the entire territory of study. Vodafone anonymises, aggregates, and then extrapolates the data measured in the network to provide insights representing the overall national and international population. In addition, this data also provides the origins of the visitors aggregated at different levels depending on the distance to the destination cell. Cells are enriched with the following data from this source:
This dataset provides information on POIs. Cells are enriched with the following data from this source:
This dataset provides some commercial indices (general, retail, health care, etc.) consisting in normalized commercial activity values ranging from 0 to 1; 0 being very low commercial activity, and 1 being very high.
Cells are enriched with the following data from this source:
This information is provided on a 100m x 100m cell grid. The data aggregation is upscaled to fit the 250m x 250m cell grid applying areal interpolation. Cells are enriched with the following data from this source:
Once the grid is enriched, and before calculating the catchment areas, we reduce the search space by applying a filtering step so that only cells with high commercial and economic potential are considered for opening the branches.
The filtering uses the following criteria with predefined thresholds on each of them:
After analyzing different scenarios with different thresholds, and visualizing them to check everything made sense based on our knowledge of the focus region, we set the following cuts on these six criteria.
As a result, we reduced the search space from more than 18,000 initial cells to 620. The following figure shows all grid cells in the area around the city of Sevilla on the left, and the remaining cells after filtering on the right.
Finally, catchment areas are built using human mobility data and following the methodology presented in this previous blog post.
Location-allocation is the name given to a set of optimization algorithms focused on identifying the best placements for facilities to serve a collection of demand locations. They have been extensively used in various sectors such as Logistics to find the optimal locations for distribution centers, Retail to find the optimal location to open new stores, and Telco to find the optimal locations to install antennas.
The case study presented here is also a good example of a location-allocation problem where a bank is interested in finding the 10 locations to open new branches from which they can reach out to as many people possible. This implies finding the locations with the highest number of visitors while minimizing the intersections between their catchment areas because visitors will only be counted for one of the locations. These intersections between catchment areas will be considered as the potential cannibalization between pairs of locations.
This specific case of the location-allocation problem is known as the Maximum Coverage Problem (MCP). We have an important difference to the standard MCP, though, since in our case a specific origin can have (and most times does have) a different number of visitors going to different destination cells.
Location-allocation problems are combinatorial optimization problems, well known for being very hard to solve even for small instances. This is because the number of possible solutions increases exponentially with the number of candidate locations to be considered and the number of optimal locations to identify. The table below shows the number of possible solutions depending on the number of optimal locations we are interested in finding among the 620 candidates we have:
Because of the high combinatorial complexity of the MCP problems, approximate algorithms are commonly used, leaving exact algorithms only for small instances of simplified versions of the problem.
The most frequent approach followed in literature are greedy algorithms followed sometimes by some local search heuristic to make sure the nearest local optimum is reached. Some more advanced metaheuristic algorithms have been designed to be able to escape local optima, but their complexity increases with the number of concurrent swaps allowed at each iteration. Therefore, most times these more advanced approaches have only been tested allowing one swap per iteration which makes it harder to explore distant areas within the solution space.
The algorithm we have designed to solve this problem follows a greedy approach using Linear Programming at every iteration to improve the chances of finding better local optima. A single-swap local search heuristic is applied on the solution found to make sure we are at a local optimum.
You can read more about Linear Programming in this previous post.
The algorithm is designed using a simplification of the problem based on the fact that having an origin within three catchment areas of the selected locations is worse than having an origin within two catchment areas (i.e. more potential cannibalisation). More generally speaking, having an origin within n catchment areas of the selected locations is worse than having an origin within n-1 or fewer catchment areas.
This fact allows us to solve the problem considering only pairwise intersections, which notably reduces the complexity. The total number of potential customers covered by the 10 selected locations is calculated adding the visitors of every catchment area independently, and subtracting the double-counted visitors in every pairwise intersection. This calculation assigns an increasing penalty for having an origin polygon within several catchment areas proportional to the number of catchment areas containing the polygon.
The following example aims at showing the difference in the calculation of potential customers when calculating with and without the just described property. In this example we have three selected locations, their catchment areas, and the intersections between them.
The number of potential customers would be calculated as follows:
As mentioned above, we follow a greedy approach, applying Linear Programming at every iteration. The greedy algorithm consists of selecting 3 new locations at each iteration, allowing for one of the locations selected on the previous iterations to be changed (i.e., allowing one swap). Below you can find the pseudocode of this greedy algorithm:
The Linear Programming model solved at each iteration is presented below.
The Linear Programming model is solved using Google OR-Tools, a powerful optimization solver wrapper that allows to connect to a wide range of commercial and free solvers.
In order to improve the efficiency of the algorithm, we define variables as continuous and we only penalize those pairs of locations whose intersection contains more than 10% of the visitors from both locations. Further improvements could be achieved by:
After running the optimization algorithm for different values of f (increasing factor) and k (degrees of freedom), we obtain the solution shown on the map below. The total number of potential customers for the best solution we obtained is 3,223,552.
The following map shows the selected locations and their catchment areas.
If we analyze what municipalities are covered by the catchment areas of the locations selected by the CA (see figure 7 below), we can see all municipalities with a population over 50,000 people are, at least, within one of the location’s catchment areas. In addition, it can be observed that the larger the population of a municipality is, the greater the number of catchment areas covering them.
In order to assess the quality of the algorithm developed at CARTO (CA), we’ll compare the results obtained using our algorithm with the standard greedy algorithm (SGA) that is usually used to solve the location-allocation problem. The SGA finds one new location at each iteration, and updates the number of potential visitors of non-selected locations considering the intersections with the already selected locations. This algorithm does not allow swapping.
The number of potential visitors covered by the catchment areas of the locations selected by the SGA is 2,884,347. This means CA is able to improve this result by almost 340,000 visitors, which represents an extra 11.75% visitors.
The map below shows the catchment areas of the locations selected by both algorithms. These areas are plotted over the reference grid colored by the number of visitors at each cell. The main difference that can be observed is that some of the catchment areas of the locations selected by the SGA are larger and cover areas with a lower population density, which implies lower quality locations. This is because after the first 5-7 locations are identified, some swap is needed in order to find new good quality locations. However, the SGA does not perform any swapping.
In this blog post, we have presented a site selection case study in which the number of new bank branches to be opened was known beforehand. Often times, companies find it very hard to come up with this number. The methodology presented here can also be used to answer this question with a small change in the optimization algorithm developed.
Here, it is essential to know what criteria is going to be used to determine the optimal number of locations. One possible criteria could be market saturation. Market saturation can be defined as a threshold such that if the number of new potential customers covered when one new location is added is below that threshold, market saturation is reached..
For example, for a 5% threshold, we have that the optimal number of locations is 10, as can be seen in the figure below.
The algorithm developed at CARTO (CA) presents a better performance than the SGA for this problem as well. Below we can see the number of potential customers covered depending on the number of locations selected. We can see for a low number of locations both algorithms have a very similar performance, and as the number of locations increases (and hence the problem gets harder to solve) CA performs better than SGA. This means SGA will reach a saturation point before CA, missing market potential.
In particular, we can see CA can perform up to 30% better than SGA depending on the threshold set for market saturation.
Today’s challenging context affecting retail and other sectors makes it imperative for them to use the techniques and tools that will allow them to make informed decisions and stand out from their competitors.
Human mobility data, enriched with other data streams, and the use of optimization and other spatial techniques will make a difference when tackling the challenges these sectors are facing today and the ones to be faced in the future.
The new SARS-CoV-2 coronavirus, which emerged in the Chinese city of Wuhan in late 2019, continues to cross borders. The epidemic, one of the biggest health crises in recen...
Data ScienceSeeking an understanding of resident health based on the social factors within a neighborhood is not a new concept. But efforts to do so have long been overly simplistic, w...
Data ScienceThe world is grappling with 2019-nCoV, the new Coronavirus spreading rapidly from the epicenter of the outbreak in Wuhan, the capital of China’s Hubei Province. The spreadi...
Data SciencePlease fill out the below form and we'll be in touch real soon.