{'fraction_non_alphanumeric': 0.027141494999667382, 'fraction_numerical': 0.014568596580703816, 'mean_word_length': 4.92225869993434, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Using gravity model to make store closing decisions: A data driven approach

Many studies propose methods for finding the best location for new stores and facilities, but few studies address the store closing problem. As a result of the recent COVID-19 pandemic, many companies have been facing financial issues. In this situation, one of the most common solutions to prevent loss is to downsize by closing one or more chain stores. Such decisions are usually made based on single-store performance; therefore, the under-performing stores are subject to closures. This study first proposes a multiplicative variation of the well-known Huff gravity model and introduces a new attractiveness factor to the model. Then a forward–backward approach is used to train the model and predict customer response and revenue loss after the hypothetical closure of a particular store from a chain. In this research the department stores in New York City are studied using large-scale spatial, mobility, and spending datasets. The case study results suggest that the stores recommended being closed under the proposed model may not always match the single store performance, and emphasizes the fact that the performance of a chain is a result of interaction among the stores rather than a simple sum of their performance considered as isolated and independent units. The proposed approach provides managers and decision-makers with new insights into store closing decisions and will likely reduce revenue loss due to store closures.


Introduction
COVID-19 has brought an unprecedented crisis to human society and the world economy, where many commercial brands have faced severe challenges in survival. All over the world, the continuous lockdown policies and people's concerns about their health have significantly reduced the number of visitors in physical stores (Bartik et al., 2020;Donthu & Gustafsson, 2020). Out of the reliance on cooperation with other social institutions, small and medium-sized enterprises (SMEs) are doomed to suffer during these turbulent business cycles (Gourinchas, Kalemli-Özcan, Penciakova, & Sander, 2020). Recent research reports that SMEs witnessed a higher prevalence of business failure and unemployment during the pandemic (Bartik et al., 2020;Chetty, Friedman, Hendren, & Stepner, 2020;Fairlie, 2020;Gourinchas et al., 2020). Simultaneously, the spread of COVID-19 has pressed many large enterprises, such as Sears and J. Crew, to reduce their production and sales scale, while facing the threat of bankruptcy (Donthu & Gustafsson, 2020;Tucker, 2020). This status quo has driven many companies to choose to close some of their physical stores to ensure the continuity of their regular operations (Bartik et al., 2020;Donthu & Gustafsson, 2020).
Reportedly, around 490 million square feet of retail stores were closed from 2008 to 2016 in the United States (Cavan, 2016). A recent report (Zumbach, 2020) pointed out that in the United States, 17.7% of retail and food stores disappeared from April 2020 to May 2020, and the total estimated closed stores for the retail industry was between 20,000 Abbreviations: CBG, Census Block Group; DDM, Dynamic Decision Modeling; GIS, Geographical Information Systems; GWR, Geographically Weighted Regression; IBLT, Instance Based Learning Theory; MCI, Multiplicative Competitive Interaction; NAICS, North American Industry Classification System; NYC, New York City; OLS, Ordinary Least Squares; PSO, Particle Swarm Optimization; RL, Reinforcement Learning; SME, Small and Medium sized Enterprise.
to 25,000 nationwide. The report also states that department stores such as J.C. Penney are particularly vulnerable due to the economic crisis resulting from the pandemic. In such situations, one of the most common solutions to prevent loss or bankruptcy is to downsize by closing one or more stores of a chain. Quite often, closures may turn out to be of large scale, and the critical decisions of closing multiple stores are usually made based on single-store performance, e.g. by closing the most underperforming store, with little or no attention to the dynamics of the overall system. Deciding which store(s) to close is clearly a complicated problem that involves various interacting factors, and there is very little literature on how commercial chains should make such decisions.
The main motivation in this study comes from the need to address the store closure problem as described. The study proposes a data-driven gravity model that considers interactions among stores of the chain as well as with competing stores and store chains. The methodology proposed in this paper can help companies to make more effective decisions on which store(s) to close in order to better weather the crisis.
The novelties of our proposed decision support approach are as follows: • This study proposes the first data driven gravity model (a variation of Huff model) that helps retail managers make informed decisions on store closure. It leverages customer patronization models to analyze how the number of visits to remaining stores of a chain and its competitors' stores will be affected after closing a store. • Our study uses a combination of various large-scale datasets including spatial, mobility, spending, and open census datasets. • The proposed approach considers the dynamics of the overall system evaluating the interactions among multiple stores, whereas existing studies mainly consider single store-level variables for closures. • While the original Huff model is designed to estimate market share after opening a store, the proposed variation works in the reverse direction, to estimate the market share of a chain after closing a store. This study attempts to understand how visits to different stores would change in case of a closure, which could serve as a point of reference in store closing decisions. • In the proposed variation of the Huff gravity model, a new attractiveness factor is introduced and added that measures the demographic similarity of customers' home neighborhoods and neighborhoods where stores are located, contributing to the model performance. • Various statistical tests confirm that the proposed variation of the Huff model is statistically sound in predicting store visits and market share when compared to the empirical datasets used.
The remainder of this paper is organized as follows. Section 2 provides the related literature and background for the study. Section 3 discusses the proposed method and underlying algorithms, and introduces the novel elements of the model and proposed approach to solve the store closing problem. Section 4 introduces the datasets used in this study. Section 5 discusses the conducted experimental case study, results, and evaluations. The paper closes with the discussion and conclusions in section 6, which provides a summary of the study, results and limitations that can be considered to improve this work.

Literature review
This section provides an overview of relevant works covering topics discussed in this work. The first subsection (2.1) provides a review of research that proposed methods and frameworks to support making decisions for store closing. The second subsection (2.2) explains the Huff gravity model and its proposed variations that are the cornerstone of this study.

Foregoing store closure studies
Store closing is one of the most critical issues of the retailer decisionmaking process (Patel, Struckell, Ojha, & Manikas, 2020). While researchers have widely studied the reason (Cavan, 2016) or results of store closures, there are few studies that propose how to make closure decisions to minimize the resulting loss. Nevertheless, understanding the reason and results of store closures benefits this research in designing the decision making model and the related algorithm. This is in addition to many other studies that discuss how retail chains should select locations for new stores (see, e.g., Simkin, 1989;Gielens & Dekimpe, 2001).
Previous research took spatial factors into account for store-closing decisions using Geographical Information Systems (GIS) to perform integrated location analysis (Shields & Kures, 2007). They analyzed the case of K-mart stores. In their model they took each store's location into account to achieve the highest estimated profits. In order to predict the number of closed stores, they used a logit model with independent variables including the area of the store, the proportion of households within 15 min to each store whose yearly income fell between $20 K and $50 K, the Euclidean distances from a K-mart store to the closest three stores of two competitive chains and K-mart itself, transportation costs, and demographic information related to children and poverty. While this study has limitations such as having the proposed method designed based on seven simplifying assumptions and using the ground truth data, their model only slightly outperforms the naive model, but also sheds light on factors that influence decision-making processes for closing a store. Haans and Gijsbrechts (2010) studied the effect of store closures on the performance of other stores using classical discrete choice specification and a three-level nested multinomial logit model to obtain unconditional choice probabilities describing consumers' selections (Dhar & Simonson, 2003;Haans & Gijsbrechts, 2010;McFadden, 1973). They also adopted Tobit models to imitate consumption of different categories of products. This research inspired us to consider the changes made by consumers regarding their shopping outlet choices after one store is closed, and this is reflected in the calculation of chain and store loyalty in this study using the method proposed by Seenivasan, Sudhir, and Talukdar (2016). Mayadunne, Johar, and Saydam (2018) studied store-closing issues faced with the sluggish economy in the late 2000s. Their study is based on the principle that store locations are tied to customer demand and their competitors' fixed locations. This principle indicates that a store should seek its place where nearby customers have a stronger preference for their company, and its competitors will share the purchases in the store if this store is closed. This perspective is reflected in our study as well. To be specific, they constructed a model to maximize the company's total profits in various stages. In one step, they allocate the total demand in a region across different stores belonging to various companies according to demand functions and the distance between a store and each customer and set a distance threshold for each store to control the demand share. Furthermore, they apply a multi-period heuristic using mixed-integer programming to determine the equilibrium status of store-closing decisions of two competing companies over different periods. This study pioneers in analyzing the dynamics between two companies in the same region on closing stores. However, one limitation is that the independent variables in the model demonstrating competition between the stores of the two companies are fixed, which is not realistic and hard to achieve in the real world since consumer behavior varies from one region to another. Furthermore, their model can only be used to analyze the dynamics between two companies while in the current dynamic and competitive market models should allow analyzing multiple competitors. In addition, when one studies the companies that focus on products regarded as essentials in daily life, for which demands are rigid, the sequential impact of decisions is minimal. Table 1, summarizes the three relevant research to this study.

Huff gravity model
As discussed above, store location selection is never an outdated topic for retailers. Apart from empirical studies, theories and models have been gradually developed to quantify the commercial environment and consumer preferences (Suhara, Bahrami, Bozkaya, & Pentland, 2021) that cover techniques involving market share (Drezner, 2006). This theoretical framework can be traced back to 1931 when Reilly (1931) proposed the law of retail gravitation. According to this theory, the larger the retail stores, the more likely it is for consumers to come from longer distances. The Huff gravity model (Huff, 1964), together with proximity (Hotelling, 1990), deterministic utility models (Drezner, 1994a), random utility (Drezner & Drezner, 1996;Leonardi & Tadei, 1984) and cover-based (Drezner, Drezner, & Kalczynski, 2011) models are the most commonly used ones among them.
In the proximity model, it is assumed that the gravitation of a consumer towards a store will push the consumer to visit the store, where the gravitation is only computed using distance (Hotelling, 1990). When consumers can choose more efficient means of transportation or there is no significant difference in the distances between consumers and two stores, it is unrealistic to judge the attractiveness of different stores by considering the distance alone. Deterministic utility models are aggregated models assuming the consumer patronizes the store with the highest weighted utility (Behrens, Lijesen, Pels, & Verhoef, 2012;Drezner, 1994a;Suhara et al., 2021). According to the random utility model, consumers' preferences towards various brands will impact store selections, as they tend to patronize specific chains to which they are loyal.
In addition, the utilities of stores to consumers have a multivariate normal distribution (Drezner & Drezner, 1996;Leonardi & Tadei, 1984). In the cover-based models, each store is expected to exert a sphere of influence on consumers, and a consumer's buying power is equally distributed to stores whose sphere of influence includes the consumer (Drezner et al., 2011). When considering stores of the same company or companies with products that are highly homogeneous, equal shares of buying power can be expected. Our research seeks to quantify competitiveness among stores affiliated with different brands where consumer preferences cannot be ignored. The Huff gravity model proposed in 1964 (Huff, 1964) works under the assumption that the probability for a customer to patronize a store depends on its proportion of the sum of utilities of all potential stores by the following equation: where U ij is the utility for customer i from visiting store j, P ij is the probability that customer i patronizes the store j, and n corresponds to the number of stores.
Equation (2) defines the utility of store j for customer i, where A j refers to the attractiveness of the store j and D ij refers to the distance between the customer i and the store j. Parameters α and β are used to adjust the model's sensitivity to the two factors of attractiveness and distance.
The original Huff model uses store area as the measure of attractiveness and assumes α is equal to 1. With studies leveraging the Huff gravity model with new data resources, the attractiveness of stores started to be defined by extra factors besides their areas. Nakanishi and Cooper (1974) proposed a multiplicative competitive interaction (MCI) model that brings into account multiple dimensions of attractiveness. The MCI replaces the floor area with a product of attractiveness factors, where a parameter adjusts each factor in the product. Equation (3) shows the MCI model when multiple factors are included in attractiveness.
The set of parameters α and β can be tuned and one can apply the Huff gravity model to target different consumer populations and across regions. Therefore, parameter calibration plays an essential role in improving the accuracy of Huff gravity model applications. The ordinary least squares technique (OLS), geographically weighted regression (GWR), and particle swarm optimization (PSO) are the main approaches used in the literature so far (Eberhart & Kennedy, 1995;Huff & McCallum, 2008;Liang, Gao, Cai, Foutz, & Wu, 2020;Nakanishi & Cooper, 1974;Suárez-Vega, Gutiérrez-Acuña, & Rodríguez-Díaz, 2015;Suhara et al., 2021). OLS is sensitive to outliers and GWR disregards consumer preferences by focusing on location. Moreover, in the current urban setting, especially in metropolitan areas like NYC, stores may be located very close to customers' homes. This leads people to ignore the minimal differences in distances to locations.
PSO is a continuous nonlinear optimization technique modeled after bird flocks. These particles which represent humans only use velocity and position to simulate behavior (Eberhart & Kennedy, 1995). Each particle moves to seek the optimal local location until the model converges or a maximum threshold, such as movement time, is reached (Zhan, Zhang, Li, & Shi, 2010). By comparison to OLS and GWR, PSO uses few assumptions (Liang et al., 2020), and gives more freedom to design models. Table 2, summarizes all studies proposing variations of the Huff gravity model.
Building upon this literature our research is based on the premise that consumer patronization behavior is the core to construct a model that can support the store closing decisions. This study will make both methodological and substantive contributions to the existing literature.
Methodologically, the main contribution of this work is twofold. First, a variation of the Huff gravity model is proposed, adding a novel attractiveness factor that measures the demographic similarity of customers' home neighborhoods and neighborhoods where stores are located, contributing to the model performance. Then the proposed model is used-which is originally designed to estimate the market share to help with opening a store -in a reverse direction to estimate the market share of a chain after closing a store. This study attempts to understand how visits to different stores would change in case of a closure, which could serve as a reference in store closing decisions. The proposed method can contribute to substantive insights for the store closing decision making during the financial and economic crisis. We expect to analytically predict customer visit patterns changes after closing a store. Based on these patterns, our contributions will help managers decide which store should be prioritized to be closed during turbulent times, such as amidst and post pandemic. The results should be useful in supporting the management of chain stores, to make better and more informed decisions for downsizing.

Methodologies
This section explains the construction of the proposed model and discusses the new features used in the model. It also discusses the proposed algorithm to support store closing decisions which represents the main purpose of this work.

Overview of the proposed method
The flowchart of the proposed method is shown in Fig. 1. After data input, in the first step the parametric model is constructed using actual data. In the second step, parameters are calibrated and the model is  trained. In the third step, one store from the set of candidate stores to be closed is chosen for hypothetical closure. In the fourth step, the predicted revenue loss as a result of the closure is computed. Steps three and four repeat until the predicted loss is computed for all stores in the set of candidate stores to be closed. In the final step, stores are ranked based on the predicted revenue loss and the store with minimum revenue loss is chosen for closure.

Model construction
This study uses an MCI variation of the Huff gravity model utilizing various attractiveness measures from the literature and introduces a novel attractiveness measure. Factors used from the literature are (1) the area of store, (2) availability of parking space for store customers, (3) loyalty of customers to the store brand or chain, (4) number of points of interest (POIs) in the vicinity of a store, and (5) diversity (Shannon, 1948) of POIs in the vicinity of a store. POIs are defined as locations where economic and business activities are done or various types of services offered (detailed information about POIs is provided in subsection 4.3).
Inspired by the vast array of network studies that show the association of homophily with human decision-making (Jackson, 2010;McPherson, Smith-Lovin, & Cook, 2001;Shrum, Cheek, & MacD, 1988) this study introduces a new attractiveness factor to include the sociodemographic similarity of the customers with the residents of the neighborhood where the store is located. This new factor indicates that considering other attractiveness and accessibility factors the same, a customer is more likely to choose the store within the neighborhood with similar socio-demographic features to theirs over other alternatives. This is measured by computing cosine similarity between customers' and neighborhoods' demographic vectors. Details about the attractiveness measures used in this model are provided in Table 3.
The attractiveness metrics are normalized using the min-max method to range between 1 and 10 except for the parking variable which is binary. This approach helps to avoid very large or minimal model parameters after tuning, making them comparable.
Additionally, for the case of parking space availability which is a binary variable, raising the binary variable to a power as a parameter is meaningless. Instead, we use expression (8) where ∊ is the parameter and the binary variable Prk j is in power. If Prk j = 0, then the expression is equal to 1 and has no effects on the store's attractiveness, else if Prk j = 1, then ∊ will affect the attractiveness of the store.
(1 + ∊) Prkj , ∊ > 0 Equations (9)-(11) show the final structure of our model. f in equation (11) corresponds to the fraction of visits from neighborhood i to store j and j is the set of all stores from the same business category.

Parameter estimation
For estimating the model parameters, we use PSO to calibrate β, γ, ∊, δ, θ, μ, ψ for each neighborhood i. Various combinations are tested to find the best parameter ranges. The objective function is to maximize the value of Pearson correlation between the estimated fraction (f ij ) and the actual fraction (f ij ) of the visits of consumers from neighborhood i to the store j.

Simulating store closure
After calibrating the parameters with actual data, one can use the proposed variation of the Huff model in a reverse direction to estimate the market share of remaining stores after closing a particular store. The Huff model has primarily been used to estimate the stores' market share after a new store is opened, but in this case, one of the stores is removed from the set of all stores within the same category. Assuming the total demand is fixed, one can estimate the fractions (f ij ) for the new set of stores after closing store j * using equation (12).
After computing the estimated fractions, it is straightforward to compute the estimated visit count from each neighborhood i to each store j by simply multiplying the fractions with total demand that was assumed fixed. The outcome is the predicted visits from each neighborhood to each store. Subtracting the predicted number of visits after closing a store from the actual visits when the store was operating will indicate the predicted customer visit gain or loss for each remaining store. It is important to note that for the chain stores, the gain or loss is computed as the sum of all predicted visits after closure minus the actual total visits before closure. Multiplying the predicted visit counts by average spending of that neighborhood in a particular brand can give the estimated revenue of the store. This multiplication is performed because there might be differences between the spending amounts of two customers from different neighborhoods in the same store, and examining only the number of visits does not consider such differences in spending.

Which store to Close?
The store whose closure results in the minimum loss of estimated revenue for all the stores of the given chain combined would be the Table 3 Variables in the proposed variation of the Huff Gravity Model, indices i and j correspond to customer and store respectively.

Areaj
The area of store j in square meters Prkj The dummy variable (binary) showing whether store j provides parking space for its customers NPOIj The number of POIs in the vicinity of store j DPOIj The diversity of POIs in the vicinity of store j based on their business type using Shannon entropy using the formula below: c denotes the fraction of POIs from category type c in the vicinity of store j. ChLij The fraction of total spending by residents of the neighborhood i in all stores of the chain that owns stores j over total spending in the same business category as store j. Simij The cosine similarity of socio-demographic features of the neighborhood i where the customers come from, and the neighborhood store j is located. The socio-demographic information used are education level, income level, age, and racial composition of residents. This measure is computed using the following formula: where Vi and Vj are the demographic feature vectors for the customer and store neighborhoods.

Dij
The Haversine distance between the store j coordinates (Xj, Yj) and the neighborhood i polygon centroid (Xi, Yi). This is the great-circle distance between two points on a sphere and is computed using the formula below: where r is the radius of the planet earth.
obvious choice to close. The following algorithm is used to determine the magnitude of total loss after closing each chain store. Algorithm.

Use actual visit fractions f (t)
ij from historical data in time period t to calibrate the model parameters for each neighborhood using the PSO method. 2. Predict the total demand (visits) using historical data for time period t + 1.
3. Disaggregate the total predicted demand among the stores into f (t+1) ij using the calibrated model.

Estimate the total revenue of a chain R (t+1)
cJ by summation over multiplication of total predicted visits from each neighborhood to the chain by their average spending in the same category from historical data.
5. Using parameters from step 1 and total predicted visits from step 2, perform step 3 after removing stores of a chain one at a time from the set of stores. 6. Repeat step 4 using the total predicted visits from step 5 to compute the estimated revenue after closing each store R (t+1) c(J− j * ) . 7. Compute the estimated profit/loss from closing store j * by subtracting estimated revenues from Steps 4 and 6.

ΔR
8. Rank the stores based on the predicted revenue loss and choose the one with minimum revenue loss.

Data
This study utilizes various large-scale datasets from different sources, including the open U.S. census dataset, spending, and mobility datasets available for academic research purposes. This section will introduce the datasets used for the experiment and case study that is conducted to evaluate the model performance.

Mobility data
This dataset is provided by SafeGraph 1 , a location intelligence company that collects location information from about 50 million smartphone devices in the United States. The data covers visits to more than 6.5 million points of interest (POIs) from January 2018 to December 2020. The mobility patterns data comes in different time and geographic aggregations to preserve users' privacy. The users' visit patterns are aggregated at the census block group (CBG) level. These patterns are available at weekly and monthly aggregations. Thus, no information could potentially be used to track or identify individual users. The POI dataset includes information about each POI's name, brand name if applicable, address and contact information, business category, North American Industry Classification System (NAICS) code, and area in square feet. The datasets are made available by the Safegraph data consortium for researchers as a part of the Data For Good program in order to help provide insights about the effects of the COVID-19 pandemic on human life.

Transaction data
The customer spending data for this research is provided by Facteus 2 . The dataset includes daily spending of a sample from general-purpose debit cards, payroll cards, and government cards in the United States.
The user spending is aggregated by users' home ZIP code, and merchants are specified only with their brands. This dataset has reasonable coverage on the mentioned types of cards. For example, it captures 2.76% of payroll cards, 3.94% of debit cards, 3.00% of general-purpose debit cards, and 0.81% of government cards in Pennsylvania. This dataset is also a part of the Safegraph data consortium and Data For Good program and spans from January 2017 to May 2020.

Places data
Places is a comprehensive dataset of global points of interest (POIs) provided by Safegraph company. POIs are locations where economic and business activities are done or various types of services offered. Some POI categories with examples are financial centers (such as banks and exchange places), educational centers (including schools and universities), shopping places (such as supermarkets, grocery stores, and department stores), eating places (all types of food outlets such as fast food, Pizza, and full-service restaurants), hospitals and clinics (hospitals, clinics, doctors and dentists offices), auto services (including gas stations, car wash, and maintenance services), parks, public and private sport places, gyms, lodging related places, real-estate and constructions services. This dataset includes POI names, their location, address, and their business category.

Open census data
This dataset is publicly available and provided by the United States Census Bureau 3 . The demographics and socio-economic information of every census block group (CBG) in the country were collected. Census block groups (CBG) are the smallest geographical unit used by the United States Census Bureau and have the highest spatial resolution with socio-demographic information publicly available. This dataset contains numerous variables from which we extracted population, median income, median age, racial composition, and education level of each CBG's residents.

Case study and results
This section will discuss the conducted real world experiment utilizing the proposed algorithm in Section 3. It will also discuss and evaluate the case study results.

Experimental setting
In this research, department stores are studied, in particular, Target Corporation stores in New York City (NYC) for years 2018 and 2019. Therefore, the datasets are filtered based on the NYC administrative boundaries. This study leverages two years of fine-grained mobility data collected from mobile phone geo-locations of millions of users, visiting more than 42,000 POIs, and living in 6,493 CBGs of New York City. Each CBG is considered as a demand or customer center. There are 6,493 CBGs inside NYC boundaries.
From the POIs falling inside the CBG polygons, and using the business category of department store, 24 chains are chosen to be included in this case study, which consist of 282 stores in total (20 Target Corporation stores and 262 stores of competitor chains). The competitor chains include Family Dollar Stores, Dollar General, Dollar Tree, Saks Off Fifth, Macy's, BJ's Wholesale Club, Sears Home Services, Five Below, JCPenney, T.J. Maxx, Kmart, Barneys New York, Kohl's, Bloomingdale's, Neiman Marcus, Amazon 4-Star, Hermès, Walmart, Costco Wholesale Corp., DAISO, Lou & Grey, Sears, Bottega Veneta, and Saks Fifth Avenue. Fig. 2 shows the spatial distribution of Target Corporation stores and CBG polygons in New York City. In order to make a referral to stores more accessible, an id is assigned to each of 20 stores starting with the letter 'T' followed by two digits from '01 ′ to '20 ′ . Fig. 3 shows the locations for all of the 282 department stores.
For each store, information is gathered on the category, latitude and longitude coordinates, CBG id, brand name, area, and whether it provides parking for customers or not. The number and category of POIs falling inside each CBG polygon are used to compute the number and diversity of POIs in the CBG as attractiveness factors (NPOI j and DPOI j ) for the store. Each CBG polygon centroid is considered as a customer location and the haversine distance D ij between the customer CBG centroid i and store location j is computed.
For chain loyalty (ChL ij ), a spending dataset which provides customer spending aggregate by customer home ZIP code of their home location, and stores by their brands is used. Since there is no complete coverage and one to one mapping between ZIP codes and CBGs, the spending of CBGs is inferred by taking a weighted average using the ratio of the population of a CBG in ZIP codes that cover the CBG partially by equations (14) and (15) Then the total spending was aggregated by each CBG in a category (i. e., department stores) and the fraction of it spent in each chain is computed (Seenivasan et al., 2016). Additionally, the average spending by each CBG's residents in each category used to estimate the revenue of stores per visit from the CBG is computed. Since the datasets have complete intersections in 2018 and 2019, the study is limited to those two years. For the case of similarity, as explained in Table 3, the cosine similarity between the demographic features of customer CBG and store CBG are used. Demographic features were extracted at the CBG level from the U.S. census API. Finally, the parameters were calibrated using the PSO method. Fig. 4 shows the density plot and distribution of the parameters for all CBGs in NYC. As depicted in the figure, the parameter related to the distance between CBG and store, takes higher values in comparison to the other parameters.

Proposed model performance evaluation
In order to investigate the linearity of the relationship between the factors used in subsection 5.1 and the visit numbers to stores, a linear regression is conducted. While the results shown in Table 4, indicate that all the factors are statistically significant and the direction of the coefficients are as expected, but the very small magnitude of the R 2 suggests that a linear model is not able to explain the variations in visits to different stores.
The first experiment attempts to evaluate the performance of the proposed model in equations (9)-(11). A model is trained with data from 2018 and parameters are calibrated to predict the visits to stores in 2019 for each CBG-store pair in NYC. Only 6,298 out of the total 6,493 CBGs are recognized to have visits to different stores. Consequently, the computation, prediction, and performance analysis are based on the results from the live CBGs in 2018. In other words, for the CBGs that do not see visits in 2018, the actual and predicted visits in these regions are presumed to be 0. Thus, they are excluded from the model's performance measures. Using information for 6,298 CBGs and 282 stores of 24 brands, more than 1.77 million data points of store-CBG pair visits are predicted. The model performance is evaluated by measuring the Pearson correlation between actual and predicted visits in 2019. Fig. 5 displays the box plot of Pearson correlation distribution of the predicted and actual visits of each CBG in NYC. To elucidate, the box plot shows the distribution of 6,298 correlations, each corresponding to correlation between a CBG's actual versus predicted visits to the 282 stores of study. The general Pearson correlation between actual and predicted visits for all 1,776,036 CBG-store pairs (6298 × 282) is 0.65351 with a p-value almost 0 in terms of each store-CBG pair. The actual visits and predicted visits to each store are compared (282 data points), and a significant Pearson correlation coefficient of 0.77384 with a very small p-value (1.796e-57) is calculated. Additionally, we examined how our model performed on predicting the total visits of each brand (24 brands in total). The Pearson correlation coefficient is 0.92074 with a small p-value (1.847e-10). In conclusion, significant high correlations are achieved at the levels of CBG-store pairs, stores, and brands. The results, as shown in Table 5, indicate that the proposed  variation of the Huff model performs well in terms of Pearson correlation and the large data size.
To further evaluate the model performance, two statistical tests were conducted, namely: Chi-Square goodness of fit test and Kolmogorov-Smirnov test. In terms of the Chi-Square, we got p-value very close to 0, which implies the predicted and actual visits are significantly similar. Among the 6,270 CBGs with visits both in 2018 and 2019, in 6,258 CBGs the model predicted visits significantly similar to the actual visits, with p-values smaller than 0.05. The same conclusion is reached by the result of the Kolmogorov-Smirnov test. To be detailed, regardless of the CBG and the CBG-store pair levels, p-values smaller than 0.05 were achieved. At the CBG-store level, the Kolmogorov-Smirnov statistics achieved 0.90798. Fig. 6 displays the distribution density of the Kolmogorov-Smirnov statistics at the CBG level. A majority of the values are close to 1 which indicates good fit of the predicted results by the model. Figs. 7 and 8 show the actual and predicted visits to Target Corporation stores in 2019 from the 6,298 live CBGs located in NYC, respectively.

Baseline
It is not uncommon that the stakeholders make closure decisions based on single store performance, choosing the store with the poorest performance (e.g., profitability, visitor count, total revenue) to close. The single store performance is used as a baseline method to compare against the results our model produces. As a performance measure, the estimated revenue is used (visit count multiplied by average customer spending), meaning that the store with the lowest estimated revenue should be closed. Based on this criterion, store T09 with the lowest foot traffic and the estimated revenue is ranked first for closing. Fig. 9 shows store T09 and the spatial distribution of its customers.

Store closing simulation
Using the algorithm proposed in section 4.4 the case of closure of Target Corporation stores in NYC is studied. The dataset from the year 2018 is used to compute the actual CBG-store visits and CBG-brand spending for all 6298 CBGs and 282 stores. Then, considering fixed demand (visits) for 2019, each store is considered to be closed and the estimated total revenue loss for the chain is computed. Table 6 compares the result of the proposed model for closing recommendation versus the baseline using single store historical performance based on their estimated revenue (summed multiplication of average spending of CBGs in the category by total visit count). The color pallet makes the visual comparison easy among the two columns. The color range in the second column indicates the predicted loss ordering (closure rank), and in the third column, the same color for each store as in the second column is used.
The proposed method is built based on the idea that closing a store from a chain does not necessarily result in losing all the customers of that particular store, yet a fraction of those customers will be retained by the remaining stores of the same chain. As reported in Table 6, while the single store performance idea recommends store T09 to be closed, the proposed method suggested store T14 as the first option, which is ranked 10th to be closed by the baseline method. The difference in the store choice between the two methods indicates that the proposed model predicts that in the case of closing store T14, the set of remaining operating stores are more capable of capturing the former customers of T14, rather than the case of closing store T09. Fig. 10 shows store T14 and spatial distribution of its customers.
The results of this case study suggest that the stores recommended being closed under the proposed model may not always match the single store performance, emphasizing that the performance of a chain as a whole is not simply the outcome of operating stores as isolated units but a network of stores interacting with each other.

Discussion & conclusion
Modeling store closure is difficult due to the complexity of real-world data. Making a more insightful decision on this issue appears to be increasingly challenging and vital. The proposed variation of the Huff Gravity Model leverages precedent theories and empirical studies to consider seven variables. The set of variables used includes six variables from the literature, and a new variable proposed in this study, which is inspired by the idea of homophily and brings into account the demographic similarity between the customer and store neighborhoods resulting in improved model performance. The variables we use in the proposed model are: • the area of a store • the parking lot ownership of a store • chain loyalty of visitors • the number of POIs in a particular region • the diversity of POIs in a particular region • the distance between a visitor's home and store location   • the demographic similarity between the customer and store neighborhoods In particular, the case study of department stores in New York City is considered an impressive micro world (Gonzalez, Vanyukov, & Martin, 2005) since it is a highly-developed modern city where a variety of commercial brands settle in and compete for the attraction of many residents. The model performs reasonably well in terms of Pearson correlation values and the large data size. In the case study, the model predicted the visit distribution among department stores in New York City with a high Pearson correlation coefficient of 0.77384 at the store level, 0.92074 at the brand level, and 0.65351 for predicting more than 1.77 million data points for store-CBG pair visits. Additional statistical tests further confirmed the statistical significance of the proposed Huff    Fig. 9. Target Corporation store T09 customer distribution. Colors indicate the percentage of spending by each CBG covered by store T09. M. Bahrami et al. model in making these predictions. Finally, an algorithm was designed that uses the proposed model in the reverse direction to simulate the customer visit distribution after hypothetically closing a store from a chain utilizing behavioral analytics extracted from the historical mobility data.
This study has limitations mainly arising from restricted access to and availability of detailed data. Since the stores' internal data is not accessible, the profit needs to be replaced with estimated revenue based on the mobility data which does not capture all the stores' customers and has limited coverage in some areas. The same argument is valid for the spending data. The dataset used does not provide a visit history for the stores that were permanently closed. Therefore, the visits were merely redistributed based on the calibrated parameters instead of modeling human behavior, assuming that any store in the list is closed.
Although the customer response to closing a store is not seen in our model yet, it is believed to portray a good picture for store visit prediction with a substantial theoretical and empirical foundation. The case study and simulation results suggest that the stores recommended being closed under the proposed model may not always match the single store performance, which highlights the fact that the performance of a chain is a result of interaction among the stores rather than a simple sum of their performance considered as isolated units. The proposed approach provides decision makers with new insights into store closing decisions and will likely reduce store closure's consequences on revenue loss. A practical use of the proposed model would be feeding it with the most recent and up-to-date datasets for the region being studied and analyzing scenarios of single or multiple stores being closed. The proposed approach can also be potentially used by competitors when they see a particular chain store closed. They can use the model to predict the probability of new customers from different neighborhoods and start or adjust their marketing strategies based on the socio-demographic information and taste of the potential customers.

Availability of code and data
The code and more detailed visualizations are available on the GitHub page of this research project at: https://github.com/Yilun 0221/Making-Hard-Decisions-Which-Stores-To-Close-. An online interactive dashboard for store closing decisions based on this study is designed and deployed, available at: https://github. com/milestweed/Making\_Hard\_Decisions. The mobility data from Safegraph is available for academic research purposes as a part of Safegraph data for a good program.
The spending data was available as a part of Safegraph Data For Good, COVID-19 consortium, which is currently unavailable, but the aggregated data used for the case study are available on the research GitHub page.

Table 6
Results for Store Closure Ranking by the proposed model vs the single store performance baseline.