Spatial structure of city population growth

We show here that population growth, resolved at the county level, is spatially heterogeneous both among and within the U.S. metropolitan statistical areas. Our analysis of data for over 3,100 U.S. counties reveals that annual population flows, resulting from domestic migration during the 2015–2019 period, are much larger than natural demographic growth, and are primarily responsible for this heterogeneous growth. More precisely, we show that intra-city flows are generally along a negative population density gradient, while inter-city flows are concentrated in high-density core areas. Intra-city flows are anisotropic and generally directed towards external counties of cities, driving asymmetrical urban sprawl. Such domestic migration dynamics are also responsible for tempering local population shocks by redistributing inflows within a given city. This spill-over effect leads to a smoother population dynamics at the county level, in contrast to that observed at the city level. Understanding the spatial structure of domestic migration flows is a key ingredient for analyzing their drivers and consequences, thus representing a crucial knowledge for urban policy makers and planners.

Research on city population growth has a long history with statistical regularities among the cities, as identified in early seminal works by Auerbach 1 and later by Zipf 2 . Random demographic growth was generally considered 3,4 as the main source of the population growth dynamics of cities. However, recently 5,6 city population growth was shown to result from a combination of random demographic growth and, more importantly, inter-city flows from domestic migration that are broadly distributed according to a power law 5 . These flows are triggered by socioeconomic changes and can dramatically alter the trajectory of the population growth of a city 7,8 .
Inter-city flows from domestic migration play a crucial role in the evolution of the system of cities at a country scale and its analysis is fundamental to understand the temporal and spatial evolution of cities. More specifically, the structure of household domestic migration provides insights on regions that are more likely to grow, which is usually accompanied by various externalities, such as traffic congestion [9][10][11] , air pollution 12,13 and socioeconomic inequality 14 .
Extreme flows lead to unprecedented population growth that is usually more expansive than compact [15][16][17] , thus understanding the structure of domestic migration flows at intra-and inter-city scales help to plan for various unforeseen problems and to devise mitigation strategies. This is particularly important and well known for the suburban and fringe area urbanization 18 , which have their own planning challenges and peculiarities 19 .
The dynamics of city population growth is usually studied at the city level, neglecting the intra-city spatial structure of migratory flows. Spatial heterogeneity of cities is well known, evident in consistent patterns, among others, nonlinear decrease in population density with increasing distance from the dense urban core 20 , fractal urban morphology 21 , spatial structure of urban heat islets 22 . Other urban studies focused on emergence of inequalities among neighborhoods and infrastructure development 8,23 , and on topological properties of flow networks 24,25 .
In this paper, we study the spatial heterogeneity in city population growth by conducting an analysis of the most recent American Community Survey (ACS) 5-year county-to-county migration flow files. We focus on the origin and destination counties of the domestic migration flows, revealing spatial variations of components of population growth at the county level within metropolitan statistical areas. For this reason, we interchangeably use the terms city and metropolitan statistical e-mail: sukkusur@purdue.edu area (MSA). Our goal here is to examine generalized patterns across cities, despite their specific differences. We show that inter-city flows are more likely to occur between core counties (the core county has the highest population density in a city), and intra-city flows are more likely to follow an outward radial direction (i.e., there is a trend towards exterior and lower density counties). Moreover, flows to/from micropolitan statistical areas and rural counties are more likely to happen at the external regions of cities, and international inflows are more likely to be found at core counties of large cities (see Fig. 1).

Results
Overview of U.S. domestic migration flows The most recent ACS county-to-county flow dataset 26 Fig. 1), mainly driven by the search for more affordable housing, better jobs, and for family reasons such as change in marital status 29 . Long distance moves, captured by inter-state flows, represent the remaining 17% of domestic flows, which comprises about 7.5 million moves per year. Here, we will refer to these domestic migration flows as inflows or outflows, and netflows (inflows-outflows).
The United States Office of Management and Budget (OMB) classifies counties as metropolitan, micropolitan, or neither 30 . A metropolitan statistical area contains a core urban area of at least 50,000 population. A metro area represents a functional delineation of an urban area with a network of strong socioeconomic ties, and provision of infrastructure services [31][32][33] . A micropolitan statistical area contains an urban core of at lest 10,000 but less than 50,000 inhabitants. There are over 380 metropolitan statistical areas in the U.S., each composed of one or more counties, accounting for about 86% of the total U.S. population and comprising approximately 28% of the land area of the country. For this reason, our analysis focuses on the growth dynamics of MSA counties. Supplementary Fig. 2 shows the 3141 counties (administrative subdivisions of the states) in the U.S., comprising about 321 million inhabitants in the starting year of the ACS 5-Year survey period (2015-2019) of our analysis 26 .
Population growth has two components, namely natural growth and migration. Natural growth accounts for births minus deaths, and migration comprises domestic and international migration. With recent trends showing that births and natural increase have declined in the U.S. and in recent years contribute less to overall city population growth 34,35 , migration patterns become more relevant to the study of city population growth. Because the ACS flow files contain international inflows only, the relative importance of migrations on population growth is here addressed by x = |Inflows−Outflows|/|Births −Deaths| (Supplementary Figs. 3, 4), which is the ratio between domestic netflows and natural growth. The statistical distribution of this quantity computed for all U.S. counties is well fitted by a lognormal distribution, and shows that x≥1 for 76.5% of counties. For most counties, domestic migration dominates population growth, and understanding the spatial structure of domestic netflows (and their distribution within a city) is crucial to the comprehension of the mechanisms behind the heterogeneity of city population growth.
At this spatial granularity, we observe a strong heterogeneity among the U.S. counties ( Supplementary Fig. 2) for the period 2015 − 2019, along with examples of specific MSAs. In particular, the relative dispersion of counties relative growth due to netflows is higher than one for about 85% of the metro areas, indicating a large heterogeneity within the same city and pointing towards the spatial structure of domestic migration. The observed difference in the netflows stresses the relevance of our approach: counties belonging to the same city  migratory trends that contribute to the heterogeneous population growth of cities. Core counties are more likely to receive inflows from core counties of other cities than from external counties (blue arrows). Flows to and from micro and non-statistical areas are more likely to be found at the external counties of a city (green arrows). Intra-city flows (red arrows) indicate vectors of redistribution of people within the city, and have an outwards radial direction: people move from central counties with larger population density to external counties with lower densities. International inflows (dashed arrows), which scale superlinearly with city population, are more likely to be directed to the core counties of large cities. The resulting spatial heterogeneity is depicted by the background color, in which the red intensity is proportional to the population density. The width of the arrows is proportional to the intensity of the flows. may have specific growth rates due to population flow patterns, thus indicating preferential flow destinations and pinpointing the direction in which the city has expanded.

Heterogeneity of inter-and intra-city flows
Inter-city flows represent the major component of the total flows (~55%), while intra-city flows represent~25%. Flows between metro and micro areas, and between metro and non-statistical areas are the smallest components, with~13% and~7%, respectively. Given that about 80% of the domestic migration are composed of intra-and intercity flows, we will focus our attention on describing the structure of intra-and inter-city flows, but in the Supplementary Information we offer a brief analysis of flows between metro and micro areas, and between metro and non-statistical areas.
Inter-city flows are not uniform across the U.S. cities. The most intense annual netflows (>2000 people per year), accounting for approximately 17% of the entire inter-city U.S. netflows, are mainly from New York and Chicago to California and Florida (Fig. 2), and from Los Angeles to neighboring cities. Notably, netflows among the Midwestern cities are mostly negative and below the threshold we set. These flows are mainly responsible for increasing or decreasing the population of a given city. Intra-city flow patterns, illustrated with the 7 most populous U.S. cities with more than 5 counties, are also nonuniform.
Our analysis reveals that city centers (defined as the core county with the highest population density) are more likely to have negative netflows, indicating that people are leaving the central regions of cities. The arrows in Fig. 2 indicate the direction of the most intense netflows, supporting this finding and highlighting that there is a trend of people moving from internal to external regions, contributing to population growth and spatial expansion of U.S. cities. In fact, we found no correlation between relative population growth (viz. population growth by county size) and distance from the core county ( Supplementary Fig. 5A) for the 46 cities with more than 5 counties, with relative growth about 0.03 ± 0.05. On the other hand, we found that relative natural growth ( Supplementary Fig. 5B) is negatively correlated with the distance to core county, thus natural growth is less relevant as a component of growth in the outer regions of cities. Consequently, our results show that not only the contribution of each component of growth changes with distance to core county, but also that the internal redistribution of people is an important mechanism of growth, mainly in the external counties.
We also examined variability in inter-and intra-city flows within the 50 states ( Supplementary Fig. 6). Total flows within a state increase, as expected, with the state population. Two special cases are, however, of interest: (1) two states (Vermont and Rhode Island) with small populations have only one MSA, in which case within-state intercity flows are zero; and (2) nearly 40%, or 149, of MSAs have only one county, in which case intra-city flows could not be estimated. For all other cases, we observe on average an equal split between inter-and intra-city flows, but with considerable variability among the states, with a mean about 0.5 and standard deviation about 0.2. A generalization of the intra-and inter-city migratory patterns for all 46 cities with more than 5 counties shows that the percentage of migrants from intra-and inter-city flows are of the same order of magnitude (Fig. 3).
Apart from the core county, flows from the same city correspond to about 50% of the inflow of people in the counties, presenting a slightly positive correlation with their distance from the city center (Fig. 3A). The low percentage for the core county indicates that it is not the major destination of flows from the same city. The percentage of inflows from other cities is higher in the core county and decays as we move towards the suburbs (Fig. 3B). The moderate negative correlation of this percentage with the distance reveals that inflows from other cities are more likely to concentrate in the core regions of a city.
The percentage of outflows directed from the core county to other counties within the same city has a slightly negative correlation with the distance of the origin county to the city center, so it is more likely to find intra-city flows with outflows from internal regions (Fig. 3C). The core county is an exception again, suggesting that it is less likely that someone leaving the core county will move to another county within the same city. The slightly negative correlation of the percentage of outflows directed to other cities suggests that there is a trend of people leaving the core county and the central regions to move to other cities (Fig. 3D). The high percentage of inflows (Fig. 3B) and outflows (Fig. 3D) in the central region due to inter-city flows implies that the central regions of cities are more dynamic and diverse and that people tend to move to counties with similar levels of urbanization. The same pattern is observed for flows between metro and micro areas, and for metro and non-statistical areas, allowing us to conclude that people moving from rural areas are more likely to move to the external regions of a city ( Supplementary Fig. 7).
The positive correlation of the relative growth with the distance due to intra-city flows (Fig. 3E) shows that the resulting intra-city redistribution of people, given by the difference between inflows and outflows, is such that there is a trend from core county to the external counties (viz. suburbs). When compared to the relative growth due to inter-city flows (Fig. 3F), which do not show any trend and that have negative values for the most distant counties, it becomes clear that intra-city flows play a major role in the population increase observed in outer regions of cities. Interestingly, large circle and square dots in Fig. 3E and F suggest that the loss of people due to inter-city netflows is more intense than the gain of people due to intra-city netflows in some external counties of the largest metro areas, thus explaining the population decline in some outer regions of New York and Chicago (as shown in Fig. 2B and C).
The population growth due to intra-city flows is also depicted in Fig. 4. The concentration of flows below the diagonal captures the heterogeneity and the preferential destination of intra-city netflows. We observe that people are more likely to move to lower population density counties when moving from one place to another within the same city, as exemplified by 7 cities in panel A. Panel B summarizes this analysis for the 46 cities with more than 5 counties by showing the fraction F of intra-city netflows to lower density counties. We note that more than 93% of the cities have F >0:5 and that there is a positive correlation of F with the city population, and C shows the rank of cities according to the fraction of intra-city netflows to lower density counties. We define the core county as the one with the highest population density, and we plot the percentage of inflows due to intra-(A) and inter-city flows (B) of each county within a city as a function of its distance to the core county. The percentage of outflows due to intra-and inter-city flows are shown in (C) and (D), respectively. The positive correlation of the relative growth with distance due to intra-city flows in (E), along with the lack of correlation due to intercity flows in (F), indicates that intra-city flows are mainly responsible for increasing the population in the external regions of cities. The sizes of red circles and blue squares are proportional to the city population. The range of distances is split into equally spaced bins. The number of counties n within each bin, from left to right, is 46,1,4,7,7,17,21,31,36,38,34,31,31,30,20,20,21,14,17,9,9,6, 4, 2, 5, 5, 2, 1. The black dots and the error bars indicate the mean and the 90% interval, respectively, of the counties within the corresponding bin. We also show the Pearson correlation coefficient R and the p-value associated with the two-sided test of the null hypothesis of non-correlation.
Population density does not seem to play a major role in driving flows between counties of different cities. The fraction of inter-city netflows to lower density counties is about 57% when we consider all the 384 MSAs. The heterogeneity in the inter-city netflow pattern can be assessed by analyzing F versus the population of the destination city (Fig. 5A, B) and F versus the population of the origin city (Fig. 5C,  D). The negative correlation of F with the population of the destination city in panel A indicates that inflows are more likely to come from lower density counties as the destination city size increases. The positive correlation of F with the population of the origin city in panel C reveals that outflows tend to be directed to lower density counties as the origin city size increases. The trends observed in panels A and C reveal that inter-city flows are more likely between counties with different population densities rather than between counties with similar population densities. Panels B and D show the rank order of cities according to a function of the destination city size and the origin city size, respectively.
We would expect that there might be preferential locations within a given city to which people move due to various factors such as lower costs of housing and employment opportunities. However, it seems that house prices have little to no effect on intra-city netflows (Supplementary Fig. 8). While the fraction of intra-city netflows to counties with less expensive houses is about 0.8 for cities like New York, Chicago and Washington, this fraction is about 0.2 for cities like Dallas, Houston and Philadelphia. The lack of a clear national pattern highlights the specificity of each city and the heterogeneity of the regional housing market in the U.S. 36,37 . On the other hand, the fraction of intracity netflows to counties with lower unemployment rates is higher than 0.5 for about 2/3 of the cities (Supplementary Fig. 9), thus showing that people are more likely to move to counties with lower unemployment rates.

Statistical structure of inter-city flows
Intra-city flows capture the internal redistribution of population, without altering the total city population. In this context, we focus on inter-city flows to investigate whether or not extreme flows play an important role in shaping the growth of counties as observed at the city level 5 . For cities, Verbavatz and Barthelemy 5 introduce a stochastic equation to describe population growth, composed of two terms. The first term accounts for out-of-system growth, which includes natural growth and international migration, and the second term accounts for the growth due to domestic netflows. They find that total netflows adjusted by population size can be well approximated by a Lévy distribution, and this heavy-tailed distribution indicates that rare and extreme inter-city flows (viz. migratory shocks) dominate city population growth.
Here, we find that, for counties, the distribution of total netflows adjusted by population size, which is represented by ζ i and captures the intensity of inter-city migratory flows (see the section "Methods" for details), can be approximated by a Gaussian distribution (Fig. 6). The lack of a heavy tail in the empirical distribution of ζ i suggests the absence of extreme flows at the county level, thus indicating that the growth of counties can be described by smoother migratory process than cities. Given that cities do experience migratory shocks 5 , our findings indicate that cities redistribute inflows among its different counties, leading to a spill-over effect that dampens flow shocks at the county level.

Heterogeneity of international inflows
The highest share of international inflows is concentrated in large cities. About 40% of the international inflows are destined to the top 10 (~2.6%) largest metro areas of the U.S. New York is the first with 8.5% of international inflows, followed by Los Angeles and Miami with 5.4% and 5.0%, respectively. Indeed, international inflows Y k scale superlinearly with the population S k of the metro area k (Fig. 7A), thus larger cities have more immigrants per capita than smaller cities.
Interestingly, this gain with scale is also observed in socioeconomic city metrics as crime, GDP, innovation and wealth creation due to the manifestation of nonlinear agglomeration phenomena [38][39][40] . Using Y = Y 0 S θ as a null model, we can compute deviations from the average behavior by means of residuals given by logðY k =Y 0 S θ k Þ 38 . The rank of the residues (Fig. 7B) shows that college towns are among the top metro areas receiving more international inflows than expected, while large cities as Los Angeles, New York, Atlanta, and Chicago are among the metro areas receiving less international inflows than expected.
The spatial distribution of international inflows within cities is shown in Supplementary Fig. 10. The highest share of inflows is concentrated at core counties, and the percentage of inflows decreases dramatically with the distance from the core county. This result suggests that inflow of international migrants is an important component of population growth, particularly at the core regions of large cities.

Robustness of our findings
Patterns of population redistribution change from time to time in the U.S., and are affected by several factors. For instance, in the 1960s nonmetropolitan counties lost about 3 million people due to outflows to metropolitan counties, while the reverse trend was observed in the counties F has a positive correlation with city population when we consider the 46 MSAs with more than 5 counties, suggesting that intra-city netflows to lower density counties are more frequent as the city size increases. We also show the Pearson correlation coefficient R and the p-value associated with the two-sided test of the null hypothesis of non-correlation. C The ranking of the cities according to F . 1970s when non-metropolitan counties experienced net inflows of about 2.6 million people 41 . Wardwell and Brown in 41 indicate that three factors might be among the main reasons of such change, namely economic decentralization, preference for rural living, and modernization of rural life. The temporal influence of factors as socioeconomic conditions, transportation infrastructure, natural amenities, and land use and development on population growth in rural and suburban areas is explored in 42 . Changes in rural migration patterns are also studied in 43 , where age-specific rural migration patterns from 1950 to 1995 are analyzed. In 44 , the authors explore redistribution trends across U.S. counties from 1980 to 1995 split into three five year periods (1980-1985, 1985-1990, 1990-1995), and 45 analyzes changes in age-specific nationwide migration patterns from 1950 to 2010.
The spatial structure of migration patterns may indeed change from time to time; our results correspond to the current intra-and inter-city redistribution trends, based on the most recent ACS migration flow files. We present a thorough empirical and statistical analysis of domestic migration flows among U.S. cities ans counties. Our study also introduces a framework that can be used for analyzing and comparing internal redistribution of people across different time periods. Indeed, we extended our analysis for two other time periods, 2005-2009 and 2010-2014. With respect to the spatial distribution of intra-and inter-city flows, similar trends are observed in both periods ( Supplementary Figs. 12, 13), namely inter-city flows are responsible for the highest share of inflows to core counties, and intra-city flows are responsible for the highest share of inflows to external counties. We also explored the role of population density in driving netflows  16,17,18,19), reveal similar trends to those we found using ACS data. Particularly, we observe that, for all periods considered, the correlation between intra-city netflow/S and distance to core county is stronger than we found with ACS data, thus highlighting the role of intra-city flows in driving population to external regions of cities. The main difference between both datasets is in the percentage of intraand inter-city inflows and outflows: while ACS data indicates that both flows have approximately the same contribution to the total flows, the IRS data indicates that, besides the core county, intra-city flows are responsible for about 80% of inflows and outflows of metro areas.

Discussion
We presented an analysis of the domestic population flows from domestic migration, disaggregated at the county level, that drive the population growth of U.S. counties and cities. We showed that urban population growth is spatially heterogeneous, where intra-and intercity flows contribute equally to the population dynamics of cities. Intra-county flows could not be examined in this study (absence of subcounty data), but account for~60% of all domestic flows in the U.S. (Supplementary Fig. 1). Analyzing spatial aspects of these flows is an interesting direction for future studies.
Large polycentric urban agglomerations in the U.S. emerge from the development and merging of several towns and cities with strong socioeconomic ties, even though they retain separate municipal governing structures 47,48 . Similarly, at the regional-scale, even larger urban agglomerations of multiple cities emerge; OMB designated 172 such agglomerations as Combined Statistical Areas. Our analyses of intracity flows are based on core county, and the spread of data points observed in Fig. 3 reveals the heterogeneity among cities in terms of The distribution of ζ i , which is the sum of the netflows of a county i adjusted by its population, suggests that migratory events are exponentially bounded at the county level since ζ i is well described by a Gaussian distribution. The distribution of ζ i is computed here for all the counties with at least 50.000 inhabitants. We also show the result of the twosided KS test under the null hypothesis that ζ i follows a Gaussian distribution. Each point corresponds to a particular city. A Fraction F of netflows going to lower density counties versus the population of the destination city. Inflows to counties of large cities (with population greater than 10 6 , dashed line) usually comes from counties with lower population densities. B Rank of cities according to the share of inflows from lower density counties. C Fraction F versus the population of the origin city. Outflows from counties of large cities usually go to cities with lower density counties. D The rank of cities according to the share of inter-city netflows to lower density counties is presented. The dots are colored according to the city population density (darker red means higher density). We also show the Pearson correlation coefficient R and the p-value associated with the twosided test of the null hypothesis of non-correlation. polycentric organization, but with a primary, central urban county 47,48 . Recent multi-scale modeling analyses of urban mobility and growth 49,50 ; 51,52 are noteworthy in combining diverse data sources and theoretical approaches, but there is a need for empirical data analysis at a more disaggregated level 53,54 .
Counties with the highest population density in MSAs constitute the core of cities, characterized by intense inter-city inflows and outflows. Although population growth of cities is shaped by inter-city migratory shocks 5 , we showed that counties are not subject to the same population dynamics. This result suggests that flow shocks are dispersed among its counties; the spill-over effect thus dampens the shocks at the county level. The population growth of urban counties through densification is driven by creativity, innovation, and technological advances, but also triggers outflows because of increasing cost of living and decreasing quality of life issues [55][56][57][58] . Net outflows from the core (most dense) to external counties expand urban sprawl to neighboring counties. Inter-city migrations, and flows from micro and non-statistical areas to metro areas, are more likely between counties with similar levels of urbanization, showing a preferential flow destination.
Not all domestic migration has the same demographic impact. For instance, migration of young people might contribute to a larger natural growth. The migration of elderly people, on the other hand, might have the opposite effect. Particularly, a good discussion about migration up and down urban hierarchy for different age groups is presented in 59 , which helps in understanding the trends and the migration patterns we found. Plane et al. show that the main components of positive population growth in higher density urban settings are international immigration and natural increase since domestic netflows are negative. Strong outflows towards lower density counties are composed of people in their late 50s and 60s preferring less congestion, higher natural amenities, and cheaper housing, thus explaining why natural increase is lower at counties far from the core county ( Supplementary Fig. 5B). Inflows to higher density counties is mainly composed of young, single, and college-educated adults in the [25][26][27][28][29] year age group. Interestingly, once they reach their mid-career stage and start their family, the migration trends are reversed: we observe trends towards lower density counties for 30-34 and 35-39 year age groups, mainly prompted by housing costs, school quality and suburban road congestion 59 .
In this context, we propose a framework for studying the spatial distribution of migratory flows. We have focused here on the U.S. because of the public availability of robust datasets at the county level, but our conclusions could be extended to other developed and highly urbanized countries where the highest share of domestic migration is composed of intra-and inter-city flows. However, the general intra-and inter-city flow patterns we reported here might not hold for low and middle-income countries presenting lower urbanization levels. For instance, city population growth in countries experiencing rapid urbanization in Asia and Sub-Saharan Africa is mainly composed of rural-to-city flows, in which international migration of refugees and the emergence of large informal settlements are also important components of urban growth [60][61][62][63][64][65][66][67] .
Metropolitan statistical areas are surrounded by rural counties. As the population of the adjacent regions increase and cities expand, rural counties are reclassified as metro counties. The reclassification of the external counties as urban places in the U.S. fails to recognize that most of the population might in fact be rural 18 . A recent globalscale analysis 68 suggested that about a quarter of the global population lives in periurban areas of intermediate and small cities. Interestingly, they find that the highest share of population is found at large cities and proximate areas for high-income countries, whereas low-income countries have the highest share of population concentrated in small cities and proximate areas. Migration data are needed in order to construct a typology of flows in different parts of the world.
In this paper, we have studied the mechanisms behind the heterogeneous growth of cities. The growth of cities leads to many benefits, which serve to increase the attractiveness of the city. As cities grow, wealth and innovation per capita increases since these quantities scale superlinearly with city size as a result of agglomeration effects 56 . Simultaneously, the volume occupied by infrastructure scales sublinearly with city size, and this economy of scale means that large cities need less infrastructure per capita than small cities 40 . Conversely, landuse changes from the expansion of metro areas also has costs at local, regional and national scales. Such costs include, among others, loss of agricultural areas (food security) 69 , fragmentation of natural areas (loss of ecosystem services) 70,71 , and growing resource demands extracted from increasingly remote locations (impacts on ecosystem impacts at larger scales) 72 . Heterogeneity of cities both manifests and amplifies socioeconomic inequality, thus contributing diminished urban community resilience.
Understanding the spatial organization of the migratory flows is a step towards understanding the drivers of urban growth and heterogeneities in cities. We found that it is necessary to distinguish these flows into different components according to their destination (central vs. external county) and these flows are probably governed by different underlying reasons and household cost-benefit analyses. The possibility of constructing a typology of flows allows then to test the influence of various parameters and models, to analyze the dynamics of inequalities within cities, and eventually to help urban planners to forecast urban expansion and densification. Note that the spread of empirical data around the model narrows as the size of the city increases. Panel (B) shows the rank of the metro areas and the residues, which captures the deviation from the null model thus highligthing cities receiving more/less than expected international inflows. Names of the cities are followed by two-letter state abbreviations.

Data collection
Our analysis is focused on a five-year period, from 2015 to 2019. We used two main sources of datasets, both from the U.S. Census. The first main source is the ACS County-to-County Migration Files 26 . Annually, approximately 3.54 million independent housing units addresses were selected among all the U.S. counties. There were four modes of data collection: internet, mail, telephone, and personal visit, in which respondents are asked whether they lived in the same residence one year ago. The results, reported over 5-year periods for robust flow estimates of less populated counties, are made available cleaned and preprocessed in spreadsheet files 26 . From this file, we obtain estimates of inflows and outflows between pairs of counties, in which "flow estimates resemble the annual number of movers between counties for the 5-year period data was collected" 73 .
The second main source is the County Population Totals: 2010-2019 dataset 74 , which offers "population, population change, and estimated components of population change" from April 1, 2010 to July 1, 2019. Using the resident population from the 2010 Census as a starting point (population base), county population estimates are derived from the following demographic balancing equation: population estimate = population base + births -deaths + migration 74 (see 74 for detailed explanations of how births, deaths and migration are estimated). From this dataset, which is made available cleaned and preprocessed in a spreadsheet table, we obtain the domestic netflows, births and deaths for each county from July 1, 2015 to June 30, 2019 used to compute the quantity x. We focus our study on 3,141 counties and 384 U.S. metro areas.
To analyze the housing prices of origin and destination counties, we used the housing data from Zillow Research 75 . Zillow publishes the Zillow Home Value Index, which reflects the typical values of homes across the U.S. The data are also made available at the county level, cleaned and preprocessed in a spreadsheet table.
The IRS data we used to check the robustness of our findings were collected from the IRS-SOI Tax Stats-Migration Data website 46 . From 46 : "Migration data for the United States are based on year-to-year address changes reported on individual income tax returns filed with the IRS." Data files are made available for download cleaned and preprocessed, in comma-separated values files (.csv file extension).

Analyzing inter-city flows
Here, we show that the distribution of normalized netflows at the county level is exponentially tempered, suggesting that counties do not experience extreme migratory events as do cities. At the county level, we define J i,k as the aggregate flow from county i to all counties of MSA k, and J k,i as the aggregate flow from all the counties of MSA k to county i. Following 5 , we assume that J i,k = I 0 S μ i S ν k x i,k , in which I 0 is a constant, S i is the population of county i, S k is the total population of MSA k, μ and ν are exponents of S i and S k , respectively, and x i,k accounts for random noises and higher order effects. In this notation, the total netflow of county i is given by J i = P k2N i ðJ i,k À J k,i Þ, where N i is the set of MSAs exchanging people with county i.
In order to reduce the number of free parameters in the expression for J i,k , we define the flow per capita I i,k = J i,k /S i . Given that the ratio I k,i =I i,k = ðS i =S k Þ νÀμ + 1 can be written as a linear function of S i / S k (see Supplementary Fig. 11A), we obtain ν = μ. Fitting the flow per capita I i,k versus S ν i S νÀ1 k gives us ν = 0.34 (95% CI [0.33, 0.35], Supplementary Fig. 11B). As seen in 5 , migratory shocks can be captured by the quantity X i,k = ðJ i,k À J k,i Þ=I 0 S ν i , which measures the relative magnitude netflows with respect to the county population. Interestingly, the variable ζ i = ð1=N i Þ P k2N i X i,k = J i =I 0 N i S ν i , which is the relative impact of the sum of all netflows in county i and captures the intensity of migratory shocks, can be approximated by a Gaussian distribution (Fig. 6).

Reporting summary
Further information on research design is available in the Nature Research Reporting Summary linked to this article.

Data availability
We used data from the following sources in our analysis. The countyto-county migration flows dataset is available at 26 . The county population totals dataset is available at 74 . The housing prices dataset is available at 75 . The IRS migraton flow dataset is available at 46 .