Segregation and the pandemic: The dynamics of daytime social diversity during COVID-19 in Greater Stockholm

In this study, we set out to understand how the changes in daily mobility of people during the first wave of the COVID-19 pandemic in spring 2020 influenced daytime spatial segregation. Rather than focusing on spatial separation, we approached this task from the perspective of daytime socio-spatial diversity – the degree to which people from socially different neighbourhoods share urban space during the day. By applying mobile phone data from Greater Stockholm, Sweden, the study examines weekly changes in 1) daytime social diversity across different types of neighbourhoods, and 2) population groups' exposure to diversity in their main daytime activity locations. Our findings show a decline in daytime diversity in neighbourhoods when the pandemic broke out in mid-March 2020. The decrease in diversity was marked in urban centres, and significantly different in neighbourhoods with different socio-economic and ethnic compositions. Moreover, the decrease in people's exposure to diversity in their daytime activity locations was even more profound and long-lasting. In particular, isolation from diversity increased more among residents of high-income majority neighbourhoods than of low-income minority neighbourhoods. We conclude that while some COVID-19-induced changes might have been temporary, the increased flexibility in where people work and live might ultimately reinforce both residential and daytime segregation.


Introduction
Spatial segregation is a dynamic phenomenon that changes across space and time. This is backed by a growing body of research showing how segregation levels change in line with the daily, monthly and seasonal rhythms of people's lives (Järv et al., 2015;Le Roux et al., 2017;Park & Kwan, 2018;Silm & Ahas, 2014). Within 24 h, people tend to be more segregated during the night when they are at home and spend time in their residential neighbourhood. During the day, on the other hand, people have usually higher chances to be surrounded by "different others", be it at work (Ellis et al., 2004;Marcińczak et al., 2015), during travel (Boterman & Musterd, 2016), or in free time (Toomet et al., 2015). The places that attract people from a range of residential neighbourhoods, and consequently provide opportunities for co-presence and inter-group interactions, are often urban centres and sub-centres with a high concentration of workplaces and commercial venues. Such places with high daytime social diversity (hereinafter also referred to as daytime diversity or diversity) are essential for mediating differences between people and mitigating the segregation they might experience residentially (Le Roux et al., 2017;Ö sth et al., 2018).
Besides the routine rhythms of everyday life, the dynamics of urban social life are influenced by societal disruptions. A vivid example of this has been the effects of the global COVID-19 pandemic and its mitigation strategies to slow virus spreading. In spring 2020, many societies around the world witnessed an unprecedentedly sudden decrease in people's spatial mobility and in-person interactionsa result of people's behavioural health precautions and compliance with official restrictions. From recommendations about working from home and maintaining social distancing, to strict curfews and lockdownsall these caused a drop in overall mobility Santamaria et al., 2020), fewer visits to workplaces and commercial venues (Trasberg & Cheshire, 2021;Willberg et al., 2021), and a decreased use of public transport (Marra et al., 2022).
While changes in people's mobility patterns during the COVID-19 pandemic are being well covered with a growing body of research (Huang et al., 2020;Santamaria et al., 2020;Toger et al., 2021), we still know little about the consequent impacts on socio-spatial diversity and segregation in cities. Yet, several studies have suggested that spatial separation between socioeconomic and ethnic groups might have increased, due to the fewer opportunities to come into contact during the day. For instance, it has been shown that neighbourhood isolation increased, as people travelled to other neighbourhoods less often, and especially to urban centres (Marlow et al., 2021;Trasberg & Cheshire, 2021;Willberg et al., 2021); the impact of the pandemic and its mitigation measures varied between population groups, e.g., workers in high-paid jobs were more likely to switch to remote work, while many people in low-paid jobs had to continue working on-site (Dingel & Neiman, 2020); and people who own or could afford to rent a second home moved out of the cities to the countryside (Willberg et al., 2021).
Based on the evidence to date, the implication is that the COVID-19 pandemic has led to a decline in the daytime co-presence of people from socially different neighbourhoods and thus has fostered spatial segregation in cities. We tested this hypothesis by studying spatio-temporal dynamics of daytime social diversity across neighbourhoods and its consequences for the population groups' exposure to diversity during the first wave of the COVID-19 pandemic in Greater Stockholm, Sweden. For this, we applied the activity space segregation approach to mobile phone data and population register data that enabled us to study both the pandemic-induced social dynamics "in places" and "for people" based on people's actual spatio-temporal presence during working hours. In particular, our research questions were: • How did daytime social diversity change during the first wave of COVID-19 in Greater Stockholm neighbourhoods, and how were the changes associated with neighbourhood characteristics? • How did people's daytime exposure to social diversity change, and how did it vary between residents of neighbourhoods with different socio-economic and ethnic compositions?
By building on the empirical evidence from Greater Stockholm, our broader aim was to draw attention to the importance of capturing sociospatial diversity and segregation as dynamic processes, sensitive to societal disruptions; and to demonstrate the importance of understanding these processes from the perspectives of both places and people. We argue that these aspects have important theory and policy implications to better understand and tackle spatial segregation and inequalities in cities.

Temporal variation of segregation
Within the last decade, research into spatial segregation has diversified considerably. Most importantly, instead of focussing on residential neighbourhoods solely, a growing body of research has examined segregation over people's various activity locations and mobility (Boterman & Musterd, 2016;Järv et al., 2015;Silm & Ahas, 2014). Moreover, researchers are increasingly striving to capture the dynamic nature of segregationhow the spatial separation between population groups changes over space and time. To comprehend and support these developments, various new conceptualisations of segregation have been put forward (Park & Kwan, 2018;Tammaru et al., 2021;Wong & Shaw, 2011). The most widely employed conceptualisation is the activity space approach to segregation, which "proposes that segregation is (re)produced across all locations that a person visits (for both social and asocial activities), and routes and areas the person travels through and around" (Müürisepp et al., 2022). Therefore, understanding activity space segregation implies studying individuals' spatio-temporal behaviour on one hand and the changing socio-spatial context around them, on the other hand.
Most studies that have analysed the temporal variation of segregation have focussed on people's routine rhythms of everyday life. When comparing different days of the week, Silm and Ahas (2014) found that segregation is lower during weekdays than over weekends. One possible explanation for this is that, during weekends, people tend to spend time with members of their own social group and/or practise leisure time activities close to their home (Kukk et al., 2019). During weekdays on the other hand, people's routine spatial behaviour is structured not only by their residential location but also by their workplaces and other regular activity locations. Often, these habitual daytime activity locations require people to travel to and spend time in neighbourhoods with various socio-spatial contexts (Jones & Pebley, 2014;Le Roux et al., 2017;Ö sth et al., 2018).
Studies on the temporal variation of segregation over the course of the day have emphasised the importance of workplaces as drivers of daytime social heterogenization in the city. In their study about the "social segregation around the clock" in the Paris region, Le Roux et al. (2017) found that the districts with a high concentration of jobs underwent considerable social diversification during the daythese areas attracted people from a range of backgrounds and residential neighbourhoods. This is supported by the findings from Medellin, Colombia  and from Sweden's metropolitan areas (Östh et al., 2018). Both studies found that people who travelled to (and stayed in) urban centres during the day had high exposure to residents from various types of neighbourhoods and were therefore able to mitigate their night-time segregation. In contrast, with their study from Atlanta, USA, Park and Kwan (2018) showed that racial minorities remained highly segregated over 24 h, since their home and work locations were geographically constrained.
Just as mixed residential neighbourhoods are important for integration, socially heterogeneous places during the day provide opportunities for mediating social differences and inter-group contacts. According to Blau (1977), inter-group contacts are more likely to occur when being exposed to high social diversity, i.e., to people with different background characteristics, whether visible or less-visible. Generally, exposure to diversity is considered to have positive effects by creating opportunities to learn about and interact with "different others", and thus contribute to people's integration, but also to social cohesion in society more broadly (Phillips et al., 2021). According to the social network theory (Granovetter, 1973), inter-group contacts as "weak social ties" are crucial for an individual's (immigrant's) opportunities to integrate into a community (of the majority group). However, some studies have pointed out that exposure to diversity might not translate into actual interactions and integration with other groups (Blokland & van Eijk, 2010), and socially and economically privileged groups may even avoid spaces of social difference (Atkinson & Flint, 2004). The latter is in line with a number of studies that show that people belonging to a higher social class remain the most segregated over the course of the day: they are not only residentially isolated, but also "cocoon" in other activity locations (Le Roux et al., 2017) and during travel (Boterman & Musterd, 2016).
Besides the routine rhythms of everyday life, people's spatiotemporal behaviour and resulting segregation experiences are affected by various non-habitual occasions, such as festivities and abrupt societal disruptions. The influences of such occasions on segregation remain understudied to date. One of the few exceptions is the study by Mooses et al. (2016), which found that during public and national holidays, the spatial separation between the two main ethno-linguistic groups in Estonia was higher than during regular days, but depended on the cultural and religious meaning of the holiday. The few studies on the impact of the COVID-19 pandemic on segregation show significant increase in the spatial separation between social groups (Li et al., 2022;Shin, 2022). For example, Shin (2022) found that the segregation of Chinese immigrants in Seoul, South Korea, both during the day and at night increased markedly at the beginning of the pandemic and even became more severe over time.

COVID-19 and (im)mobility inequalities
Although studies of the impact of the COVID-19 pandemic on spatial segregation have been limited in number, research on the COVID-19induced changes in human mobility suggests that spatial distance between population groups, primarily during the day, increased in the time of the pandemic.
A vast body of research has shown how the COVID-19 pandemic and its mitigation strategies resulted in an unprecedented decline in people's mobility internationally, regionally and within cities (Huang et al., 2020;Järv et al., 2021;Toger et al., 2021;Willberg et al., 2021). The decrease in daily mobilitycaused both by the behavioural health precautions and compliance with official restrictionswas reflected in individuals' smaller activity spaces and fewer destinations (Toger et al., 2021). A study by Marlow et al. (2021) shows the impact of such changes on the spatial integration of the 25 largest cities in USAsince people's activity spaces became geographically more constrained and centred within and around home neighbourhoods, neighbourhood isolation trended upward in 2020. Moreover, people's mobility to core urban centres with a high concentration of white-collar workplaces and premium shopping destinations declined significantly (Marlow et al., 2021;Romanillos et al., 2021), whereas the activity levels in suburban centres remained relatively high, at least in Greater London during the first wave of the pandemic (Trasberg & Cheshire, 2021).
However, the COVID-19 pandemic did not affect everyone's daily mobility equally but had a disproportionate influence on different population groups by revealing and reinforcing existing inequalities. Most evidently, the pandemic highlighted the disparities between socioeconomic groups. In contrast to many people with low socio-economic status, economically privileged people had more opportunities to isolate themselves. For instance, workers in high-paid jobs, such as in ICT and business services, were more likely to be able to switch to remote working (Dingel & Neiman, 2020), use a private car for self-transport and isolate in an uncrowded home (Florida et al., 2021), or even travel to a second home in the countryside (Willberg et al., 2021). These differences in people's opportunities to restrict everyday mobility and isolate during the COVID-19 pandemic are also visible when analysing the differences between socio-economic groups' mobility patterns. For example, a study by Lee et al. (2021) from England demonstrated that residents in high-income neighbourhoods were more likely to reduce their overall mobility compared to people from lower middle class and working class neighbourhoods.
The COVID-19 pandemic has had a disproportionate influence not only on the mobility of socio-economic groups, but also of ethnic groups. As various inequalities tend to intersect, immigrants (especially those with a non-Western background) have often frontline occupations with no opportunity to work from home, compounded by an overcrowded home environment and multigenerational households (Florida & Mellander, 2022). Such daily life settings make it difficult to restrict one's daily mobility and in-person interactions, which resulted in disproportionately high spread of COVID-19 in marginalised and immigrant-dense neighbourhoods in several countries (Credit, 2020;Sigurjónsdóttir et al., 2021). However, in contrast some studies have demonstrated the markedly higher isolation of some minority groups during the pandemic. For example, Marlow et al. (2021) found that poor Asian neighbourhoods became highly isolated in USA cities at the beginning of the pandemic. Similarly, Shin (2022) demonstrated that Chinese immigrants in Seoul, South Korea, experienced more severe and long-lasting segregation compared to other immigrant groups. This might be associated with the rise of the racial discrimination against Chinese people after the first COVID-19 case was confirmed in China (Gao & Liu, 2021).

Research framework
Our research framework for studying the changes in daytime sociospatial diversity and segregation during the COVID-19 pandemic relied on three conceptual pillars. First, we employed the activity space approach that enabled us to comprehend socio-spatial diversity and segregation as dynamic phenomena that are (re)produced as a result of people's spatial behaviour over the course of the day (see Section 2.1). Second, we focused on the whereabouts of people during the day, i.e., working hoursthe time with most opportunities for inter-group interactions (see Section 2.1). Third, we used a big data sourcemobile phone datathat provided us with information about the footprints of people in space and time, and therefore allowed us to investigate the actual daytime presence of people over several weeks.
Several big data sources, and in particular mobile phone data, have proven to be useful for capturing spatial footprints of people and revealing individual activity spaces, including activity locations such as home and work (Ahas et al., 2010). One of the strengths of mobile phone data is wide spatio-temporal and population coverage which allows researchers to draw conclusions at a city or country level, and even make comparisons between countries (Santamaria et al., 2020). Also, the data have relatively high spatio-temporal resolution which enables individuals' activity locations and mobility to be captured in time (Järv et al., 2015), and thereby reveal dynamic population distribution (Bergroth et al., 2022) and (structural) changes caused by disruptions such as the COVID-19 pandemic (Santamaria et al., 2020;Willberg et al., 2021). Mobile phone data have been successfully applied in segregation research, among other fields. A methodological review of activity space segregation research by Müürisepp et al. (2022) showed the value of mobile phone data in revealing the dynamic nature of segregation as well as in examining segregation simultaneously from the perspectives of places and people.
Instead of focussing on spatial separation, which is the dominant focus of segregation studies, we chose to examine daytime social diversity, or the degree to which social groups are co-present during the day, by implementing a method proposed by Holloway et al. (2012). Their standardised tract-specific diversity measure allowed us to move beyond the binary view of the "majority-minority divide" by taking a multi-group perspective and treating social groups equally. The measure classifies diversity based on standardized entropy scores and pre-defined threshold criteria to distinguish between neighbourhoods with low, moderate and high diversity levels. Thus, their approach allows meaningful comparisons in the compositional diversity of social groups in neighbourhoods over time. The feasibility of the diversity measure by Holloway et al. (2012) has been showcased in several recent studies on urban diversity and segregation, including in those making comparisons over time (Catney et al., 2021;Dmowska & Stepinski, 2022;Ellis et al., 2018). More details on our application of it are provided in Section 5.3 and Supplementary Material S5.
We analysed daytime social diversity from two perspectives: places and people. First, from the perspective of places, we examined how diverse are neighbourhoods during the day regarding the presence of people coming from socially different neighbourhoods within the study area. Second, from the perspective of people, we examined the level of social diversity that people are exposed to while being in the neighbourhood of their main daytime activity location (see Section 5.3 for further details).

Spatial segregation in Greater Stockholm
Sweden is well known for its social democratic welfare regime that relates to low levels of socio-economic inequality and spatial segregation. However, the disposable income Gini Index that has historically been low in Sweden compared to other OECD countries, has increased considerably during the last few decades. Within most of the municipalities in Greater Stockholm, both the average household income and the Gini Index are above the Nordic average (Andreasson et al., 2020). The growing income disparities have also manifested in urban spacesurprisingly, socio-economic residential segregation in Stockholm has increased to a level similar to the most segregated capital cities in Europe (Musterd et al., 2017). Yet, in one of the few studies that has examined the changes in urban segregation levels over 24 h, Ö sth et al. (2018) found that because of people's daily mobility, socio-economic segregation levels decrease in Stockholm during the day. In particular, the central parts of Stockholm become considerably more diverse during the day by attracting people from socio-economically different neighbourhoods.
Most of the segregation studies from Stockholm focus on the residential domain and either on ethnic or socio-economic dimensions, but recently intersectionality between ethnicity, income and age has also received attention. One of the most recent residential segregation studies from Greater Stockholm by Hedman et al. (2023) found that when looking at a single dimension, people of non-Western origin are the most segregated. However, when taking an intersectional view on segregation, people of non-Western origin remain the most segregated among low-and middle-income people, but over the past decade, Swedes have become the most segregated among high-income people. Hedman et al. (2023) concluded that the Swedes in the highest income group drive the change in residential segregation in Greater Stockholm.

COVID-19 in Greater Stockholm
To tackle the COVID-19 outbreak, Sweden adopted a "softer" policy from other countries by relying on recommendations and appealing to personal responsibility rather than imposing strict restrictions (Florida & Mellander, 2022). The early cases were confirmed after many Swedes returned from their winter holidays in central Europe in late February (Sigurjónsdóttir et al., 2021). From March, both the number of infection cases and need for intensive care started to increase (Supplementary Material S1). When the WHO declared the COVID-19 pandemic on 11 March, Sweden had already witnessed community transmission and the strategy focused on mitigation rather than isolation. During that week, a restriction on mass gatherings was introduced, and recommendations to work from home, and avoid crowded places, public transport and unnecessary travelling were released. Schools however remained open, yet secondary schools and universities switched to distance learning. By the end of April, Stockholm had more than 40% of all cases in Sweden due to rapid spreading of the virus (Sigurjónsdóttir et al., 2021).
Overall, people both reduced their mobility and changed their spatial behaviourthey changed their mode of transport and had more confined individual activity spaces with fewer activity locations and daily trips (Almlöf et al., 2021;Toger et al., 2021). While the decrease in overall mobility showed no differences by income and country of origin, at least at the beginning of the pandemic in March (Dahlberg et al., 2020), the use of public transport declined dramatically (Transportstyrelsen, 2021), and the ridership regarding socio-economic and demographic structure changed (Almlöf et al., 2021). Sigurjónsdóttir et al. (2021) highlighted that the number of infections was disproportionately high in densely populated low-income areas and linked it to residents' lower opportunity to work from home and avoid public transport.

Material and methods
The study builds on mobile phone data and population register data from Greater Stockholm at 1 km × 1 km statistical grid cell level. Greater Stockholm (Storstockholm in Swedish) is the biggest metropolitan area in Swedenit covers the capital of Stockholm and its surrounding area defined by Stockholm County (Fig. 1A). We studied the period from January to May 2020 to cover the first wave of the COVID-19 pandemic. Our research population comprised mobile phone users, i.e., the customers of one mobile network operator (MNO).

Presence of people from mobile phone data
To capture the whereabouts of people in space and time, we used a dataset from one of the main MNOs in Sweden holding between 10 and 20% of the market share. The dataset consists of so-called network probing data that include records from all interactions of switched-on phones in the network (calls, messages, antenna handovers, data transfer). The records are stored in 5-min time slots with the spatial accuracy of a network antenna (see Ö sth et al., 2018 for further details). Each phone user in the dataset has a randomly assigned anonymized user ID attribute for each day that enables phone users' locations to be linked over 24 h, whereas personal privacy can be preserved over the study period. The raw data are securely curated at the Department of Human Geography at Uppsala University, Sweden, and the use of data is approved by the Uppsala Ethics Committee.
We optimised the computing resources needed to process the massive raw dataset by selecting Thursdays as markers to study the changes in daytime diversity during the study period. According to Toger et al. (2020), Thursday is the most "regular" weekday with the lowest variance in human mobility behaviour, compared to other days of the week. We selected Thursday, 16 January, as the pre-COVID baseline date (hereinafter also referred to as baseline), and 13 Thursdays from 5 March to 28 May to represent the COVID-19 pandemic period.
The processing of data included various steps (see the workflow in Supplementary Material S2). First, we calculated the most probable residential (night-time) location and the main daytime activity location for each mobile phone user for each study date. The residential location was assigned to a network antenna where a person stayed the longest regarding 5-min intervals during the night from 3:00 to 6:00. According to time use surveys, this period has the highest probability for people to be at home (e.g., Bergroth et al., 2022). The main daytime activity location on a workday indicates the other main anchor point of a person's daily life. Depending on the life stage, this may refer to a work location, an educational location, home or a day centre (Ahas et al., 2010). The main daytime activity location was assigned to a network antenna at which a person stayed the longest regarding 5-min intervals during the time frames from 10:00 to 12:00 and from 13:00 to 15:00.
Next, we limited the research population according to our study area. We selected the customers of the MNO whose residential location and main daytime activity location were assigned to the network antennas which are located within our study area (Fig. 1A). The size of the research population varied between study dates given that the presence of people is dynamic over time. On average, there were ca. 229,000 phone users on a study date, while the minimum size was ca. 200,000 (21 May) and the maximum size was ca. 242,000 (28 May).
Finally, while the spatial accuracy of mobile phone data varies geographically due to the MNO network structure (Järv et al., 2017;Ogulenko et al., 2022), we interpolated our data to grid cells to mitigate phone users' night-time and daytime location uncertainty. For this, we used a simple areal weighting interpolation approach to assign each record located in a network antenna coverage area to a conservative 1 km × 1 km grid cell layer. The whole study area is divided into 9575 grid cells, however, 7898 grid cells had mobile phone data attached during the study period (Fig. 1A). To validate the distribution of our study population, we calculated Pearson correlation coefficients between mobile phone users' main locations at night and Statistics Sweden's official residential population data (2019) at the 1 km × 1 km grid cell level. The correlation was strong and stable over all study dates (ρ = 0.80-0.81; except ρ = 0.78 on 30 April), and coincides with previous studies (e.g., Järv et al., 2017). Thus, we are confident that the mobile phone data used represented the overall population at large well.
Given that the daytime spatial presence of people is dynamic over time, the number of grid cells with mobile phone data varied between study dates with a slight seasonal trend of people being more dispersed in late spring (Fig. 1B). In addition, three study dates were not regular Thursdays: Easter Thursday (9 April), Walpurgis Night (30 April) and Ascension Day (21 May). The latter is a public holiday in Sweden, and the former two precede a public holiday. During these days, people's spatial behaviour differs from the one of their regular working days and they are more prone to visit sparsely populated areas.

Categorizing neighbourhoods and research population
We used three background characteristics to study the differences between neighbourhoods and between population groups. First, we categorized neighbourhoods (i.e., 1 km × 1 km grid cells) based on the following characteristics: settlement structure, socio-economic composition and ethnic composition. Second, since mobile phone data do not contain any background information about phone users, we characterized our research population based on the neighbourhood characteristics of their residential (night-time) locations (see Section 5.1).
We derived the settlement structure variable from the land use data of the Swedish Mapping, Cadastral and Land Registration Authority (Lantmäteriet, 2022), and assigned the dominant settlement characteristic to each grid cell (see Supplementary Material S3 for more details). We differentiated between four settlement types: urban centre, urban, village and rural ( Fig. 2A).
To characterise neighbourhoods regarding inhabitants' socioeconomic and ethnic background variables, we aggregated individual level register data of Statistics Sweden using the bespoke k-nearest neighbour approach (for the method description, see Ö sth et al., 2015). We used the k = 500 threshold, i.e., the characteristics of the 500  individuals residing the closest to a grid cell centroid were considered. This is the optimal threshold to denote an approximate neighbourhood in Greater Stockholm that on average equals to the spatial radius of ca 400 m and relates to the idea of a walkable neighbourhood (see Ö sth & Türk, 2020).
Regarding the socio-economic composition, we divided neighbourhoods according to the proportion of wealthy and poor residents into three classeshigh-, middle-and low-income neighbourhoods (Fig. 2B) -by following the methodology used by Eurostat (2022) and applied in earlier segregation studies in Sweden (Östh et al., 2018). Regarding the ethnic composition, we categorized neighbourhoods based on the proportion of visible minorities (born in Africa, Latin America and Asia, but excluding Russia) into three classesmajority, mixed and minority neighbourhoods (Fig. 2C) -by following the criteria used in an earlier segregation study in Sweden by Hedman et al. (2021). The detailed description of the neighbourhood categorization methodology is presented in Supplementary Material S4.

Analysing daytime diversity and segregation
For analysing daytime social diversity, we first divided our research population into nine intersectional groups by combining the socioeconomic and ethnic characteristics of one's residential neighbourhood (e.g., people from low-income minority neighbourhoods; see Section 5.2). We then calculated a daytime diversity level for each neighbourhood (i.e., 1 km × 1 km grid cell) for each study date, based on the distribution of the main daytime activity locations of these nine intersectional groups.
We calculated the level of daytime social diversity in each grid cell by using the diversity measure proposed by Holloway et al. (2012) (see Section 3 for our rationale behind the measure selection). The measure is based on the scaled (i.e., standardized tract-specific) entropy index and pre-defined threshold criteria to distinguish between grid cells with low, moderate and high diversity levels. First, we calculated the scaled entropy index E i to assign entropy values to each spatial unit i ranging from 0 to 1 (Equation (1)), where p ij indicates a studied population group's j proportion of the total population in a spatial unit i and n is the number of population groups studied. A spatial unit has the minimum value of 0 when people from only one studied population group j of all studied population groups n are presentthus indicating no diversity or complete segregation. A spatial unit i has the maximum value of 1 when all studied population groups n are present, and they are equally dividedthus indicating a maximum diversity or no segregation.
Second, we applied further criteria to distinguish between low, moderate and high diversity levels. In addition to the scaled entropy value, the additional threshold criteria hinged on the proportion of dominant group(s) of the population present in a spatial unit. This enabled us to overcome the potential bias, i.e., the overestimation of the diversity level due to the influence of dominant group(s), in the relative entropy index calculation, and ensured that studied population groups are treated in a balanced way. Overall, low diversity level indicates an isolated (segregated) social setting with one or two dominant group(s), and high diversity level indicates an integrated social setting with the balanced presence of different social groups without any dominating. More details on our application of the diversity measure and chosen threshold criteria are provided in Supplementary Material S5.
From the perspective of places, we calculated the proportions of grid cells (neighbourhoods) by daytime diversity level for each study date and descriptively examined the differences from the baseline date, 16 January (Section 6.1). The analysis included only populated grid cells and therefore the total number of grid cells varied between study dates (Fig. 1B). To detect the days with significantly unusual proportions of grid cells by diversity level within the study period, we analytically examined the variability of the proportions of grid cells using the median-based modified Z-score method (Iglewicz & Hoaglin, 1993). This enabled us to detect a significantly unusual (outlier) day from the study dates (n = 14). In the case of each diversity level, we calculated the modified Z-score M i for each study date i as M i = 0.6745 (x i −x) /MAD, where x denotes the median of the proportion of neighbourhoods with given diversity level. MAD denotes the median of absolute deviation about the median and is defined as MAD = median(|x i −x|). We considered a day, i.e., proportion of neighbourhoods belonging to given diversity level, as significantly unusual from other days when a Z-score lied beyond two standard deviations of the median (-2σ > M i > +2σ), i. e., at 95% confidence level.
We repeated the descriptive analysis separately for different neighbourhood types (Section 6.2), while focusing on the changes in high and low diversity levels and leaving out the changes in moderate diversity levels. We used binary logistic regression modelling to study the statistical relationship between neighbourhood characteristics and the changes in a neighbourhood daytime diversity level over time. For each date, we created two dependent binary variables compared to the baseline date: a neighbourhood daytime diversity level 1) increased and 2) decreased (1 = yes; 0 = no). The grid cells with no diversity level were excluded from the model of the respective date. In total, we analysed 26 models and used average marginal effects (AME) to explain statistically significant differences in the changes in the daytime diversity level between the neighbourhood characteristics (p < 0.05).
From the perspective of people, we examined how people from different types of neighbourhoods were exposed to different diversity levels during the day, based on their main daytime activity locations at the grid cell level and the daytime diversity levels in respective grid cells. We examined how people's daytime exposure to diversity changed, and how it varied between population groups who were defined according to their residential neighbourhood characteristics (see Section 5.2). Therefore, we calculated the distribution of our research population by their exposed daytime diversity level for each study date, and measured the relative difference from the baseline date. In the descriptive analysis by people's background characteristics, we focused on the changes in their exposure to high and low diversity levels (Section 6.3). Finally, we detected the days on which a significantly unusual proportion of the research population was exposed to a certain daytime diversity level using the median-based modified Z-score method. We repeated the analysis by focusing on different population groups. Here, x refers to a proportion of each population group.

Changes in daytime diversity in Greater Stockholm
Before the COVID-19 pandemic in January 2020, most of the neighbourhoods in Greater Stockholm had low (68% of grid cells) or moderate (26%) social diversity during the day (Table 1). Only a fraction of grid cells (6%) had high diversity, and these were more concentrated in urban centres (Fig. 3A).
During the first wave of the COVID-19 pandemic in spring 2020, daytime diversity in neighbourhoods changed with a clear spatial pattern. For example, on 26 March, the diversity level in many neighbourhoods decreased compared to the baseline date (16 January), whereas outside urban areas, the diversity level of some neighbourhoods also increased (Fig. 3B). On 30 April, Walpurgis Night, the diversity level remained lower from the baseline in fewer neighbourhoods than on 26 March, while neighbourhoods outside urban centres had significant increase in social diversity (Fig. 3C).
From the temporal perspective, the proportions of grid cells by daytime diversity level varied considerably over the first wave of the COVID-19 pandemic compared to the baseline (Fig. 4). At the beginning of the pandemic in mid-March, there was a clear decrease in the proportion of neighbourhoods with high (− 23% to − 30%) and moderate (− 14% to − 16%) diversity levels compared to the baseline. Instead, there was an increase in the proportion of neighbourhoods with a low diversity level (+8%). From April, the diversity levels in neighbourhoods slowly recovered, as the proportions returned closer to the baseline. In contrast, a significant increase in the proportions of neighbourhoods with high (+16%) and moderate (+8%) diversity levels compared to the baseline occurred on a festive day of Walpurgis Night (30 April), when diversity levels increased outside urban centres ( Fig. 4;  Fig. 3C). Interestingly, there were almost as few neighbourhoods with a high diversity level on Ascension Day (21 May), a public holiday in Sweden, as during the first wave of COVID-19 pandemic in mid-March. The modified Z-score analysis confirmed that the distribution of neighbourhoods by diversity level was significantly different on three days compared to the whole study period (including the baseline date): 19 March, 26 March and 30 April (see Supplementary Material S6).

Diversity changes in different types of neighbourhoods
The weekly changes in daytime diversity levels compared to the baseline varied between neighbourhoods with different settlement structures, and socio-economic and ethnic compositions (Table 1). In addition to the descriptive analysis, we used binary logistic regression modelling to reveal whether the changes in daytime diversity levels in grid cells were statistically different by neighbourhood characteristics, and to what extent. The results of the models that explain the decrease in diversity levels during the first wave of the COVID-19 pandemic are presented in Table 2 (see Supplementary Material S7 for the models explaining the increase in diversity levels).
The largest differences in the decrease in daytime diversity levels were found between the neighbourhoods with different income and ethnic compositions from mid-March (Table 2). The regression analysis showed that compared to low-income neighbourhoods, high-income neighbourhoods witnessed a decrease in the diversity level more frequently -9-15 percentage points (11.0 on average). From Fig. 5A we see that although the proportion of neighbourhoods with a high diversity level decreased the most in low-income areas, proportionally more high-income neighbourhoods became low-diversity neighbourhoods, compared to low-and middle-income neighbourhoods.
Minority neighbourhoods witnessed a decrease in the daytime diversity level more frequently than majority neighbourhoods during the COVID-19 pandemic -7-16 percentage points (10.3 on average) ( Table 2). Fig. 5B shows that the proportion of neighbourhoods with a high diversity level decreased markedly in both minority and mixed   areas, but proportionally far more minority neighbourhoods, than majority and mixed neighbourhoods, became low-diversity neighbourhoods. Furthermore, majority neighbourhoods became proportionally more highly diverse on the two non-typical festive days: Easter Thursday (9 April) and Walpurgis Night (30 April). On the contrary, the proportion of the minority neighbourhoods with the high diversity level decreased significantly on Ascension Day (21 May). The differences in the decrease in daytime diversity levels between neighbourhoods with different settlement structures were less evident (Table 2). However, neighbourhoods in urban centres witnessed a decrease in the diversity level more frequently than other urban settlements (3-6 percentage points). Vice versa, urban centres had an increase in the diversity level less frequently than other urban settlements -5-11 percentage points (Supplementary Material S7). Fig. 6 shows that at the beginning of the COVID-19 pandemic, the proportion of high diversity neighbourhoods in urban centres decreased 40%-48% from the baseline and the proportion of low diversity neighbourhoods increased 30%-38% from the baseline. In fact, the diversity levels in urban centres remained low and did not recover even by the end of the study period. The proportional decrease of diversity in other urban neighbourhoods was less extreme and recovered from the first week of April (Fig. 6).
Our results show that daytime diversity in villages was influenced by non-typical festive days. Interestingly, the proportion of neighbourhoods with high diversity increased in villages at the beginning of March just before the pandemic fully arrived. However, the biggest proportional increase in high diversity emerged in villages on Walpurgis Night, 30 April (Fig. 6). The results from the binary logistic regression analysis support this by showing that, on Walpurgis Night, village neighbourhoods witnessed an increase in the diversity level more frequently than urban settlements (Supplementary Material S7). Moreover, villages witnessed a decrease in the diversity level less frequently than urban settlements on Easter Thursday (9 April) and Ascension Day (21 May) ( Table 2). This could indicate that people left urban areas for recreational activities or to go to their holiday homes in villages and rural areas, and thus social diversity increased in these areas.

Changes in people's daytime exposure to diversity
To understand how many people were affected by the changes in the daytime diversity in Greater Stockholm, we analysed people's exposure Table 2 Average marginal effects from the binary logistic regression models by study date revealing the extent to which the decrease in the daytime diversity level in neighbourhoods (grid cells) was different from the baseline date (16.01.2020) between neighbourhood types at the level of p < 0.05.

Date
Average marginal effects (AME) compared to the reference group   to social diversity in their actual daytime activity locations. Before the pandemic (16 January), almost half of the research population was exposed to moderate social diversity (48%), while 40% were exposed to low diversity and 12% were exposed to high diversity (Table 3). There were some variations in these proportions between population groups. Compared to residents of mixed and majority neighbourhoods, residents of minority neighbourhoods were proportionally more exposed to high diversity and less to low diversity in their main daytime activity locations. At the same time, residents of low-income neighbourhoods were more exposed to low diversity and less to high diversity, compared to residents of middle-and high-income neighbourhoods (Table 3).
Overall, at the beginning of the COVID-19 pandemic in mid-March, people's daytime exposure to social diversity decreased promptlythe proportion of people who were exposed to low diversity during the day increased over 70% from the baseline (Fig. 7). Simultaneously, the proportion of people who were exposed to high and moderate diversity decreased over 60% and 50%, respectively. Despite the weak recovering trend in people's exposure to diversity over the study period, the proportion of people exposed to low diversity was still 46% higher than the baseline at the end of May. The modified Z-score analysis confirmed that the relative distribution of people by their exposed diversity levels were significantly different from to the baseline after 12 March (see Supplementary Material S8).
People's exposure to their surrounding diversity during the day varied by their background characteristics (Fig. 8). The modified Z-score analysis indicated that the proportion of people with exposure to different diversity levels was significantly different from the baseline after 12 March regardless of the socio-economic composition of their residential neighbourhoods (the only exception was the exposure to low and moderate diversity by residents of middle-income neighbourhoods). The difference was slightly more prominent among residents of highincome neighbourhoods compared to residents of low-income neighbourhoods (see Supplementary Material S8). Fig. 8A confirms this by showing that in mid-March, the exposure to low social diversity increased more (32 percentage points, on average) among people from high-income neighbourhoods than among people from low-income neighbourhoods. Only on Ascension Day (21 May) was the increase in the exposure to low social diversity almost equal for all income groups.
There is a different pattern when comparing people from ethnically different neighbourhoods. The exposure to low social diversity increased and to high social diversity decreased similarly for people residing in neighbourhoods with different ethnic compositions. The modified Zscore analysis showed that the relative distribution of people with exposure to different diversity levels was significantly different from the baseline after 12 March regardless of the ethnic composition of people's residential neighbourhoods (except the exposure to moderate diversity by residents of majority neighbourhoods). However, there is an indication from both the descriptive (Fig. 8B) and modified Z-score analysis (Supplementary Material S8) that the decrease in the exposure to high diversity was more prominent among people from minority neighbourhoods, compared to those from majority neighbourhoods.
Further, we see drastic differences in the changes in daytime exposure to social diversity when considering intersectionality, i.e., people's both ethnic and socio-economic residential neighbourhood characteristics (Fig. 9). To illustrate this, we compared residents of high-income majority neighbourhoods and residents of low-income minority neighbourhoods. While the exposure to high social diversity decreased similarly for these two groups compared to the baseline, they had significantly different patterns regarding the increased exposure to low social diversitythe increase reached over 150% for people from highincome majority neighbourhoods, whereas it was only around 50% for people from low-income minority neighbourhoods. The modified Zscore analysis confirmed that the relative distribution of people with exposure to different diversity levels was significantly different from the baseline after 12 March for both intersectional groups, but the difference was more prominent among people from high-income majority neighbourhoods (see Supplementary Material S8).
Finally, when comparing people who reside in neighbourhoods with different settlement structures, the exposure to diversity decreased the most among people residing in urban centres and other urban settlements (Fig. 10). The exposure to diversity changed the least, compared to the baseline, for people living in neighbourhoods located in villages and rural areas, and was more influenced by non-typical festive days. The modified Z-score analysis indicated that the relative distribution of people from 1) urban centres exposed to high, moderate and low diversity levels, 2) other urban neighbourhoods exposed to high and low diversity levels, and 3) villages and rural areas exposed to low diversity level was significantly different from the baseline after 12 March (see Supplementary Material S8). Furthermore, on Easter Thursday (9 April) and Ascension Day (21 May), the relative distribution of people from villages and rural areas exposed to low diversity was significantly different from the rest of the days.

Discussion and conclusions
This is one of the first studies to examine how people's mobility changes during the first wave of the COVID-19 pandemic in spring 2020 influenced daytime spatial segregation in neighbourhoods. Instead of focusing on spatial separation, we approached this task from the  Fig. 7. Weekly changes in the proportion of people exposed to different levels of social diversity (high, moderate, low) during the day compared to the baseline date (16.01.2020).
perspective of daytime social diversity, or the degree to which people from socio-economically and ethnically different neighbourhoods are co-present during the day. By combining mobile phone and population register data from Greater Stockholm, Sweden, we studied weekly changes in 1) daytime social diversity across neighbourhoods, and 2) population groups' exposure to diversity in their main daytime activity locations. Before presenting our key findings and their policy implications, some methodological aspects need to be acknowledged. First, although we relied on data from one of the main mobile network operators in Sweden and the data had a strong correlation with register data (see Section 5.1), some uncertainties regarding the population coverage remain (e.g., the age-related differences in phone use). However, these uncertainties remained constant over time, and therefore should not have much effect on our main results on the weekly changes in daytime diversity. Second, as our data did not include phone users' background characteristics, we defined population groups according to the characteristics of phone users' residential neighbourhoods. To be clear about this, we stressed throughout the paper that we examined residents of ethnically and socio-economically different neighbourhoods, and not ethnic and socio-economic groups, per se. Third, our study covered a limited period from pre-COVID times and captured only short-term changes in daytime diversity during the first wave of the COVID-19 pandemic. Therefore, a follow-up study would be valuable for capturing long-term changes.

COVID-19 increased daytime segregation
First, our results confirm that abrupt societal disruptions, such as the COVID-19 pandemic, had a significant impact on the daytime social diversity in the city. Even in Greater Stockholm, where the policy responses to COVID-19 were "softer" compared to other cities (Florida & Mellander, 2022;Sigurjónsdóttir et al., 2021), the diversity in neighbourhoods decreased significantly when the pandemic broke out in mid-March. This indicates the decrease in the number of places (neighbourhoods) that facilitated daytime co-presence between people from socially different neighbourhoods. One apparent reason for this Fig. 8. Weekly changes in the proportion of people exposed to different levels of social diversity during the day, compared to the baseline date (16.01.2020), by the socio-economic (A) and ethnic (B) composition of their residential neighbourhoods. Fig. 9. Weekly changes in the proportion of people exposed to different levels of social diversity during the day, compared to the baseline date (16.01.2020), for two intersectional groups: 1) residents of low-income minority neighbourhoods, and 2) residents of high-income majority neighbourhoods. Fig. 10. Weekly changes in the proportion of people exposed to different levels of social diversity during the day, compared to the baseline date (16.01.2020), for people residing in neighbourhoods with different settlement structures. was people's reduced daily mobility across neighbourhoodsalthough Sweden did not impose a mandatory lockdown and most services were kept running, many restricted their spatial behaviour (Dahlberg et al., 2020) and the number of places they visited (Toger et al., 2021). However, after the first shock, the daytime diversity in neighbourhoods slowly recovered from April.
The analysis of the relationship between neighbourhood characteristics and the changes in a neighbourhood daytime diversity level showed that diversity decreased more in high-income neighbourhoods compared to low-income neighbourhoods, and in minority neighbourhoods compared to majority neighbourhoods. This coincides with earlier studies showing higher decrease in activity levels in affluent neighbourhoods (Trasberg & Cheshire, 2021). At the same time, when comparing areas with different settlement structures, daytime diversity decreased the most in core urban centres with high concentration of workplaces and commercial venues. This could be related to the calls for working from home at the beginning of the COVID-19 pandemic (Sigurjónsdóttir et al., 2021), and to the decline of population in city centres shown in earlier studies (Marlow et al., 2021;Willberg et al., 2021). Also, in the Greater Stockholm context, many low-income neighbourhoods are located outside urban areas and they became the destinations for those who decided to move out of the city to their second home.
Second, changes in daytime diversity levels in neighbourhoods do not automatically reflect the changes in people's exposure to (and experience of) diversity. With this study we demonstrated this by examining the perspectives of both places and people. Our findings show that although the diversity levels in neighbourhoods almost recovered in April, the decrease in people's exposure to daytime diversity was more drastic and remained low for the whole spring. That is, people remained isolated with restricted opportunities for interactions with people from socially different neighbourhoods. The discrepancy between the changes in daytime diversity levels in neighbourhoods and people's exposure to diversity illustrates vividly the importance of understanding segregation from the perspectives of both places and people (Kwan, 2009;Müürisepp et al., 2022) the former indicates the changes in urban space, whereas the latter shows how people are affected by the contextual changes around them.
Third, our findings show some variation between social groups regarding the decrease in the exposure to diversity during the day. The change was slightly more prominent for residents of high-income neighbourhoods than of low-income neighbourhoods, and for residents of minority neighbourhoods than of majority neighbourhoods. The latter is in line with the study by Shin (2022), which showed that the segregation of Chinese immigrants in Seoul, South Korea, both during the day and at night increased after the COVID-19 outbreak. However, the inter-group differences in Greater Stockholm were most profound when considering intersectionalitythe exposure to daytime diversity decreased markedly more among residents of high-income majority neighbourhoods than among residents of low-income minority neighbourhoods.
Our results on the increased daytime isolation of people from highincome majority neighbourhoods indicate that socially disruptive events can amplify the tendency of socially and economically privileged groups to "cocoon in homogeneous residential, workplace and mobility spaces" (Boterman & Musterd, 2016). The Swedish "trust-based" COVID-19 policy stemming from recommendations and individual responsibility provided a suitable setting for this. While people were encouraged to work from home, many services, and not only the essential ones, were kept running. Although such an approach surely had advantages, it also highlighted inequalities between white-collar knowledge workers and in-person service workers. In particular, while white-collar workers were able to isolate in often socially homogeneous residential spaces, many service workers had to continue working on-site with higher exposure to social diversity (Sigurjónsdóttir et al., 2021). Moreover, without restrictions on mobility, people with access to second homes were able to "escape" to the countryside. In contrast, this was discouraged in other countries (Willberg et al., 2021). Ultimately, comparative studies in different policy contexts would be useful to shed more light on the impact of various COVID-19 strategies on spatial segregation.

Policies need to address segregation in all its facets
Our findings relate to existing trends in urban diversity and segregation research, and in society at large that are important to recognize in policymaking. First, understanding the dynamic nature of segregation over time needs to be acknowledged to tackle the spatial separation of social groups in various activity locations in normal, but also in disruptive times. Understanding the influence of abrupt societal disruptions on socio-economic and ethnic, but also on intersectional groups, might reveal inequalities that otherwise remain hidden.
Second, the importance of capturing segregation from different perspectiveshow segregation unveils "in places" and "for people" in terms of their exposure to othershas been stressed by segregation scholars (Kwan, 2009;Müürisepp et al., 2022) and empirically demonstrated in this study. Ultimately, understanding segregation in all of its facets is a prerequisite for better targeted integration policies, such as housing and land use mix to reinforce social diversity in places; and education, employment and community engagement to increase people's exposure to diversity (van Ham et al., 2018).
Third, the digital transition and "working from home" trend, which was sped up by the COVID-19 pandemic, has highlighted the importance of residential neighbourhoods as the anchors of people's daily life. Therefore, to support the integration of minorities and to facilitate social cohesion more generally, tackling growing residential segregation at multiple scales (Hedman et al., 2023;Musterd et al., 2017) becomes increasingly crucial. While the importance of diverse core urban centres decreases in the daily lives of people, residential areas and nearby sub-centres should provide opportunities for inter-group contacts.
Finally, as the flexibility in where people work has increased since the COVID-19 pandemic, the closeness to workplace has become less important factor in people's residential choices (Florida et al., 2021). Moreover, multi-local living has become an increasingly common lifestyle as people have more freedom to choose the most convenient place to reside temporarily, for example during the COVID-19 pandemic Willberg et al., 2021). However, these changes are led by people with higher socio-economic status, which might ultimately reinforce the spatial separation between social groupsthe trend that was partially revealed in this study. A follow-up study covering a longer period could provide valuable insights into this proposition.

Declarations of interest
None.