Study design
We conducted a countrywide, prospective, longitudinal physical activity study of US residents that evaluated their physical activity levels within the context of the walkability of their built environments before and after relocation (‘participants’). We leveraged the naturally occurring physical activity data that was captured by a health app on participants’ phones to compare each person’s physical activity levels before and after they relocated to a different area within the USA. While similar relocation-based study designs have been used previously to estimate effects of place and built environments26,68,69, the vast majority have been limited by relatively small sample sizes, using only self-report physical activity measurement and the limited diversity with respect to the areas to which they relocated. Objective measures of both urban walkability and physical activity were used and are discussed in more detail throughout the Methods. We analysed anonymized, prospectively collected data from 2,112,288 US smartphone users using the Azumio Argus health app over 3 years (March 2013 to February 2016) to identify 5,424 participants that relocated 7,447 times among 1,609 US cities. These 1,609 cities are home to 137 million Americans, or more than 42% of the US population. We note that relocation is neither purely exogenous nor random, and discuss the important implications of this below. We follow established best practices for analysing large-scale health data from wearables and smartphone apps70.
The Azumio Argus app is a free smartphone application for tracking physical activity and other health behaviours. Participants were excluded from a particular analysis if necessary information was unreported (for example, participants with no reported age were excluded from the analysis of Fig. 2b). Extended Data Table 1 includes basic statistics on study population demographics and weight status (BMI). Anonymized Azumio Argus app data was obtained through a Data Use Agreement. Data handling and analysis was conducted in accordance with the guidelines of the Stanford University Institutional Review Board, which deemed this study exempt.
For population size statistics, refer to Extended Data Tables 1–3.
Statistical methods
All error bars throughout this paper correspond to bootstrapped 95% confidence intervals. When these bootstrapped 95% confidence intervals do not include the null value (typically 0), they indicate a statistically significant difference at the α = 0.05 level. All statistical hypothesis tests were two-sided Student’s t-tests unless indicated otherwise.
Identifying participant relocation
We defined participant relocation as the action of moving to a new place for a substantial amount of time. We identified participant relocation as follows. Participant location on a given day was assigned to a city based on the weather update in the participant’s app activity feed. Weather updates are automatically added to the feed of each participant according to the nearest cell phone tower. We searched for participants that stayed in one location within a 100-km radius for at least 14 days and then moved to a different location that was at least 100 km away. Participants were required to stay within a 100-km radius of this new location for at least another 14 days. The 14-day threshold was chosen to filter out short trips that may be related to business or leisure travel. Using this threshold, we find that most participants do not relocate again and spend a median of 81 days in the new location, effectively excluding the impact of short-term travel on our analyses. Most participants stopped tracking their activity at this time, rather than relocating again. In addition, we repeated our analyses with thresholds of 21 and 30 days and found highly consistent results (Extended Data Fig. 6). We required a substantial move distance (100 km or more) to ensure that relocating participants were exposed to a new built environment. We allowed for up to 5 days of intermediate travel between these two locations and ignored these days during analyses. We applied this method to 2,112,288 users of the Argus smartphone app and identified 31,034 relocations. Among these, we required participants to have used the app to track their physical activity for at least 10 days within the 30 days before and after their relocation (as in previous work3). We further required at least 1 day of tracked physical activity before and after relocation to ensure that, whenever we compare two participant populations, these populations are identical and therefore comparable (that is, we seek to identify within-participant changes in physical activity). We repeated our statistical analyses with alternative data inclusion criteria, such as the number of days with tracked physical activity, and found similar results.
Physical activity measure
Our device-based (historically often called objective) measure of physical activity was the number of steps over time recorded by the participant’s smartphone. Steps were determined based on the smartphone accelerometers and the manufacturer’s proprietary algorithms for step counting. The Azumio Argus app records step measurements on a minute-by-minute basis. These measurements are collected passively without requiring the smartphone or Azumio Argus app to be in active use. Extended Data Table 2 includes basic statistics on physical activity and tracking in the study population.
Data from the Azumio Argus app have been used previously to study physical activity in large populations3,71,72, where the authors showed that this form of data follows well-established trends3. For example, they demonstrated that activity decreased with increasing age12,19,73,74 and BMI19,74,75, and is lower in female individuals than in male individuals12,19,73,74,76, trends that are consistent with national surveillance data in this area. Physical activity estimates were also reasonably well correlated with self-report-based population estimates on a country level3.
Several studies have established significant differences between accelerometer-derived and self-reported physical activity50,51. Self-reports typically overestimate moderate and vigorous activity and underestimate sedentary activity50. In a US study using National Health and Nutrition Examination Survey 2005–2006 data, 59.6% of adults self-reported meeting MVPA guidelines for aerobic physical activity, whereas estimates using accelerometry were much lower at 9.6%51. For our observation period between 2013 and 2016, the US National Health Interview Survey reported that 49.6–52.6% of the US population met MVPA guidelines. Nationally representative accelerometer-based estimates for this time are not available. Our smartphone-accelerometry-based estimate of 18% meeting aerobic guidelines is within expectations, given well-established differences between accelerometer-derived and self-reported physical activity and earlier data (Methods)50,51. In addition, unlike many previous studies mailing accelerometers to study participants to wear for a week, our study focuses on real-world physical activity by free-living individuals that may not be equally affected by their awareness of being observed (that is, the Hawthorne effect).
We filtered out days as invalid when less than 500 or more than 50,000 steps had been recorded. We further ignored days immediately preceding and following the relocation itself (5 days before and 5 days after relocation), because the process of relocating, rather than the new built environment itself, could impact physical activity during these days. Physical activity was relatively stable outside this period (Supplementary Fig. 4). We considered physical activity within a window of 30 days before and 30 days after relocation (with the exception of Supplementary Fig. 3 and Extended Data Fig. 2 that use 90-day windows to illustrate long-term changes). In total, our dataset included 248,266 days of objectively measured minute-by-minute physical activity surrounding 7,447 relocations (595,803 days for the 180-day period).
We used the following measures as primary outcomes in this study: (1) Change in average daily steps following relocation (Figs. 1e,f and 2a,b). (2) Change in average weekly minutes spent in MVPA following relocation, where we considered all minutes spent at intensities greater than or equal to 100 steps per minute as MVPA36: \(\Delta {T}_{{\rm{MVPA}}}={\sum }_{I=100}^{\infty }\Delta T(I)\), where ΔT(I) is defined as the change in weekly minutes of activity at intensity level I, in units of steps per minute, after moving. Figure 3a–c shows changes in average weekly minutes spent at different intensity levels. (3) Change in the fraction of the population that met aerobic physical activity guidelines following relocation, defined as spending at least 150 minutes per week in MVPA1 (Fig. 3e,f). All error bars correspond to bootstrapped 95% confidence intervals77.
Walkability measure
We considered relocations among 1,609 cities in the USA. Walkability scores for these cities were based on the publicly available and systematically developed Walk Score78. Scores are on a scale of 1 to 100 (where 100 is the most walkable) and are based on amenities (for example, grocery stores, schools, parks, restaurants and retail) within a 0.25-mile to 1.5-mile radius (a decay function penalizes more distant amenities) and measures of friendliness to pedestrians, such as city block length and intersection density. Extended Data Table 3 includes basic statistics on the cities included in our study and their walkability scores. Walk Scores at the city level are computed by weighting the Walk Score of each geographic unit within a city (typically about the size of a city block) by the population density of that unit79.
The Walk Score measure is a frequently used measure of walkability that is freely and widely available across the USA and other countries including Canada and Australia78. It is highly correlated62 with other walkability measures80,81,82, and was found to offer the best fit to walking trips in a study conducted in Montréal62. It is widely used in the literature and has been extensively validated59,60,61,62,63,64. Although other measures of walkability exist80,81,82, the Walk Score measure was chosen in light of the pragmatic focus of the investigation and its ease of use and accessibility. More comprehensive walkability indices could provide further granular information related to specific aspects of walkability that might be of prime importance.
We determined cut points for Walk Score differences of −16 to +16, 16 to 48 and 49 to 80, as we preferred cut points that were symmetric around 0 (no change in walkability score), equivalent in size (32 Walk Score points difference) and balanced granularity and statistical power, as large Walk Score differences are more rare. Among the 7,447 relocations, 2.4% (2.4%) were associated with 49+ walkability point increases (decreases), 20.7% (21.3%) were associated with 16–48 walkability point increases (decreases) and 53.1% of relocations were to locations of similar walkability (−16 to +16 point difference).
Aggregating relocation-based quasi-experiments
We aggregated changes in physical activity following relocation based on the difference in walkability scores between the origin and destination city, Δ. In Fig. 2a, each circle corresponds to a pair of cities sized by the number of participants moving between those cities. We fit a linear model mΔ + b to these data with slope m = 16.6 (Student’s t-test; P < 10−10) and intercept b = 25.0 (Student’s t-test; P = 0.462).
We considered potential confounders such as differences in climate (using Köppen climate type83) and median income between the origin and destination city. We found that the relationship between walkability and walking behaviour still holds within pairs of cities with similar climate, for instance, moving from Miami, FL to Jacksonville, FL, or from Amarillo, TX to Euless, TX (see annotations in Fig. 2a as well as more generally in Supplementary Fig. 5). Furthermore, we found similar effects across relocations in all seasons (Supplementary Fig. 6) and relocations to cities with higher, lower and similar median household income levels (Supplementary Fig. 7).
Impact of walkability across subgroups
We considered the effect of walkability differences on change in physical activity across subgroups based on demographics (ages 18–29, 30–49 and 50+ years), weight status (normal, overweight and obese levels of BMI), previous activity level (below 5,000, 5,000–8,500 and above 8,500 average daily steps before relocation) and gender (men and women). Owing to the approximately linear nature of the relationship between walkability changes and physical activity changes (Fig. 2a), we used a linear model for estimation. For each subgroup, we ran independent linear regressions of the difference in daily steps on differences in walkability between cities at the level of individual relocations. The models included an intercept coefficient: m ⋅ Δ + b. We determined the estimated coefficient of walkability (m; that is, the increase in daily steps for each one-point increase in walkability of a city) along with 95% confidence intervals (based on Student’s t-distribution) for each subgroup (Fig. 2b). We performed Student’s t-tests on the regression model coefficients, which establish that relocation to a city of higher walkability is associated with significantly more daily steps across all age, gender, BMI and activity level groups (Student’s t-test; all P < 0.05), with the exception of women over 50 years old, for which the positive difference was not statistically significant (Student’s t-test, P = 0.14). We found that the effect was diminished in overweight and obese women relative to normal-weight women. Thus, the non-significant effect on women over 50 years of age may be explained, in part, by the larger average BMI of this group (27.4) compared with other women (25.3; P < 10−10). In comparison, men over 50 years of age also had a larger BMI compared with other men, but the difference was smaller than in women (28.2 versus 27.0; P < 10−7).
Adjusting for seasonality
Physical activity is influenced by climate and weather84 and relocations are not equally distributed across seasons (Supplementary Fig. 3a). We found that differences in physical activity levels following relocations may be influenced by seasonal variation, especially when considering comparatively long observation periods of about 6 months (Supplementary Fig. 3b,c). For analyses of variation in activity over time (Fig. 1e,f, Extended Data Fig. 2 and Supplementary Figs. 1 and 3), we adjusted for these seasonal effects by weighting relocations in each calendar month equally. This was achieved by first estimating physical activity levels separately for each calendar month and then taking the average. This process is repeated 1,000 times in our bootstrap estimates.
Selection effects in relocation and mobile app usage
While relocation uniquely enabled the quasi-experimental study of behavioural changes in different environments, there may be selection effects driving relocation, often referred to as residential self-selection. According to a 2013 US Census Bureau report, 98% of people moved primarily for reasons of housing, family and employment85. Less than 1% of people moved primarily for health reasons. There are some categories that might, in part, include people who want to reduce their dependence on cars. These include ‘health reasons’ (0.4%), ‘other housing-related’ (14.0%), ‘wanted better neighborhood/less crime’ (3.2%) and ‘to be closer to work/easier commute’ (5.4%), suggesting that at least 77% of participants moved for reasons completely unrelated to car dependence85. In addition, neighbourhood selection may be influenced by personal preferences such as exercise and walking activities20. With respect to this possibility, note that we found no indication of increases in physical activity after moving to a location of similar walkability (Figs. 2a and 3c). This suggests that those relocating participants are not simply more motivated to exercise, on average, but that changes in physical activity may be explained by the changing built environment. It is possible that selection effects were absent because participants may not have perceived themselves as being observed, in contrast to previous studies that featured explicit, short periods of monitoring (Hawthorne effect). We further acknowledge that other city characteristics may affect walking and be correlated with the city’s walkability (for example, length of work days). We investigated potential selection effects further by comparing the population of relocating mobile app users, first, to the overall US population, and, second, to the overall mobile app user population, including non-relocating app users. We found that the relocating participant population is similar in age (36 versus 37.7 years median age) and gender (49.8% versus 51.0% female, P = 0.132; Student’s t-test) to the US population (Extended Data Fig. 3). We adjusted for differences in age for the simulation estimates in Fig. 3f and Extended Data Fig. 1. Within the app user population, we found that movers and non-movers (that is, relocating and non-relocating participants) tend to be close in age (43.8 versus 37.9 and 38.5 versus 33.7 average age for men and women, respectively; Extended Data Fig. 4a,b), and weight status (68.1% versus 59.8% and 45.6% versus 44.3% overweight and obese for men and women, respectively; Extended Data Fig. 4c,d). However, movers were generally more physically active than non-movers (6,284 versus 5,825 and 5,279 versus 4,635 average daily steps for men and women, respectively; Extended Data Fig. 4e,f). Furthermore, we found that within movers, those that relocate to higher-, similar- and lower-walkability locations were similar in age, weight status and previous physical activity levels (Extended Data Fig. 5).
Simulating the impact of walkability improvements
We simulated the impact of US nationwide walkability improvements on US population physical activity levels. Concretely, we simulated the impact of increasing US city walkability scores to a constant target walkability score between 1 and 100. We also highlight the walkability scores of Chicago and Philadelphia (78) as well as New York City (89) to aid interpretation. As the relocation population was not explicitly drawn to be representative of the US population, we adjusted our estimates through ratio-based post-stratification weights across age-based strata86. We used civilian population estimates from the US Census Bureau for 2016 as the target population distribution. While there were no significant differences in the gender distribution (49.8% female versus 51.0% female, P = 0.132; Extended Data Fig. 3a), we found slight differences in age (36.0 versus 37.7 years median age; Extended Data Fig. 3b), which we corrected for through sampling weights. We acknowledge that other selection effects and heterogeneous treatment effects may exist. Using a bootstrap with 1,000 replications, we estimated the difference in the overall US population that would meet US national aerobic physical activity guidelines for MVPA1 after relocating based on the relocation-induced difference in walkability. We used a linear regression model and data from relocations associated with both walkability increases and decreases. We estimated the total fraction of US population meeting aerobic physical activity guidelines as the sum between the fraction of people already meeting these guidelines before relocating plus the estimated addition based on the regression model. Confidence intervals represent bootstrapped 95% confidence intervals. Final estimates are depicted in Fig. 3f and Extended Data Fig. 1.
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.