Understanding Population Decline Trajectories in Spain using Sequence Analysis

Population decline is a key contemporary demography challenge. Previous work has measured the national extent of population decline, and we know that it is more acute in Japan and Eastern Europe and is set to accelerate across many industrialized countries. Yet, little is known about the population trajectories leading to current trends of depopulation and their underpinning demographic and contextual factors. To address this gap, we aim to identify and characterize the different trajectories of depopulation in Spain from 2000 to 2020 at the small area level using sequence analysis, spatial autocorrelation analysis, decomposition techniques, and multinomial logistic modeling. We show that while Spain recorded an overall 17.2% national population growth between 2000 and 2020, 63% of municipalities experienced depopulation. We identify six trajectories of population decline, with a well-de ﬁ ned northwest-south divide. These trajectories include mostly rural municipalities, but also certain small-and medium-sized cities. Natural decline comprises the main demographic component underpinning differences in the extent of depopulation across trajectories, and international migration plays an important role in explaining transitions to decline since the ﬁ nancial crisis of 2008. Small and old populations, and, to a lesser extent, remoteness from cities are key features characterizing areas of high decline.


Introduction
Population decline is a major contemporary demographic challenge across many industrialized countries.Population decline has major impacts on societies and their economies, putting pressure on tax collection, the sustainability of the public pension systems and the provision of services, including health and education (Lee 2011).Population decline also erodes the national labor market, diminishing local workforces and creates skills gaps (Bloom, Canning, and Fink 2010).
It also opens divisive social debates about immigration as a potential solution to offset population decline (Lee 2011; Collantes et al. 2014).Europe is the key epicenter of population decline (Bandrés and Azón 2021).The European Union is currently promoting measures to mitigate depopulation (European Parliament 2021), and the Spanish Government announced plans to invest 10,000 million euros to combat depopulation, more than 10% of the European Union's COVID-19 recovery plan (Moncloa 2021).
At present, a total of 19 European countries are experiencing depopulation, the majority confined to Eastern and Southern Europe (UN 2019; Eurostat 2020).We know that population decline does not occur uniformly across space.Depopulation is more common in peripheral rural areas (Collantes and Pinilla 2011;Johnson and Lichter 2019) and increasingly occurring in cities, particularly in countries undergoing national population decline (Wolff and Wiechmann 2018).Previous work has thus provided valuable insights into the contemporary geography of population decline and its potential consequences.However, less is known about the different long-term trajectories of population change leading to depopulation, how they differ in space and their underpinning factors (Newsham and Rowe 2022).
An evolutionary approach is needed for understanding long-term trajectories of population change.Such an approach needs to capture the timing, extent, duration, and relative sequencing of population changes over a long-time frame (Patias, Rowe, and Arribas-Bel 2021).Conceptualizing population changes within a trajectory framework can enhance our understanding of path dependence patterns.It can provide valuable insights into how past conditions have contributed to laying out the foundations for current population outcomes.An evolutionary approach also offers an opportunity to recognize the diversity and complexity of population changes leading to contemporary patterns of depopulation.Despite a recognized need for such an approach, conceptual, methodological, and data challenges have constrained its application to understanding depopulation.Only in the last two decades, large longitudinal spatial data and methodological approaches have become available to measure and analyze trajectories of population change over a long period of time at a subnational scale.
To address this gap, we aim to analyze the long-term trajectories of depopulation across subnational areas in Spain.Specifically, we seek to identify distinctive trajectories of population decline, their geographic distribution and determine key demographic and contextual factors underpinning these trajectories.Drawing on administrative annual population register data from 2000 to 2020, we apply sequence analysis to identify trajectories of depopulation across a total of 8,131 Spanish municipalities.We then use a spatial autocorrelation analysis to determine if there is spatial association amongst trajectories and decomposition methods to identify the relative contribution of natural change, internal and international net-migration to shaping the identified trajectories of population change.Additionally, we employ multinomial logistic regression modeling to identify key contextual factors characterizing these trajectories.
Spain is selected as a case study as it is projected to start experiencing population decline from 2022 under the most probable United Nations (UN) population projection scenario.Population decline is already underway in various areas across the country, particularly in rural areas in the northwest and the interior of Spain.These rural areas have recorded depopulation since the mid-19th century, primarily due to internal migration of young people to large cities (Camarero 1993;Collantes and Pinilla 2011).This population movement has resulted in declining fertility and increased aging from the 1960s to the present (Del Rey and Cebrán 2010), accentuating existing patterns of population decline in rural areas (Collantes and Pinilla 2011).Spreading geographically, recent work has additionally revealed a growing number of small-and medium-sized cities undergoing population decline following the 2008 global financial crisis (Gil-Alonso et al. 2021;González-Leonardo 2021).
This article is structured as follows: First, we discuss the proximate demographic drivers of population decline before reviewing the underpinning contextual drivers of depopulation and the key historical trends of population change Spain.Second, we describe the data and methodology used for the analysis.Third, we present our results.We first analyze the contemporary patterns of population change in Spain at the subnational level before identifying a distinctive set of depopulation trajectories and studying their spatial distribution.We then analyze the key demographic and contextual factors underpinning differences across these clusters.Finally, we present the conclusions and discussion of our results.

Proximate demographic drivers of population decline
Population change is determined by the combined effects of fertility, mortality, and migration.At an aggregate level, countries in the second demographic transition show subreplacement fertility and increasing life expectancies (Ezeh, Bongaarts, and Mberu 2012).Such trends have resulted in an aging of societies and demographic momentum as fertility can no longer sustain population growth (Coleman and Rowthorn 2011).In this context, immigration has become the primary factor of population change (Lee 2011; Newsham and Rowe 2021).Across Europe, divergent trajectories of population change exist, with growth occurring in North and West countries while decline is prevalent in Eastern and in a growing number of Southern European countries (UN 2019; Eurostat 2020).While subtle differences in low fertility extremities offer some explanation for these differences, patterns of international migration are primarily responsible (Sobotka and Fürnkranz-Prskawetz 2020).
Enabled through the Schengen agreement of free movement of people, international migration has resulted in differentiated demographic impacts across the European Union.It has acted to increase the population of Western European countries (Kahanec and Pytliková 2017), while simultaneously contributing to population declines in Eastern nations (Sobotka and Fürnkranz-Prskawetz 2020).Southern European countries have also recorded inflows of international migrants, with immigration being highly dependent on economic factors (Arango 2015;Domingo and Cabré 2015).As a consequence, these countries tend to experience temporary population decline during economic downturns (González-Leonardo 2021).
While trends of national depopulation are relatively recent in European countries, subnational population decline is not a modern phenomenon.It has been recorded across Europe at various points in history (Collantes and Pinilla 2011;UN 2019).Internal migration has been influential in determining patterns of decline, particularly through rural to urban migration (Collantes and Pinilla 2011;Rowe et al. 2019).Rural-to-urban migration has historically generated population growth in urban agglomerations and depopulation in rural areas, especially during periods of rapid urbanization (Johnson and Lichter 2019;Reynaud et al. 2020).Certain cities in peripheral regions have also experienced population decline as a result of out-migration and increasing aging levels (Turok and Mykhnenko 2007;Kabisch and Haase 2011;Wolff and Wiechmann 2018).
The spatial patterns and age selectivity of internal migration tend to accentuate population losses over time.Migrants typically have a young age profile and are attracted to large urban centers for employment, educational and entertainment opportunities, particularly from rural areas, towns and small cities (Florida 2002;Rodríguez-Pose and Ketterer 2012).Hence, places undergoing depopulation tend to experience sustained aging in their compositional population structures (Rodríguez-Vignoli and Rowe 2018) and the loss of anticipated fertility outcomes (Del Rey and Cebrán 2010; Franklin 2020), resulting in further future population declines (Sobotka and Fürnkranz-Prskawetz 2020).

Contextual drivers of depopulation
Shaping the effects of the proximate determinants of population change is a range of contextual factors.At the subnational level, these contextual factors reflect local population, social, geographic, and economic structures.The size and age structure of the local population are key in determining population outcomes.Areas with small and old populations are closely associated with patterns of depopulation as loss of young populations accelerates aging and future population decline (Recaño 2017).The share of foreign-born population also influences population change, with concentrations of immigrant populations associated with population growth, producing a reinforcing effect through networks as established immigrant settlements attract new immigrant populations (Patias, Rowe, and Arribas-Bel 2021).Immigrant settlements also tend to stimulate population growth by fostering fertility outcomes (Bayona-i-Carrasco and Gil-Alonso 2013).
Geographical factors also influence population outcomes.Areas in the close proximity to large urban centers tend to expand as urban areas experience population growth (Casado-Díaz, Martínez-Bernabéu, and Rowe 2017).In contrast, areas in remote locations, with high altitude and limited accessibility are less likely to experience population spill-overs (Johnson and Lichter 2019;Gurría-Gascón and Nieto-Masot 2020).Population size determines the radius of urban influence on surrounding areas with population growth spilling over to neighboring areas (Degado-Viñas 2019; Reynaud et al. 2020).Such spill-overs are less likely to occur around small-and medium-sized cities (Degado-Viñas 2019).
Economic factors also play a major role in defining the direction of population change.More dynamic, vibrant, and diverse local economies are more likely to retent and attract young individuals and therefore promoting future population growth (Florida 2002;Rodríguez-Pose and Ketterer 2012), whereas less dynamic labor markets experience a rapid decay of young populations (Soja 2000).On the other hand, population decline has been associated with agricultural activities, with young people leaving rural areas in the pursuit of educational and employment opportunities (Faggian, Corcoran, and Rowe 2017;González-Leonardo, López-Gay, and Esteve 2022).The availability of housing is also a factor that may influence population change.Increases in housing supply may attract new settlers, especially into the housing rental market, stimulating local population growth, while a shortage of supply and high pricing can trigger an exit from certain residential areas (Mulder 2006).
Thus, existing work has progressed our understanding of depopulation, identifying the extent and spatial patterns of population decline.This work has, however, been descriptive in nature, and relied on national scale analysis adopting a static approach comparing two points in time.Less is known about the different trajectories of population change and contextual factors underpinning contemporary trends of depopulation from an evolutionary perspective.This is crucial as present population trends are not only the result of current dynamics, but also of a cumulative historical process (Franklin 2020).

Spain case study: A long history of subnational population decline
Since the year 2000, Spain has experienced a significant population growth of 6.8 million people, from 40.5 to 47.3 million, by 2020.However, this trend was not linear.Rapid growth was observed until 2008 where the global financial crisis triggered its deceleration and subsequent decline from 2012 to 2015 before resuming growth from 2016.
Observed population growth has been driven by international migration, with more than seven million immigrants arriving to the country between 2000 and 2008 (Arango 2015).Immigrants contributed to increase national population growth and elevate fertility since migrants are typically young people of childbearing age and tend to have higher fertility levels than the native population (Del Rey and Grande 2015;González-Ferrer et al. 2017).Following the global financial crisis of 2008, negative rates of international migration were recorded, between −37 K and −251 K from 2010 to 2014.Concurrently, natural change declined due to decreasing fertility rates and increasing population aging, recording accelerating negative rates from −0.4‰ in 2015 to −1.22‰ in 2019.Since 2015, population decline has been reversed due to a new rise in immigration, observing a positive net migration of 453 K in 2019, as the Spanish economy rebounded after a long period of economic depression (López-Gay, Andújar-Llosa, and Salvati 2020).
Despite an overall trend of national population growth during the new millennium, Spain has recorded subnational patterns of population decline, particularly in rural areas in the northwest of Spain (Castile and León, Galicia, Asturias) and provinces eastern Madrid (Guadalajara and Cuenca) (Collantes and Pinilla 2011;Delgado Urrecho, 2018).However, subnational depopulation is not a new phenomenon in Spain.From 1850 to 1970, rural depopulation was observed in several rural areas across the country due to high levels of internal out-migration which intensified during a period of late and rapid industrialization in the 1960s, especially in the above-mentioned territories (Collantes and Pinilla 2011).Despite decreasing internal out-migration since the 1970s, the continuing outflow of young people has triggered a sustained fall in fertility leading to an endemic pattern of rural depopulation (Camarero 1993;Del Rey and Cebrán 2010).
International migration has however contributed to mitigate depopulation in some regions of the country (Collantes et al. 2014).Immigrants tend to settle in main urban agglomerations and, to a lesser extent, in small and medium cities or specific agricultural and tourism employment centers in rural areas of the Mediterranean, south and north-east of Spain (Bayona-i-Carrasco and Gil-Alonso 2013).Spanish internal migration patterns have also resulted in suburbanization, with population growth observed around cities and rural areas in their close proximity, particularly surrounding the major urban agglomerations (López-Gay 2008;Susino and Duque 2013;Collantes et al. 2014).At the same time, rural areas in the north-west, distant from large cities and with traditional industries, such as agriculture and livestock farming, have recorded population losses due to negative natural change and net internal migration (Collantes and Pinilla 2011;Molinero 2019).
Taken together, existing work offers an overview of the main trends of population change and the role of fertility, internal and international migration in shaping these trends.Yet, this does not provide an evolutionary view to identify distinctive long-term trajectories of subnational depopulation, or explain how the evolving trends of fertility, mortality, internal and international migration have contributed to shape local trends of population decline across Spain.

Data and method
We developed a five-stage methodology to identify long-term trajectories of population decline and analyze their underlying factors (Fig. 1).First, we calculated the extent of population change between January 1, 2000 and January 1, 2020 for individual municipalities to select areas experiencing population decline.Second, we used sequence analysis to identify trajectories of population decline across Spanish municipalities.Third, we explored the geographical distribution and spatial autocorrelation between trajectories.Fourth, we quantify the contribution of natural change, net internal and international migration to shaping these trajectories.Fifth, we implemented a multinomial logistic regression model to examine the underlying contextual factors associated with the identified set of trajectories.Next, we describe each of these five stages.

Data
We drew upon annual population register data from the Instituto Nacional de Estadística (INE) for a total of 8,131 Spanish municipalities from the period 1 January 2000 to 1 January 2020.Boundary changes over time have affected municipal geographies.To mitigate the impact of these changes and ensure a temporally consistent spatial framework, we used an "update to contemporary zones" approach (Rowe 2017) by adapting the municipal boundaries from 2000 to 2019 to the base of 2020 (see Goerlich et al. 2015).

Stage 1
We computed the overall percentage rate of population change between 2000 and 2020 for individual municipalities and by settlement typology.To define the settlement typology, we classified municipalities within urban areas as core cities and suburbs using official definitions of the Spanish Atlas Estadístico de las Áreas Urbanas of the Ministerio de Transportes, Movilidad y Agenda Urbana (MITMA).For municipalities not included in any urban areas, we classified units with over 10k inhabitants as towns, and areas smaller than 10k as rural areas (Collantes and Pinilla 2011).
Step 2 We identified a total of 5,106 municipalities that experienced population decline between 2000 and 2020.We focus our analysis on these municipalities only as this enables better distinction between distinct trajectories of depopulation.We applied sequence analysis to identify distinctive trajectories of population decline across Spanish municipalities.We then compare trajectories through the application of Ward's hierarchical clustering procedure, defining a typology of Spanish subnational population decline trajectories.Sequence analysis enables the identification of similar longitudinal trajectories of population decline based on categorical data capturing differences in the ordering, timing, magnitude and pace of population decline.Dynamic time warping represents an alternative tool for the identification of systematic trajectories in the data and can be applied to continuous data.Yet, sequence analysis is a more established and tested approach in geographical analysis (e.g.Delmelle 2016; Patias, Rowe, and Arribas-Bel 2021), and hence we implemented this approach.
Sequence analysis requires data in a longitudinal structure and categorical formatting.To apply our population register data, we used the annual percentage rate of change for each municipality to distinguish between seven mutually exclusive classes of population change: high decline (<−3%), decline (−3% to −1.5%), moderate decline (−1.5% to −0.5%), stable (−0.5% to 0.5%), moderate growth (0.5%-1.5%), growth (1.5%-3%) and high growth (>3%).For the analysis, we used a three-year smoothing of the rates to avoid our classification being impacted by random yearly variability in small spatial units.To define our population classes, we carefully assessed the distribution of annual population changes, particularly the lower end representing population decline.Examining the full distribution of annual population decline across all years in our sample, we considered population declines over two SDs from the mean to be extreme and concluded that declines over 3% were unusual and therefore set our lower limit.Then we considered concentration of population changes around the mean (−0.28) as stable changes and divided the remaining data into two equal intervals, defining our decline (−3% to −1.5%) and moderate decline (−1,5% to −0.5%) categories.The trajectories of population decline are then represented by the sequential ordering of these categorical classes.
To identify similar trajectories of population decline, we are first required to assess the similarity between each sequence.This is a function of the number of edits required to make sequences identical.Such edits are either insertion/deletion (indel) or substitution operations that incur a cost if performed.Sequences are more dissimilar when the cost to transform one into another is greater.Various dissimilarity metrics can be used to compute sequence similarity (Studer and Ritschard. 2014).We apply a metric known as Dynamic Hamming Distance as it enables us to consider the year-to-year transition rates between each of our seven classes of population change and thus more accurately capture the timing of transitions between these population states (Lesnard 2010).The resulting metric is a time-dependent substitution cost matrix which is used to quantify the similarity across individual sequences.A matrix of sequence dissimilarity is computed and used in a cluster analysis to identify similar trajectories of population decline.We used the Ward hierarchical ascending cluster algorithm (Ward 1963) to group similar trajectories.Our results are robust to other clustering methodologies, namely K-medoids (Kaufman and Rousseeuw 2009), though Ward's method was favored due to its simplicity and reduced heterogeneity between groupings.To select the optimal number of groups, we empirically assessed a range of cluster solutions, considering the Point Biserial Correlation, Average Silhouette Width, and Hubert's Somers' D, deciding on a six-cluster solution.

Stage 3
We mapped the trajectories of depopulation to explore their geographical distribution.We then analyzed the patterns of spatial autocorrelation between municipalities based on our identified set of trajectories.We assessed whether trajectories of a given type are more likely to be neighbored by trajectories of a specific type.For example, we examined if municipalities experiencing trajectories of Consistent High Decline are more likely to be neighbors of municipalities following trajectories of Increasing High Decline.Given the categorical nature of data identifying six trajectories of population decline, we used the join count statistic for binary cases proposed by Cliff and Ord (1981) to measure the degree of spatial correlation between these trajectories.To this end, we used a rank order of neighborhoods and considered order 2 neighbors.The join count statistic assesses the co-occurrence of trajectories in space.Intuitively, positive spatial autocorrelation can thus be identified if municipalities following a given trajectory of depopulation are neighboring municipalities experiencing the same or other trajectory.Formally, spatial autocorrelation occurs when the number of join occurrences is significantly higher than expected by chance (Cliff and Ord 1981).Finally, we created an index of spatial autocorrelation as a rate between the number of neighbors from the join count and that from the random distribution (see Table S1 in Appendix S1) and visualized our results in a heatmap.

Step 4
We then used register annual fields of births, deaths, and migrations from the INE to analyze the demographic components underpinning differences across the set of identified depopulation trajectories.Specifically, we explored the contribution of natural growth, net internal migration and net international migration to the annual rates of population change between 1 January, 2002 and 31 December, 2019, as we are now analyzing events and flows -See equation 1 in Appendix S1.We sourced data from the Movimiento Natural de la Población to analyze births and deaths, and from the Estadística de Variaciones Residenciales (EVR) for internal and international migrations.We analyzed data starting in 2002 because this is the first year that emigration data were collected.Data for municipalities with populations of less than 10k inhabitants are not openly available in the EVR.However, we have the full data thanks to a data sharing agreement with the INE.

Step 5
We estimated a multinomial logistic model to identify a set of contextual factors characterizing our trajectories of population decline and assess their differences.A multicategorical variable indicating trajectory type was used as the dependent variable and modeled as a function of a set of demographic, geographic, and economic contextual factors: population size, over-aging, proportion of young adults, proportion of foreign-born, population in the capital city, distance to core cities, altitude, proportion of nonfarming jobs and proportion of housing rentals (Tables S2 and S3 in the Appendix S1 describe the set of covariates included in our model).We consider municipalities experiencing population growth as a benchmark to identify the contextual factors associated with depopulation.The model thus assesses the variables predicting the probability of an area transitioning through one of our identified depopulation trajectories (see equation 2 in Appendix S1).Correlation coefficients are reported in Fig. S1 in Appendix S1.All the continuous variables were standardized, subtracting the mean and dividing by two SDs, following Gelman (2008).

Results
This section first presents an overview of the overall patterns of population change across municipalities in Spain before describing the identified set of trajectories of population decline.Next, we analyze their geographical distribution, then discuss the contribution of natural change, internal and international migration to shaping these trajectories, and finally identify the key set of contextual factors underpinning these depopulation trends.

Population change during the XXI century
As indicated, the Spanish national population increased from 40.5 in 2000 to 47.3 million inhabitants in 2020.However, this growth was spatially uneven (Fig. 2).Overall, population growth was recorded in suburbs (34%), towns (22.6%), core cities (11.6%) and rural areas (1.7%), though the majority of municipalities (5,106 of 8,131) experienced population decline.In these areas, population loss totaled 12.2%.Depopulation was prominent in rural areas, occurring in 4,993 of 7,038 units and totaling a 18.4% population loss.Incidences of depopulation were also identified in 15 of 79 core cities, 45 of 662 suburbs and 53 of 352 towns, declining by 4.9%, 10.2% and 6.6%, respectively.
Fig. 2 reveals distinct spatial patterns of population change across Spanish municipalities.High rates of population growth are typically concentrated in chief urban agglomerations, namely Madrid and Barcelona, and in large-and medium-sized urban areas of the Mediterranean, south and northeast: Valencia, Alicante, Seville, Murcia, Bilbao, and Zaragoza.Population growth is also observed in coastal towns in the Mediterranean and Basque Country, as well as in neighboring rural municipalities of large urban areas, mostly in those close to Madrid, where population growth expands to the southern neighboring provinces of Guadalajara and Toledo.In small and medium urban areas in the north-west of the country (e.g., in the regions of Castile and León and Galicia), moderate population growth rates are observed in suburban municipalities, and depopulation in some core cities.
Population decline is abundant across Spanish rural municipalities but varies in extent.High decline (>30%) is ubiquitous in the north-west (e.g. the provinces of León, Zamora, Salamanca, Soria, Palencia), and across northern provinces of Lugo, Ourense and Asturias.This widespread, high decline also extends to rural areas of bordering provinces of Madrid, namely Ávila, Cuenca, Guadalajara and Segovia, as well as to Teruel and the south of Zaragoza.In most of the provinces of Castile-La Mancha and Extremadura, located south of Madrid, instances of high decline are scarce in villages, with medium and moderate declines prevailing.Southern regions display a distinct spatial pattern of moderate decline in inland rural municipalities and population growth in coast town.In the northeast (e.g., Navarra, Huesca or Lerida), moderate decline in rural areas is mixed with certain sectors displaying population growth.

Identifying population decline trajectories during the 21st century
These differentiated patterns of decline reveal spatial variations in the extent of population decline but may also signal differences in the evolution of local population change leading to these outcomes (Fig. 3).To assess differences in the evolution of population change, we applied sequence analysis and identified six representative trajectories of population decline.Fig. 3 displays these trajectories with colors encoding different states of population change.The top panel presents index plots.Reading horizontally, each line in these plots represents a municipality transition through different population states over time.The second panel displays distribution plots.These plots reveal the proportion of municipalities in each population state in individual years.The third panel shows mean time plots.These plots reveal the overall average number of years in each population state.We next describe each trajectory: Consistent High Decline (29.4%).This trajectory depicts no clear transition between states of population change but rather a fluctuation between population states representing higher order decline, namely high decline and decline.This trajectory therefore represents a consistent and intense population decline with areas declining by a total of 36.5% in the past 20 years.Given this, areas grouped in this trajectory are likely already experiencing adverse consequences of decline.This trajectory primarily concerns rural municipalities and accounts for the highest share of areas in decline (29.4%) and the highest total population loss, highlighting the magnitude and severity of rural depopulation in Spain.
Increasing High Decline (11.1%).Areas in this trajectory are defined by a trajectory of rapidly escalating population decline after the economic crisis of 2008, in contrast to Consistent High Decline where municipalities do not show a clear transition between population states.Particularly, transitions from moderate decline to decline and decline to high decline are recognized.Again, this trajectory largely concerns rural municipalities and accounts for 11.1%   of all declining areas.In total, these areas have observed a significant population loss of 30.9%, 5.6% lower than the trajectory Consistent High Decline.Consistent Decline (19%).Similar to Consistent High Decline, but with relatively lower rates of depopulation, this trajectory concerns fluctuations between lower order states of decline, including moderate decline and decline.Areas grouped in this trajectory are characterized by consistent, long-standing population declines and are thus also likely to have experienced issues relating to the sizeable reduction in population (28.5%).Though mainly concerning rural areas, this trajectory contains one sub-urban area and two towns.
Increasing Decline (19%).This trajectory describes a process of escalating population decline with areas transitioning from states of moderate decline to decline.A proportion of these areas experienced a brief period of moderate population growth before recording decline.Nonetheless, areas in this trajectory have declined by a total of 17.1% since 2000.This trajectory also concerns some towns and suburban areas, albeit only a very small number.
Increasing Moderate Decline (12.6%).This trajectory depicts a transition from stability to moderate decline since 2008 and captures the onset of population decline in these areas.As a result, total population loss amounts to 6.2%, the lowest of all the trajectories.This trajectory relates to population decline occurring in nonrural areas, including 15 of 79 core cities, some suburbs and towns.Yet, rural areas are also prevalent in this trajectory.
Growth to Decline (9.1%).This trajectory captures two distinct processes of population change (i.e.growth and decline) and includes all states of population change at near equal occupancy durations.In the first half of the period analyzed, population growth is the dominant direction of population change, though a sudden and extreme shift takes place following 2008-2009 toward high decline, resulting in a total population loss of 16.9% over the duration of the period.Exclusively concerning rural areas, this transition represents the volatility of population change dynamics in the context of rural Spain.

Geographical distribution and spatial autocorrelation between trajectories
Next, we seek to better understand the spatial dynamics of these trajectories.As described in the Method Section, we mapped our trajectories and measured the spatial autocorrelation using a join count statistic.Mapping our trajectories and considering the results of spatial autocorrelation, Fig. 4 reveals well-defined spatial patterns (northwest-south divide).High levels of positive spatial autocorrelation exist for the trajectory Increasing Moderate Decline in the south with a statistic of 3.07 which indicates a co-occurrence higher than by change (i.e. a value of 1).Intuitively, this result indicates that these trajectories tend to cluster in space.Positive spatial autocorrelation is also observed for Consistent High Decline in the northwest and provinces eastern Madrid (1.67) and for areas transitioning from Growth to Decline in provinces southern Madrid (1.56).Other trajectories also show moderate patterns of spatial association (i.e.values <1.5), such as Increasing High Decline and Consistent Decline in the northwest and eastern Madrid and Increasing Decline in the south.
First, a concentration of Consistent High Decline, Consistent Decline and Increasing High Decline trajectories are present in most rural areas of northwestern provinces of Spain (those in the region of Castile and León) and eastern Madrid (Guadalajara, Cuenca and Teruel), the municipalities with the highest overall population lost over the XXI century -generally more than 30% (Fig. 2).In these areas, trajectories of Consistent High Decline are prevalent at bordering regions of Portugal, and among provinces of northern, western and eastern Madrid, with a positive spatial autocorrelation of 1.67.Although with lower values, positive spatial association between municipalities with Increasing High Decline also exist (1.48), as well as for areas experiencing Consistent Decline (1.25) and between trajectories Consistent High Decline and Increasing High Decline (1.21).In addition to these trajectories in rural areas, some core cities in the northwest of Spain show Increasing Moderate Decline.
A second pattern is spatial clustering of rural municipalities that experienced a transition from Growth to High Decline in southern and eastern provinces of Madrid (spatial autocorrelation of 1.56): center of Guadalajara, south of Toledo and north-west of Cuenca.These municipalities present an overall population change below −17% (Fig. 2).We can relate this transition to the expansion of the metropolitan area of Madrid before the 2008 financial crisis.A third pattern is observed in the southern half of Spain, where Increasing Moderate Decline trajectories dominate in rural municipalities, and population declined by about 6% (Fig. 2).This trajectory shows the highest level of spatial autocorrelation (3.07), and is mixed with Increasing Decline (spatial autocorrelation of 1.36 between both trajectories, and 1.29 for areas comprised within the latter) in certain sectors (e.g., Cáceres, south of Ciudad Real, west of Albacete and Granada).A fourth pattern comprises a few enclaves across Spain with different trajectories of decline within some provinces where population growth is the main pattern (e.g., in the interior of some north-east provinces (Navarra, Huesca, Lerida) and in the hinterland of the Mediterranean regions), being Increasing Moderate Decline or Increasing Decline the most common trajectories of depopulation and displaying moderate levels of overall population decline over the XXI century (Fig. 2).

Demographic drivers of population decline
Local differences in the interactions between fertility, mortality internal and international migration may have resulted in the distinctive depopulation trajectories observed in Fig. 3  Net internal migration has also contributed to population decline across trajectories, though to a lesser extent than natural change.It explains differences in the extent of depopulation levels across trajectories.Large negative net internal migration balances accentuate declines in population.These exacerbating effects are particularly notable in Increasing High Decline and Growth to Decline trajectories, undergoing periods of accelerated population decline since 2012 due to increasing losses thought internal migration, and persistent in Consistent High Decline, Consistent Decline and Increasing Decline trajectories, as rates of internal migration are consistent over time.The contributions of internal migration are less prominent in Increasing Moderate Decline trajectories, reflected in marginal population losses and decreasing over time.
Figure 6.Multinomial model (coefficients) characterizing differences across trajectories of population decline.Note: Growth is using as the reference category; results are reported with a 95% CI and are sorted in ascending order according to coefficients for Constant High Decline; see Table S2 for descriptive statistics, Fig. S1 for correlation matrices between variables and Table S4 for coefficients, significance and CI.Source: Compiled by authors using data from the INE.
The impact of international migration on population change appears to differ from that of natural change and internal migration.Net balances in international migration have operated to mitigate population losses or even generate growth during particular periods.Positive net international migration balances consistently contributed to population growth across areas in all six trajectories before the global financial crisis.However, the impacts of these positive balances were unequal across trajectories, reflecting the capacity of areas to attract immigrants, and explaining why some trajectories show transitions and others consistent patterns of depopulation.Areas characterized by a Growth to Decline trajectory had a greater capacity to attract immigrants prior to 2008, followed by the trajectories Increasing High Decline, Increasing Decline, and Increasing Moderate Decline.Areas undergoing persistent trajectories of decline, Consistent High Decline and Consistent Decline, seem to be less attractive settlement locations for immigrants.

Contextual drivers of population decline
We extend our analysis to explore a set of contextual factors underpinning our six trajectories of population decline.To this end, we estimated a multinomial regression model using the probability of an area to follow a particular depopulation trajectory as the function of a set of demographic, geographic and economic factors.We used population growth as the reference category for our dependent variable.Regression coefficients are thus interpreted in relation to this baseline category.Fig. 6 and Table S4 display the results of our model.The results revealed that population size plays a prominent role in explaining variations across depopulation trajectories in Spain.For all trajectories, except Increasing Moderate Decline, coefficients for population size are the largest and significantly lower than in areas experiencing population growth (i.e., the baseline category).This indicates that population decline is more likely to occur in areas with smaller population size.Coefficients for Consistent High Decline and Increasing High Decline trajectories are the largest suggesting that municipalities with fewer inhabitants tend to experience high rates of depopulation.
The results identify over-aging as a strong predictor of depopulation.Statistically significant, positive and large coefficients for over-aging indicate that the probability of embarking on a trajectory of population decline is greater for municipalities with old population structures, relative to a trajectory of population growth.The effects of over-aging are particularly prominent for trajectories of Consistent High Decline, Increasing High Decline, Consistent Decline and Growth to Decline.These results also indicate that areas experiencing these trajectories tend to have older populations and may also explain the high contribution of negative natural change to population decline, as mortality rates are likely high.An inverse effect is observed for the proportion of young adults, suggesting that areas with substantial young adult populations are less likely to follow a trajectory of population decline.The effect of young adult populations is particularly pronounced for areas experiencing trajectories Consistent High Decline, Increasing High Decline, and Consistent Decline.Inversely these results may signal the influence of low fertility in areas with a low concentration of young adult populations, leading to negative rates of natural change.
Established immigration settlements tend to be correlated with a reduced likelihood of experiencing depopulation.Negative coefficients for the percentage of foreign-born indicates that areas with low foreign-born shares are less likely to experience population growth and more likely to experience depopulation, except in the trajectory Growth to Decline, where there is a greater share of foreign-born than in other trajectories of population decline.Regarding the differences between depopulation trajectories, the results vary slightly from those observed in the previous section.This is due to the introduction of other variables in the model, mainly the proportion of young adults and over-aging.
Accessibility to cities also plays a role in increasing the probability of undergoing a trajectory of population decline.Moderately large, positive coefficients for areas located over 40 km away from core cities points to a consistently uniform higher probability of experiencing depopulation than growth, particularly among trajectories with high rates of depopulation.This thus reveals that remote areas are more likely to experience population decline than urban areas and rural municipalities closer to major urban centers.To a lesser extent, altitude also appears to be a distinguishing factor determining different pathways of depopulation.While there are positive coefficients for altitude in trajectories Consistent High Decline, Increasing High Decline and Growth to Decline, this variable is negatively correlated with places undergoing trajectories of Increasing Moderate Decline.
Contextual factors population size in the capital city, proportion of nonfarming jobs and proportion of housing rental appear to be less prominent across depopulation trajectories.Negative coefficients for population size in the capital city and nonfarming jobs suggest a higher probability to follow a pathway of depopulation than growth for municipalities with a smaller population size in their capital city and a higher proportion of agricultural jobs.This result is consistent across all our depopulation trajectories.Conversely, this indicates that these municipalities are more likely to experience depopulation, but the above-mentioned variables do not help to explain different trajectories of population decline.While areas with greater shares of housing rentals are less likely to embark on a trajectory of Consistent High Decline, this variable does not seem to be an attribute differentiating depopulation from growth trajectories.

Discussion and conclusion
Despite national population growth, subnational population decline has been widespread across Spain.We analyzed these areas to explore representative trajectories of population decline, their geographical distribution and identify their key underpinning demographic causes and contextual factors.Our findings expand existing knowledge on depopulation by evidencing that, while population decline is more prevalent in rural areas, it also occurs across the rural-urban continuum, specifically in 18.9% of core cities, 6.8% of suburbs and 15.1% of towns.
We present evidence showing that municipalities in Spain have followed well-defined pathways of population decline, distinguishing six distinct patterns in terms of incidence, timing, pace and sequence of population change.Consistent High Decline and Consistent Decline emerged as the most common depopulation trajectories, accounting for 29.4% and 19% of all depopulating municipalities in Spain and reflect the widespread prevalence, long-standing and extent of population decline in rural areas.Broadly, the other four trajectories Increasing High Decline (11.1%),Increasing Decline (19%), Increasing Moderate Decline (12.6%), and Growth to Decline (9.1%) capture differences in the acceleration in the intensity of population decline following the global financial crisis of 2008.The first three trajectories include municipalities with transitions from population stability, moderate growth, or moderate decline to different intensities of depopulation, while the latter displays a sudden change between significant population growth rates and high intensities of decline.Our six trajectories include mostly rural areas, but also certain small-and medium-sized cities experiencing Increasing Moderate Decline.
Mapping these trajectories revealed well-defined spatial patterns, with contrasting trajectories of population decline between northwestern and southern Spain.Trajectories encoding consistent levels high decline and decline and accelerated patterns of high intensities of depopulation, such as Consistent High Decline, Increasing High Decline and Consistent Decline, are overrepresented in rural areas of northern-western Spain, particularly in the Castile y León region (where some core cities show increasing trends of moderate decline) and provinces eastern Madrid-Guadalajara, Cuenca and Teruel.Municipalities with trajectories of Consistent High Decline, prevalent at bordering regions of Portugal and in provinces northern, western and eastern Madrid, show positive spatial autocorrelation, and, to a lesser extent, those comprised within the other two trajectories.Areas with Consistent High Decline and Increasing High Decline are autocorrelated each other as well.By contrast, municipalities encoding a late-onset and moderate depopulation, the trajectory Increasing Moderate Decline, are prevalent in rural areas southern Spain, with the highest level of spatial association.Trajectories depicting a reversal of Growth to Decline are also correlated across space and widespread in rural areas of provinces southern Madrid.
We also evaluated the varying contributions of demographic factors, elucidating critical differences in the timing and magnitude of depopulation between the six trajectories.Differences in the magnitude of depopulation are mostly driven by the extent of natural decreases produced by a birth-death deficit, which is greater in trajectories Consistent High Decline and Increasing High Decline, and less important in the trajectory Increasing Moderate Decline.To a lesser extent, internal migration also helps to explain different intensities of depopulation between trajectories.Increased population loss due to internal migration has also resulted in transitions from population stability or growth to decline in areas clustered within the Increasing High Decline and Growth to Decline trajectories.In contrast, international migration contributes to mitigating population decline in all trajectories, mainly before the 2008 crisis, but with significant variations between trajectories.International migration is also found to underpin trajectories from stability, moderate decline or moderate growth to different intensities of decline, since former receiving areas of foreigners ceased to benefit from international migration following the 2008 financial crisis.On the other hand, areas that did not attract migrants, grouped within trajectories Consistent High Decline and Consistent Decline, experienced patterns of consistent population decline in the 21st century.
We found that population size is the most important predictor of the propensity to undergo population decline and the primary factor differentiating our set of depopulation trajectories.Smaller population areas consistently have a higher probability to undergo population decline, particularly Consistent High Decline and Increasing High Decline trajectories.Over-aging also has an important role in increasing the likelihood of undergoing depopulation across all trajectories, and especially trajectories of Consistent High decline and Consistent Decline.Acute over-aging is likely to result in greater population losses from negative natural population change.By contrast, greater representation of young adult populations reduces the probability of depopulation, though their effects vary across depopulation trajectories.Large young adult populations tend to greatly reduce the likelihood of experiencing Consistent High Decline and Increasing High Decline.Accessibility from core cities and altitude also influence the probability of embarking on a depopulation trajectory.While accessibility from core cities consistently increases for all six depopulation trajectories, particularly for those with high intensities of decline, the impact of altitudes is more varied, increasing the likelihood of undergoing a trajectory of Consistent High Decline, Increasing High Decline or Growth to Decline, but having little explanatory effect on explaining other trajectories.
Our results reflect important evolving and longstanding territorial inequalities across Spain.Building on Franklin (2020), we conceptualized depopulation as an evolutionary process, arguing that current population trends are fundamentally a function of past population changes.Considering this connection was key to identify distinctive trajectories of depopulation and understand differences in their timing, extent, duration and sequencing.Within our study, areas experiencing trajectories of longstanding and consistent population declines, namely High Consistent Decline, Increasing High Decline and Constant Decline, have histories of depopulation.During the period of rapid industrialization in the 1950-1960s, these areas recorded high levels of internal out-migration (Collantes and Pinilla 2011).The outflow of young adults during this period has been linked to a subsequent fertility decline extending to present days (Del Rey and Cebrán 2010; Recaño 2017).As a result, these areas are now characterized by small population size, high aging levels and natural-change deficits that drive contemporary population declines.Depopulation is therefore a result of demographic changes, but also fundamentally alters the demographic landscape of affected areas.These trajectories illuminate the self-reinforcing nature of population decline, with compositional changes in populations both an outcome and driver of further depopulation.
We presented evidence that internal out-migration still plays an important role in shaping certain trajectories, specifically trajectories of Increasing High Decline, Growth to Decline, and to a lesser extent, Consistent High Decline and Consistent Decline.The persistence of internal out-migration indicates that these areas are not attractive to national residents, either because of the type of jobs or contextual factors, such as remoteness or poor service provision.In this context, immigration tends to be a key factor to mitigate population decline (Lee 2011; Newsham and Rowe 2021).Trajectories whose labor market can attract immigrants during economic growth phases are able to mitigate depopulation.The capacity to retain immigrants over time must also be considered, as the foreign-born reproduces local population patterns and are likely to leave declining areas by internal migration (Recaño 2017;González-Leonardo 2020).As we have shown, internal out-migration increased after the financial crisis in trajectories Increasing High Decline and Growth to Decline, contributing to population shrinkage.This suggests that some immigrants left these areas moving to other regions and evidences that the same contextual factors that tend to push local populations are also associated with immigrants moving to other areas across Spain.
Our findings may help in designing the recently announced COVID-19 recovery plan of the Spanish Government and the European Union policies to mitigate depopulation by public investment on local development.Policy measures are unlikely to mitigate depopulation in areas experiencing trajectories of consistent and high levels of decline, with a sparse population size and remoteness, as population decline is due to natural decrease as a consequence of the lack of young populations and high levels of aging.We showed that declining rural municipalities experiencing temporary growth due to immigration show a lower degree of aging, have better accessibility and probably better labor market characteristics as well.Therefore, these areas have the potential to respond to policy measures.We also evidenced that some cities in peripheral regions have also shown an increasing trend of moderate population decline.Policies to combat depopulation should give priority to such cities, as they play a major role in the economy of peripheral regions.
We focused on identifying distinctive trajectories of population decline for areas experiencing overall population loss between 2000 and 2020.Future research could extend our work determining temporary population decline in areas experiencing population growth and also investigate the effects of COVID-19 on population decline.Recent evidence have shown that many areas characterized by long-term trends of population decline recorded net internal migration gains (González-Leonardo et al. 2022a;Rowe et al. 2022) and it may have reverted depopulation trends.Internal migration gains seem to have endured over 2020and 2021(González-Leonardo et al. 2022b).The long-term effects of COVID-19 on population change are however to be determined.Our work focused on a single country and categorized population decline into classes to define trajectories using sequence analysis.Future work could also innovate through the application of dynamic time warping to define trajectories of population decline utilizing the continuous scale in which declines are captured.Future research could expand this focus to analyze the trajectories of population decline globally both with traditional and digital footprint data sources, as time series of global population estimates derived from satellite imagery become available.Such analysis would provide a more holistic view of depopulation trajectories and potential ways to tackle future issues of national population decline as population aging become widespread across the globe.

Figure 1 .
Figure 1.Diagram summarizing data and method.Source: Compiled by the authors.

Figure 2 .
Figure 2. Population change in Spanish municipalities from 2000 to 2020 (%).Source: Compiled by the authors using data from the INE.

Figure 3 .
Figure 3. Trajectories of municipalities with population decline from 2000 to 2020.Source: Compiled by the authors using data from the INE.

Figure 4 .
Figure 4. Geographic distribution of depopulation trajectories across municipalities (top) and index of spatial autocorrelation between trajectories (bottom).Note: The spatial autocorrelation index was calculated as a rate between the number of neighboring municipalities divided by the expected number of neighboring municipalities from a random distribution; we used order two to determine the neighboring criterion; * means statistically significant.See TableS1in Appendix S1 for more details.Source: Compiled by the authors using data from the INE.

Figure 5 .
Figure 5. Individual contribution to annual population change rate by trajectory: Natural change, net internal migration and net international migration, 2002-2019.Source: Compiled by the authors using data from the INE.