## Introduction

The world has gone through unprecedented changes since the global pandemic hit. Peoples lives have changed drastically with stay-at-home orders, curfews and strict lock-downs. The highly contagious nature of the COVID19 virus, together with little to no regulations on restrictions on global mobility during the early periods of the pandemic resulted in the spread of the virus to every corner of the world. During the early phase of the pandemic, the absence of known drugs or pharmaceutical treatments forced governments to introduce different policies in order to help reduce contagion rates and manage the economic consequences of the pandemic. These policies, also referred to as non-pharmaceutical interventions (NPIs) include, among other things, closing of national borders, travel restrictions, restrictions on public gatherings, restricting the capacity in bars, restaurants, theatres and emergency investment into healthcare systems and new forms of social welfare provisions. Different stages of lockdowns have been introduced by governments across the world1, studied the impact of 130 NPIs across 130 countries2, construct a policy indicator Oxford COVID19 Government Response Tracker (OxCGRT) which provides a systematic way to track government responses to COVID19 over time by taking 20 indicators such as school closures and travel restrictions for more than 180 countries. Since public health experts are learning in real-time, there is debate in politics over the level of response which should be pursued and the timescale to implement and roll-back different responses. Many NPIs have been proven to have a positive impact on controlling the spread of COVID193, analysed how the implementation of NPIs, along with climatic, social and demographic factors all affected the initial growth of COVID19. They state that government introduced NPIs do not explain the growth in COVID19 cases and that the growth rate in cases is explained by demographic, climatic and social variables4. studied the role of public attention to COVID19 using Google search data, finding that countries with higher levels of public attention are more likely to implement NPIs and the extent to which a government is willing to introduce NPIs is dependent on the countries institutional quality. Moreover, it is important to evaluate the impact of NPIs in order to gain a deeper insight into both the positive effects, in terms of pandemic control and the negative effects, in terms of the economy.

Population density may also form an important characteristic in COVID19 infection rates, maintaining safe distances is more difficult in areas with higher population densities5. Other studies have found that there has been moderate associations between population densities and the spread of COVID196,7,8. Moreover, other literature did not find the same results suggesting that more densely populated areas have better access to health care and increased social distancing policies9. More densely populated areas may tend to experience an outbreak earlier than more sparsely populated areas, however10, found no evidence that population density is linked with COVID19 cases.

In order to help reduce the spread of COVID19, policymakers throughout the world have sought to place restrictions on local populations. These reductions on human interactions should lead to reductions in person to person contagion but it also comes at a high political, social and economic cost. Reference11 studied the impact of COVID19 on the U.K. economy by linking a macroeconomic model to an epidemiological model. They state that applying mitigation strategies for 12 weeks reduced fatalities by 29% but the cost to the economy was 13.5% of GDP of which 2.9% is attributable to labour lost from parents staying at home due to school closures and 8.8% is attributable to business closures. Moreover, the shut down of businesses in Europe was estimated to reduce GDP by 3% per month12. Therefore it is important to find the right balance between public health, societal and economic costs.

This paper address the problem of evaluating non-pharmaceutical interventions (NPI) and public policy decisions during the COVID19 pandemic in Spain. Specifically, we have focused on evaluating a policy brought in to help slow the spread of COVID19 incidence during a time when Cataluña was experiencing a peak in the number of daily new COVID19 cases. The policy forced the closure of bars and restaurants, only allowing takeaway services along with a maximum capacity in shopping centres reduced to 30%, fitness clubs, cinemas and theatres capacity restricted to 50%, the suspension of all non-professional sporting activities and face-to-face teaching was also suspended. These measures were originally supposed to last two weeks but remained in place for five weeks in total. At the time, local health authorities were seeing a total of 12,211 new cases between October 4th 2020 and October 10th 2020 and rising. Hospitals in the region had more than 1000 COVID19 hospitalisations, 189 of whom were in intensive care units (ICUs), the R rate (measuring how many people a positive case may infect) was at 1.3. This prompted the Catalan government to implement measures to reduce social contact which is the main driver in COVID19 outbreaks.

The introduction of the policy was brought on by the regional government of Cataluña and not that of the central government of Spain. The ministry of health for Spain (Ministerio de Sanidad, Consumo y Bienestar Social) agreed in September of 2020 that regions in Spain (with more than 100,000 inhabitants) must be confined should the following thresholds be exceeded, a 14-day cumulative number of COVID19 cases above 500, ICU occupancy greater that 35% and a positivity rate greater than 10%. At the time Cataluña had 7% of hospital beds occupied by COVID19 patients with an ICU occupancy of 19.5%. Madrid on the other hand had 21% of hospital beds occupied by COVID19 patients and 38% ICU occupancy. It is important to note that in Spain, regional governments take the primary decisions on public health initiatives with the central government stepping in when necessary. For example, at the time, the regional government of Madrid lack of action prompted the central government of Spain to declare a state of alarm in the region, overriding the regional government and putting in place a perimetral confinement for Madrid’s municipalities in order to bring infection rates down. The policy under evaluation in this paper was introduced by the Catalan government and not the central government as was the case with Madrid.

Using anonymized phone-based mobility data we analyse the change in mobility patterns after the introduction of a policy made in Cataluña of closing down bars and restaurants in order to try and slow the spread of COVID19 infection rates. For this purpose, we collected anonymous mobile phone data based on trips and construct origin-destination (OD) matrices for each day13. A more formal description of the mobility methods are left to “Mobility data records”. (Regarding the mobility data, the system uses phone-based anonymized and aggregated data provided by the Ministry of Transportation, Mobility and Urban Agenda (MITMA). The data accounts for daily mobility patterns between and within mobility zones Figure 1, a geographical layer defined according to the coverage of mobile phone antennas. Specifically, the dataset includes the total trips between any pair of mobility zones, as well the total trips within a single mobility zone. Formally speaking, this data can be arranged in a collection of temporal weighted networks in which each mobility zone corresponds to a node in the network, and for a given date a weighted directed edge (or arc) between two nodes represents the total number of trips between the two mobility zones.) Additionally, the data can be downloaded from Refs.14,15. Each OD matrix accounts for the number of trips from a given mobility zone into another mobility zone, where individual mobility zones make up a combination of municipalities and districts across Spain. Using the OD matrices we compute four types of mobility indexes incoming, outgoing, internal and total. The incoming and outgoing mobility types are trips coming to and from a given mobility zone, internal concerns the movement of trips within a given mobility zone and total refers to a summation of the three mobility types, a more detailed explanation is left to the methodology section. To assess the effect the policy on mobility, we apply a series of causal inference models which are useful in quantifying the impact of public policy decisions or NPI’s. Most notably, we apply an Ordinary Least Squares (OLS) model with policy controls, a difference-in-difference model and a Bayesian structural time-series model. We find that this policy affected the behaviour of people and lead to significant reductions in mobility. That is, people responded to the NPI policy by travelling less across mobility zones but did not alter their behaviour within their own mobility zone.

## Literature review

This section discusses relevant literature. We first break the section down to related literature using interrupted time series for policy decisions. Secondly, we link mobility with public policy decision making and finally we discuss how mobility has been linked to COVID19 incidence.

### Interrupted time series

Interrupted time series models are being increasingly applied when analysing the impact of public health interventions. Reference16 applied Box-Tiao intervention analysis to analyse the effects of the introduction of U.S. legislation requiring the use of mandatory seat belts across 8 states between 1976 and 1986. Reference17 applied interrupted time series models to study the association between the introduction of helmet legislation and admissions to hospital for cycling-related head injuries between 1994 and 2003 in Canada. Reference18 used interrupted time series to assess the effect of U.K. legislation of reducing package sizes of paracetamol on deaths from paracetamol poisoning between 1998 and 2009. Reference19 used interrupted time series to study the effect of the introduction of 20 mph (32 km an hour) traffic speed zones on-road collisions, injuries and fatalities in London between 1986 and 2006. Reference20 used interrupted time series to analyse the association between the 2008 financial crisis and suicide rates in Spain, using data between 2005 and 2010. Interrupted time series models have long be used to analyse public policy and time-series related events in economics and provide a suitable methodology for analysing policy events related to COVID19.

### Mobility and public policy

Reference21 used Google Community Mobility Data to analyses mobility changes from a baseline mobility level (pre-pandemic). They found three distinct patterns of societal reaction to social restrictions. In Australia (which implemented a near-complete lockdown) people did not go to their workplaces and stayed at home. In Sweden (which implemented relaxed lockdown with preserved workplace activity) the change in workplace mobility was smaller suggesting preservation of workplace activity. South Korea (which implemented minimal lockdown and preservation of workplace activity) changes in workplace mobility was even smaller. These findings suggest that populations respond directly to governmental interventions and highlights the important role of government decisions on day-to-day lives of its populations. Reference22 analysed public policy effects on driving, transit and walking mobility behaviour, finding that they dropped to lower levels in Canada than the U.S. during March 2020 and show strong evidence that policy affects mobility behaviour. Reference23 used a difference-in-difference approach and mobility data to study the causal impact of policies finding that statewide stay-at-home orders had the strongest causal impact on reducing social interactions and affects both mobility patterns and subsequent infection rates. Reference24 quantifies the effect of U.S. state reopening policies on daily mobility levels, finding that four days after reopening mobility increased between 6% to 8%. Public policy decisions therefore can have a direct effect on the behavioural patterns of inhabitants mobility in regions directly affected by the policy.

### Mobility and its relation to COVID19 incidence

Reference25 show that mobility patterns are strongly correlated with decreased COVID-19 case growth rates in the USA. They collected data from 1st January 2020 to 20th April 2020. They define a Mobility Ratio (MR) to quantify the change in mobility patterns when compared to a baseline day before the pandemic when travel patterns were stable. They use this as a proxy for social distancing such that when an individual makes fewer trips, they interact less. They link mobility data with data on cases and construct a COVID-19 Growth Ratio (GR) in order to capture the complex and time-dependent dynamics between mobility and cases. They show a statistically significant correlation between their socially distancing metric and reductions in COVID-19 growth rates, showing that the effect of social distancing on case growth is not likely to be noticed for at least 9–12 days after implementation. Moreover26, extended their own research to include more regions and expanded the time horizon from 16th March 2020 to 16th September 2020. They found that the linear association between mobility and case growth rates previously observed is absent after April 2020 and that mobility has a less significant role in the transmission of COVID-19 than other adopted behavioural changes and NPIs such as wearing face masks, hand-washing, maintaining physical distance, avoiding large gatherings and closing schools. The strong association revealed in March-April is related to the adoption of NPIs in parallel and after an introduction of varying policies and changes in individuals, mobility behaviours confound the role of mobility. They conclude that using mobility data alone is likely to result in inaccurate models and forecasts and that there are more critical factors than mobility for controlling COVID-19. Reference27 also identified a strong correlation between decreased mobility and reduced COVID-19 case growth during the period 27th March 2020 and 20th April 2020. They found that when they extended their time-horizon between 21st April 2020 and 24th May 2020 and later 25th May 2020 to 22nd July 2020, there was only a weak correlation between daily distance difference and case growth. They find that mobile phone data only captures a small component of the behaviours associated with social distancing and reduced case growth rates and that other NPIs such as wearing masks, maintaining distance are likely to be more important than mobility alone.

Reference28 used mobile phone data and modelled the relationship between mobility inflow and infections across counties in the U.S. between March 1 and June 9 2020. They found that travel between counties decreased 35% after the U.S. entered a lockdown but recovered rapidly once the lockdown started to ease. Using a system of equations they find a strong and positive relationship between mobility and the number of infections across counties with an average coefficient of 0.243, that is, a 10% increase in mobility is associated with a 2.34% increase in infections a week later. Reference29 analysed mobility data in China to track population outflows from Wuhan between January 1st and January 24th 2020 and linked it with COVID-19 infection counts by location. They find a strong correlation between total population flow and the number of infections across regions. Reference30 construct network maps of hourly movements of people to and from non-residential locations and apply a meta-population SEIR model with susceptible (S), exposed (E), infectious (F) and recovered (R) compartments which tracks the trajectories of infections. Reference31 used aggregated mobile phone data to build a SEIR model for the city Shenzhen, China. They simulate how the spread of COVID-19 changes when the type and magnitude of mobility restrictions vary. They found that reducing mobility by 20% delayed the epidemic peak by around 2 weeks with the peak incidence decreasing to 33%, a 40% reduction in mobility was associated with a delay of 4 weeks and reduced the peak by 66% and a 60% reduction was associated with a delayed peak of 14 weeks, decreasing the magnitude by 91%.

## Methods

### Mobility data records

Mobility data records come from a study conducted by the Ministerio de Transportes, Movilidad y Agenda Urbana (MITMA) https://www.mitma.gob.es/ministerio/covid-19/evolucion-movilidad-big-data. The study collects data on mobility and distribution of the population in Spain from 13 million anonymised mobile-phone lines provided by a single mobile operator whose subscribers are evenly distributed. More specifically, the data is reported on a geographical layer composed of 2850 mobility zones across the whole of Spain where each mobility zone corresponds to a district or group of districts in densely populated areas, and municipalities or groups of municipalities in regions with low population density (see Fig. 1). The unit to measure mobility is the trip and the data contains the number of trips between and within mobility zones reported on an hourly basis. The start of a trip event is defined as when a user moves more than 500 m and the end of the trip is defined as when that user remains in an antenna coverage area for more than 20 min. Thus, a person moving from region $${\mathscr {A}}$$ to region $${\mathscr {B}}$$ and remains in region $${\mathscr {B}}$$ for longer than 20 min is defined as a trip between regions. Moreover, a person who remains in region $${\mathscr {A}}$$ and is connected to antenna $${\mathscr {A}}_{i}$$ then moves to antenna $${\mathscr {A}}_{j}$$ is defined as a trip within region. We collected mobility data from 01-09-2020 to 30-11-2020 for all 17 autonomous communities in Spain using the Flow-Maps systems. https://github.com/bsc-flowmaps/Note: due to data handling issues, País Vasco and Castilla-La Mancha were omitted. Figure 1 shows the different mobility zones for all of Spain, the colours do not hold meaning and are simply coloured for easier illustration of the different MITMA areas.

After retrieving the raw mobility data reported by the hour, we aggregate it by summing the total trips between and within mobility zones for each day, to obtain mobility reported on a daily basis. Using the daily mobility data we construct origin-destination (OD) matrices for each day t. Table 1 represent an example of OD matrix where rows correspond to the origin zone and the columns correspond to the destination zone and each entry corresponds to the total daily trips from origin to destination.

Following the example of Table 1, trips from $${\mathscr {A}}_{o}$$ to $${\mathscr {B}}_{d}$$ are associated with trips leaving MITMA zone $${\mathscr {A}}_{o}$$ and going to MITMA zone $${\mathscr {B}}_{d}$$ and are the outgoing trips from MITMA zone $${\mathscr {A}}_{o}$$. Incoming trips are defined as the opposite and thus trips which began at $${\mathscr {B}}_{d}$$ and went to $${\mathscr {A}}_{o}$$. The trips going from $${\mathscr {A}}_{o}$$ to $${\mathscr {A}}_{d}$$ are internal trips (the diagonal of the matrix) or the number of trips within MITMA zone $${\mathscr {A}}$$. Furthermore, for each mobility zone on a given date we define the following four mobility indexes: (i) incoming mobility; (ii) outgoing mobility; (iii) internal mobility; and (iv) the total mobility. More formally, the incoming data takes the column sums of the OD matrix minus the diagonal, the outgoing data takes the row sums of the OD matrix minus the diagonal, the internal is just the diagonal and the total is $$\text {incoming} + \text {outgoing} + \text {internal}$$.

### Linear regression

We first run a linear regression model in order to see the effects on weekday and weekend mobility. We expect to see that the closure of bars and restaurants will have a greater effect on the weekend than on the weekdays since mobility is largely unaffected by people commuting to and from work but is affected by peoples decision to go and socialise on the weekends. We estimate the following for policy status j, at time t:

\begin{aligned} \text {outcome}_{jt} = \beta _{0} + \beta _{1} \cdot \text {time}_{t} + \beta _{2} \cdot \text {level}_{j} + \beta _{3} \cdot \text {trend}_{jt} + \epsilon _{jt} \end{aligned}
(1)

where, $$\text {outcome}_{jt}$$ is mobility for MITMA region j at time t, $$\beta _{0}$$ is the intercept of the existing level at point 0, $$\beta _{1}$$ gives the existing trend in mobility before the policy, level takes on a value of 0 before the policy and 1 after the policy with its $$\beta _{2}$$ capturing the impact of the policy, $$\beta _{3}$$ captures the change in trend.

### Difference-in-differences (DiD)

We use a Difference-in-difference technique to infer the causal impact of a policy. That is, with two groups and two periods, the DiD estimator is defined as the difference in average outcome in the treatment group before and after treatment minus the difference in average outcome in the control group before and after treatment. Here the outcome variable is a daily time-series of mobility data and therefore we are considering mobility before the policy intervention and mobility after the policy intervention. Consider Eq. (2) (with a further breakdown in Table 2) in which Cataluña corresponds to the treatment group, denoted as T and other CCAAs, for instance, Madrid corresponds to the control group, denoted as C. Therefore, $$\bar{y}_{0}^{T}$$ corresponds to the average mobility for a given mobility zone in Cataluña before the policy, $$\bar{y}_{1}^{T}$$ the average mobility in a given mobility zone in Cataluña after the policy and $$\bar{y}_{1}^{C}$$ and $$\bar{y}_{0}^{T}$$ corresponds to the average mobility in a given mobility zone in a CCAA (excluding Cataluña) before and after the policy. Thus, the causal impact of the policy can be given as the difference between these two differences. It is important to note that the data is normalised by; $$\dfrac{x - \text {min}(x)}{\text {max}(x) - \text {min}(x)}$$, bounded by [0, 1].

\begin{aligned} \text {DiD} = \bar{y}_{1}^{T} - \bar{y}_{0}^{T} - (\bar{y}_{1}^{C} - \bar{y}_{0}^{C}) \end{aligned}
(2)

### Bayesian structural time-series

We use Bayesian structural time series to infer the causal impact of a policy by explicitly modelling the counter-factual observed before and after an intervention (see32,33). The model assumes that the outcome time series can be explained in terms of a set of control time series that were themselves not affected by the intervention. Furthermore, the relation between the treated series and control series is assumed to be stable during the post-intervention period. This allows us to generalise the results obtained using the difference-in-difference approach. The model is first estimated using pre-intervention data, and then an intervention period occurs and the model then tries to predict the post-intervention period. The difference between the prediction and the observed data can be thought of as the causal impact of the policy. For the pre-intervention period, we take mobility before the policy and for the post-intervention period, we take mobility after the policy.

Consider the following state-space model for time-series data.

\begin{aligned} y_{t}=\, & {} Z_{t}^{T}\alpha _{t} + \epsilon _{t} \end{aligned}
(3)
\begin{aligned} \alpha _{t+1}=\, & {} T_{t} \alpha _{t} + R_{t} \eta _{t} \end{aligned}
(4)

In which, $$\epsilon _{t} ~ {\mathscr {N}} (0, \sigma _{t}^{2})$$ and $$\eta _{t} ~ {\mathscr {N}}(0, Q_{t})$$ are independent of all other unknowns. The observation equation (3) links the observed data $$y_{t}$$ to a latent d-dimensional state vector $$\alpha _{t}$$ and the state equation (4) governs the evolution of the state vector $$alpha_{t}$$ through time. $$y_{t}$$ is a scalar, $$Z_{t}$$ is a d-dimensional output vector, $$T_{t}$$ is a $$d \times d$$ transition matrix, $$R_{t}$$ is a $$d \times q$$ control matrix, $$\epsilon _{t}$$ is a scalar observation error with noise variance $$\sigma _{t}$$ and $$\eta _{t}$$ is a q-dimensional system error with a $$q \times q$$ state-diffusion matrix $$Q_{t}$$, where qd. More details can be found in33.

## Results

This section discusses the results in which we assess the effect of NPIs on mobility. We compare the mobility in Cataluña with that of other regions in Spain where other policies or no policies have been applied. We apply an OLS regression, difference-in-difference and Bayesian structural time series model in order to try and capture the causal effect of this policy intervention. We first report some analysis of the mobility data and OD matrices for Cataluña and Madrid, two of the most populous regions in Spain and where one region introduced the policy whereas the other did not. We then report the main results of the paper from the different econometric models. Finally, we try to link the policy to reductions in COVID19 growth rates.

### Analysis of mobility

We first report summary statistics for Cataluña and Madrid for each mobility type, Table 3. We can observe that the average mobility levels fall for each of the mobility types for Cataluña when comparing before and after the policy intervention. We additionally observe that the mobility levels increased from before and after the policy intervention in Cataluña for Madrid. However, this increase has no relation to the policy in Cataluña. Figure 2 shows that the number of cases were falling in Madrid before Cataluña introduced the policy and thus mobility began to increase when the risk of contagion was falling in Madrid.(Since no one single region can act as a perfect control group for Cataluña due to varying differences between the policies, socio-demographic, population etc. we use all Autonomous Communities in our analysis and control groups).

Figure 3 shows a time series plot of the total number of trips for Cataluña and Madrid. The policy came into effect right in the centre of the time series and lasted until the end of the time series (shaded as yellow) thus we see a shift down in the number of trips for Cataluña after the introduction of the policy and it remained down for the duration of the policy. Contrasted with Madrid in which we see no shift downward, which is, as we would expect since Madrid did not introduce the same policy as Cataluña.

Figure 4 shows the mobility matrices for Cataluña and Madrid for each day for incoming trips into MITMA regions.(MITMA: Ministry of Transportation, Mobility and Urban Agenda). The darker colours represent higher mobility and the lighter regions lower mobility. The plot has been arranged to show MITMA regions with overall higher mobility on the right and MITMA regions with overall lower mobility on the left. There are distinct periods of higher and lower mobility, the higher mobility corresponds to weekdays and thus this mobility incorporates people travelling to and from work and the lighter periods correspond to weekends where people travel less. Additionally, there are other days of lower mobility. At point (A) in Fig. 4 there are 3 days of lower mobility, 2 of these days are a weekend and the 3rd day is a public holiday in Cataluña falling on a Friday, 2020-09-11 (Fiesta Nacional de Cataluña). The same region in the Madrid plot does not show this reduced mobility since the public holiday is only specific to Cataluña and thus not Madrid, therefore people in Madrid went to work on this day. There are other public holidays in this data, specific to Madrid which fell on Monday, 2020-11-01 (Fiesta de Todos los Santos) and Monday, 2020-11-09 (Fiesta de la Almudena) which are shown in the mobility matrix data as (C) and (D) respectively. Finally, there is a public holiday which is celebrated across the whole of Spain, on the 2020-10-12 (Fiesta Nacional de España) denoted as point (B). Therefore, mobility for this day was reduced in both Cataluña and Madrid along with other Autonomous Communities. The next sections report the main findings of this study.

### Linear regression

We first applied a series of linear regression models. Firstly, using all MITMA zones in Cataluña and then secondly, we aggregate the data in order to analyse the effect for the whole of Cataluña.

#### Linear regression across all MITMA zones (Cataluña)

Table 4 reports the OLS regression results for all MITMA regions in Cataluña. A more formal description of the model is left to “Linear regression”. Moreover, suppose we want to fit a model to estimate mobility, we can expect that there would be a shock at the point of the introduction of the policy. To capture this we include a dummy variable and the coefficient is our estimate of the effect of the policy (in this model − 15.4%). That is, there is a statistically significant drop of 15.4% in mobility on weekends whereas there is just a 3.9% drop in mobility during the weekdays. The significant drop on the weekends may suggest that people are socialising less and are remaining at home and that they do not substitute their socialising at bars and restaurants with other socialising activities such as going to the cinema, park etc. thus, We see a reduction in activities which imply the movement of people. We expect to see less of a drop during the weekdays than on weekends since people still need to go to work. However, the 3.9% drop during the weekdays may suggest that people are socialising less in bars and restaurants after work and are going straight home. After the policy impact, there appears to be a sustained drop in daily mobility of 6.9% after controlling for weekend effects and therefore the policy caused a shock to mobility and then levelled out, indicated by the trend of 0.1% afterwards. Therefore, using a regression model, we have aimed to quantify the drop in mobility as seen in the Cataluña panel of Fig. 3.

#### Linear regression aggregated MITMA zones (Cataluña)

In order to visualise and illustrate the previous regression results in a more intuitive way, We aggregate the MITMA regions for all of Cataluña into daily mobility totals and thus we have a single observation for each day for Cataluña. Figure 5 plots the regression fitted values for the incoming mobility type before and after the policy with and without a weekday control variable. We note that the level variable of interest for Panel (A) is not statistically significant but the level variable in Panel (B) is statistically significant at the 5% level with a coefficient of − 0.0840258 or − 8.40%. Overall, both models show a drop in the regression line suggesting that mobility decreased after the policy.

### Difference-in-differences

We next apply a difference-in-difference model in order to additionally quantify the effect on mobility after the policy of closing the bars and restaurants in Cataluña was introduced. A more formal description of the model is left to “Difference-in-differences (DiD)”. Firstly, we use Madrid as a control group in order to visualise the difference-in-difference model since Madrid did not introduce the same policy of closing the bars and restaurants as in Cataluña, reported in Fig. 6. Finally, we present the results using each autonomous community..

We applied the difference-in-difference model to the four different mobility types incoming, internal, outgoing and total and extended the control groups to each autonomous community in Spain. (Note: due to data handling issues, País Vasco and Castilla-La Mancha were omited.) Table 5 reports the difference-in-difference estimators for each mobility type and autonomous community. Interestingly, the internal mobility does not show statistically significant results for all but three CCAAs (i.e. the cells in the table are not coloured). Recall, that internal mobility corresponds to the movements of people within a given MITMA zone. One economic interpretation could be that since bars and restaurants were closed people chose not to travel as much to different districts to socialise. For internal mobility, people still went about their daily business closer to their home, i.e. continue to shop at the supermarket and go to the pharmacy etc. but they had less incentive to travel to different districts (or MITMA regions) to meet with friends and family (which may be the reason for the non-statistically significant results in the internal mobility column). This result can be further seen in Fig. 12 in the Appendix which plots a 14-day rolling moving average for 4 CCAA’s, the internal plot shows relatively flat lines for mobility, with Cataluña’s internal mobility only dropping slightly, whereas incoming and outgoing showed a much steeper drop for Cataluña relative to the other CCAA’s. Therefore, people still moved within their MITMA regions in order to go about their daily lives but after the policy people stopped migrating to other regions and therefore longer distance mobility habits changed.

### Bayesian structural time-series

Figure 7 shows the Bayesian structural time-series model in which the model uses Madrid’s mobility data in order to build a predictive model for Cataluña’s mobility. A more formal description of the model is left to “Linear regression”. The model is able to build a very predictive model during the training phase. The large spike downwards in the pointwise panel, at the date 2020-09-11 in the training phase, corresponds to La Diada Nacional de Catalunya a public holiday specific only to Cataluña and thus affects Cataluña mobility and not Madrid (Fig. 4 shows that on public holidays mobility is reduced.). Aside from this single day, the differences between the predictive model and the observed data lie in and around zero before the policy is implemented. After the introduction of the policy, these differences become negative except on two dates 2020-11-02 and 2020-11-09 which correspond to Día de todos los Santos and Virgen de la Almudena two public holidays specific to Madrid and not Cataluña.

We find that in absolute terms during the post-policy period, the average mobility in Cataluña was 12.39 million trips, in the absence of the policy the model expected an average of 14.19 million trips with a 95% confidence interval of (13.79, 14.58) million. The causal effect is $$12.39 - 14.19 = -1.8$$ million reduction in the number of trips in Cataluña with a 95% confidence interval (− 2.19, − 1.39) million. In relative terms, mobility reduced by − 13% with a 95% confidence interval (− 15%, − 10%) which suggests that this causal effect in the reduction in mobility is statistically significant with a posterior Bayesian one-sided tail-area probability of 0.001. This finding is consistent with the linear regression and difference-in-difference models presented earlier. Figure 7 reports the model for Cataluña and Madrid, Fig. 13 in the Appendix reports a case where the model did not work using Andalucia in place of Madrid as a control group. Finally, Table 6 shows the results for all CCAAs for the incoming mobility type, the internal, outgoing and total are left to the appendix. Tables 78 and 9 reports the tables for the Internal, Outgoing and Total mobility respectively.

### Mobility and COVID19

Thus far, this paper has shown that the policy has had a clear effect on the reduction of mobility in Cataluña. In this section we aim to assess the policies effect on daily COVID19 incidence, however, some comments are required.

Quantifying the policies impact on reductions in the number of new cases is more difficult than quantifying its impact on mobility. That is, mobility levels over time are roughly constant and predictable which allows us to build a strong counter-factual and thus when a policy shock has been implemented we can use this counter-factual in order to measure the real causal impact of that policy. Using new COVID19 case data presents more difficult problems since outbreaks are unpredictable and different regions experience fluctuations and peaks in COVID19 cases at different times, this renders the models used in this paper obsolete when applied to COVID19 case data. Consider Fig. 2 which plots the number of new cases over time since the start of the pandemic. There are three regions with high peaks, Madrid experienced its peak before that of Cataluña and would therefore not make a good counter-factual after the policy. Andalucía and Cataluña peaked during the same period however, both CCAAs introduced strict countermeasures to reduce the number of cases and both their number of new cases fell at the same time and therefore Andalucía would not make a suitable counter-factual either.

We compute the growth rate ratio in the number of cases for each CCAA as follows.

\begin{aligned} GR_{t} = \dfrac{log\left( \sum _{t-13}^{t}\dfrac{C_{i}}{14}\right) }{log\left( \sum _{t-20}^{t}\dfrac{C_{i}}{21}\right) } \end{aligned}
(5)

where $$C_{i}$$ is the number of cases for an autonomous community i at time t. The GR-ratio aims to smooth out the case incidence data by using a 14 and 21 day rolling average. From here the ratio between the two smoothed average incidence data is taken to try to capture the growth in the number of cases over time.

Figure 8 shows the growth rate ratio for the number of cases over time for all autonomous communities. The growth rate began to increase in the month leading up to when regional governments introduced different policies. The growth rate in Cataluña began to decrease after an initial 2–3 week lag once the policy came into effect. Figure 14 shows that the growth rate in the number of cases began to increase in December, before Christmas and when the policy was not enforced.

Figure 9 shows the same calculation as in Eq. (5) but applied to the mobility time series. The growth rate ratio for mobility began to increase from September for many CCAAs, this could be attributed to people returning from their second homes after the summer break.

We next anticipate that there is a lag between the movement of people and becoming infected with COVID19, due to the lag in symptoms, reporting etc. We firstly normalise the mobility data, fixed to the first week of October as follows in Eq. (6). The first week of October is the first week in our sample data. Moreover, the data is normalised such that, each Monday is normalised to the first Monday of October, each Tuesday is normalised to the first Tuesday of October and so on.

\begin{aligned} MR_{j}^{t} = \dfrac{\sum _{ij}V_{ij}^{t}}{\sum _{ij}V_{ij}^{t_{o}}} \end{aligned}
(6)

where $$t_{o}$$ corresponds to the mobility data for each corresponding weekday at the beginning of October. Next, we compute the Pearson correlation coefficients with a 95% confidence interval for lags 1:40 as shown in Fig. 10. We finally take the optimal lag of 21 and plot the scatter-plot between the growth rate ratio defined in Eq. (5) and the normalised mobility defined in Eq. (6). The results can be seen in Fig. 11. There is an association between increased mobility and an increase in the growth rate ratio.

## Conclusion

This paper quantifies the impact of mobility on the closing of bars and restaurants in Cataluña using a number of causal inference models. Overall we find that this policy reduced mobility in Cataluña, but it not only reduced mobility, it caused people to change the way they behave and respond to the policy, with trips across regions being affected more than trips within regions. This finding is significant since people did not substitute meeting friends and family at bars and restaurants with meeting friends and family in other locations, people simply stayed within their own MITMA region, reducing their overall mobility and changed the way in which people went about their daily business. The findings of this paper are 3-fold. (a) we quantify the impact of the policy of closing bars and restaurants down during a 5 week period on mobility. (b) we find that people changed their social behaviours in a direct response to the policy, reducing their mobility relatively more so on weekends than on weekdays, additionally, people changed their longer distance travel habits whilst leaving shorter distance travel habits relatively unchanged. (c) we find that there is some evidence that the policy slowed the growth rate of COVID19 incidence in Cataluña.