Main

The world is currently facing a physical inactivity pandemic, with a large and growing proportion of the population not meeting either US1 or World Health Organization physical activity guidelines2. Recent data show that the global prevalence of physical inactivity rose from 23.4% in 2000 to 31.3% in 20223. This puts individuals at risk for non-communicable diseases2, all-cause morbidity and mortality4, physical and cognitive decline5 and mental disorders6, decreasing quality of life and increasing healthcare costs. This trend is particularly pronounced in the USA, which has some of the world’s highest rates of obesity, cardiovascular disease and diabetes morbidity and mortality7,8.

Previous research showed that exposure to urban nature can promote physical activity, as natural environments—such as tree-lined streets, parks and green spaces—often provide inviting settings for walking, jogging, cycling and other activities7,9. Moreover, evidence suggests that physical activity performed in natural settings often offers greater physical and mental health benefits than activity in other environments10,11.

The extent to which urban nature promotes physical activity across geographies and demographic groups is unclear. Although previous studies have identified the benefit of natural settings for physical activities, most of them are cross-sectional and only cover one or several sites or cities12. The heterogeneity in research design, model specifications and geographic conditions makes it challenging to compare these studies directly, generalize their findings or apply the evidence for policy implementation across different urban contexts. Furthermore, previous studies have often assessed physical activity using self-report questionnaires, which are prone to recall biases13, or by using pedometers and accelerometers, which are typically limited by small sample sizes, short observation periods and narrow geographic coverage7,14.

A deeper understanding of the relationship between nature and physical activity is essential for shaping public policy and designing effective interventions to encourage physical activity15. To advance knowledge, wearable trackers offer researchers an accurate, scalable and cost-effective method for tracking physical activity in large populations over extended periods15,16,17. For this study, we analysed daily step recordings and activity intensity levels from 7,013 anonymized Fitbit users across the contiguous USA from 2017–2019, collected through the All of Us Research Program (National Institutes of Health (NIH))18, providing a longitudinal dataset. The dataset includes recordings of daily step counts and time spent at various activity intensity levels at the individual level from 341 metropolitan areas. We focused on the 53 metropolitan areas with at least 30 participants who had 180 or more days of data. Applying a within-person design, this study asked: (1) what is the relationship between green space and physical activity in urban contexts; (2) to what extent is this relationship heterogeneous among individuals and cities; and (3) what other factors might affect physical activity?

Results

Study participant characteristics

We analysed the data of participants from 53 metropolitan areas in the contiguous USA (Fig. 1). Participants were more likely to be White, female and highly educated and to have higher income levels relative to the US average (Extended Data Table 1). Of the 7,013 participants included in our analysis, the median age was 58 years (interquartile range (IQR): 43–69 years). Nearly 70% of the sample were female, 83% were White and 75% reported a college degree. Additionally, close to half of the participants reported a household income above US$100,000 yr−1, with over 26% earning more than US$150,000 yr−1. The median daily step count was 7,652 (IQR: 5,703–9,783) over the study period. We observed significant spatial variation in daily steps. Participants from the East and West Coasts and Great Lakes region exhibited higher step counts compared with other areas (Fig. 1). Participants spent substantially more time in lightly active activities (median: 200.65 min d−1; IQR: 155.85–246.35 min d−1) than in fairly active (12.42 min d−1; IQR: 6.61–21.78 min d−1) or very active (12.35 min d−1; IQR: 4.97–25.07 min d−1) activities (Extended Data Fig. 1).

Fig. 1: Spatial distribution of participants and average daily step counts across 53 US metropolitan areas.
Fig. 1: Spatial distribution of participants and average daily step counts across 53 US metropolitan areas.
Full size image

Circle sizes represent the number of participants in each metropolitan area. The colours indicate the average daily step count.

Relationship between daily steps and green space

In this study, we quantified nature exposure on a three-digit zipcode level using park accessibility (Fig. 2) and the normalized difference vegetation index (NDVI) (Extended Data Fig. 3). Our pairwise correlation matrix showed that daily steps were weakly and positively associated with park accessibility (Pearson’s r = 0.15; P < 0.001; Fig. 3), and park accessibility itself was positively correlated with NDVI. Conversely, we observed a weakly negative correlation between daily steps and NDVI (Pearson’s r = –0.18; P < 0.001), indicating that participants in greener areas were generally less physically active than those in less green areas. Further pairwise correlation analyses revealed that daily steps were positively correlated with walkability and population density and negatively correlated with temperature and the air quality index (AQI).

Fig. 2: Spatial distribution of average park accessibility across 53 US metropolitan areas.
Fig. 2: Spatial distribution of average park accessibility across 53 US metropolitan areas.
Full size image

The map illustrates park accessibility at the CBG level for eight metropolitan areas, shown in the top and bottom panels.

Fig. 3: Relationship between daily step count and green space.
Fig. 3: Relationship between daily step count and green space.
Full size image

Shown are Pearson correlation coefficients among average daily step counts, park accessibility, NDVI, walkability, temperature, precipitation, AQI and population density across three-digit zipcode areas.

Multilevel model results

To gain a deeper understanding of the relationship between green space and physical activity, we applied a multilevel model that included greenness (NDVI) and park accessibility, as well environmental and demographic factors at the individual and city levels that might affect physical activity. We again found a significant positive association between park accessibility and daily step count (P = 0.005; Table 1). A 100% increase in park accessibility corresponds to an additional 1,067 (IQR: 322–1,812) steps per day. However, there was no relationship between NDVI and daily steps (P = 0.268; Table 1).

Table 1 Multilevel analysis results, with daily steps (in 1,000 s) as the dependent variable

In addition to park accessibility, step counts were associated with other environmental factors. Temperature exhibited a nonlinear relationship with step count. Higher temperatures were associated with increased step counts up to approximately 26.5 °C. Above 26.5 °C, temperature increases were associated with fewer steps. Precipitation also had a negative relationship with step count. One thousand millimetres of precipitation was associated with 79 fewer steps per day. Our analysis further indicated that city-level factors, such as walkability and air pollution, contributed to variations in step count between cities. Walkability was positively associated with daily step count, whereas air pollution was negatively associated with step count. A one-unit increase in the walkability score was associated with an additional 56 steps per day. In contrast, a one-unit increase in AQI score corresponded to 12 fewer steps per day.

Demographic and socioeconomic characteristics were also related to daily step count. In particular, each additional year of age was associated with a decrease of 13 daily steps. Men, on average, took 794 more daily steps than women. Step count was positively associated with household income, educational attainment and employment status. Specifically, each additional US$1,000 in household income was linked to six additional daily steps, and participants with a college degree or employment reported an additional 379 and 333 steps per day, respectively. White participants did not differ significantly from non-White participants in daily step count (Table 1).

We found that individual variation in daily step count was much greater than between-city variation, with a participant-level intraclass correlation coefficient of 0.76 compared with a city-level intraclass correlation coefficient of 0.02. We also observed a significantly larger conditional R2 than marginal R2 (0.791 versus 0.066, respectively), indicating that most variance was explained by the random effect.

We further conducted multilevel models to examine the associations between park accessibility or NDVI and time spent at various activity intensity levels (lightly, fairly and very active). Multilevel regression models revealed that both park accessibility and NDVI were significantly and positively associated with lightly active activity time, but not with fairly or very active minutes (Supplementary Table 1). A 100% increase in park accessibility was associated with an additional 26.4 min of lightly active activity per day, and a one-unit increase in NDVI corresponded to an additional 2.1 min d−1. This finding was consistent with our main step count analysis and suggested that environmental greenness may encourage low-intensity physical activity such as walking. These results validate the robustness of our original focus on step count by showing a parallel relationship between environmental features and lightly active time.

Heterogeneity of the park accessibility–step relationship by region

The multilevel model enabled us to derive individual park accessibility–step estimates (equation (5)), which reflect the strength of association between park accessibility and daily step count both within individuals and between cities (hereafter referred to as park–step slopes). City-level park–step slope values revealed a distinct spatial pattern after adjusting for a suite of individual-level demographic characteristics, socioeconomic status and city-level meteorological and built environment features. Urban residents across the West, Southwest and southern USA tended to have above-average park–step slopes (1.62, 1.37 and 1.78, respectively, versus 1.07), indicating a stronger association between park accessibility and step count (Fig. 4a). In contrast, individuals in the Northeast and Midwest generally exhibited lower park–step slopes (0.72 and 0.51, respectively), suggesting that park accessibility had a comparatively smaller influence on their daily steps than the study-wide average park effect on steps. This regional pattern suggests that geospatial proximity—encompassing shared climate conditions and cultural factors—may contribute to more similar behavioural responses to park accessibility (Fig. 4b). We observed consistent spatial patterns in the associations between green space and time spent partaking in lightly active activities. For cities in the western and southern USA showed stronger positive associations between both park accessibility and NDVI and lightly active minutes compared with cities in the midwest and northeast (Extended Data Figs. 6a,b and 7a,b). This spatial heterogeneity reinforces our primary findings and highlights the importance of regional context in shaping the relationship between environmental features and physical activity.

Fig. 4: Relationship between park accessibility and daily steps across 53 US metropolitan areas.
Fig. 4: Relationship between park accessibility and daily steps across 53 US metropolitan areas.
Full size image

a, Bar plot showing the difference between city-level park–step slope values (from random effects) and the overall park accessibility coefficient (from fixed effects), coloured by geographic region. A positive value indicates that a city’s residents engaged in more steps relative to their park accessibility compared with the average effect. b, Distribution of the difference between park–step slopes and average effect across 53 US metropolitan areas in 6 geographic regions. The colours of the points represent the difference compared with average effects. c, Scatterplot illustrating the association between city-level park–step slopes and average temperature (n = 53; Pearson correlation (two sided): r = 0.61; P = 0.0002).

In a subsequent analysis, park–step slope was significantly correlated with temperature (Pearson’s r = 0.61; P < 0.001). Consistent with the relationship between daily steps and temperature, temperature exhibited a nonlinear association with park–step slope. The park–step slope was positively correlated with temperature. This peaked at approximately 20 °C before decreasing with rising temperatures (Fig. 4c). Overall, the trend of higher daily steps being associated with greater park accessibility was more pronounced among urban residents in regions with more temperate climates. We observed similar patterns in the relationships between temperature and both park–lightly active time and NDVI–lightly active time (Extended Data Figs. 6c and 7c).

Heterogeneity of the park accessibility–step relationship by population subgroup

The effect of park accessibility on daily steps varied among metropolitan areas with distinct sociodemographic profiles (Fig. 5 and Extended Data Fig. 5). We saw a significantly negative correlation between city-level park–step slopes and baseline daily steps (Fig. 5a), suggesting that cities with lower average daily steps are more likely to have a stronger relationship between park accessibility and daily steps than those with higher daily steps on average. For example, a one-unit increase in park accessibility was associated with an increase of 3,114 steps per day for residents of Tucson, who had relatively lower baseline daily steps (6,830 steps per day). However, in Denver, the same increase in park accessibility was associated with a decrease of 28 steps per day for the residents, who walked an average of 8,779 steps per day. Furthermore, park–step slope was positively associated with age (Fig. 5b) and negatively correlated with the percentage of White people (Fig. 5c), suggesting that park accessibility had stronger correlations with daily steps for cities with older and non-White populations. Park–step slope was not significantly correlated with gender, income, education or employment status (Extended Data Fig. 5).

Fig. 5: Relationships between park–step slope and various factors across 53 metropolitan areas.
Fig. 5: Relationships between park–step slope and various factors across 53 metropolitan areas.
Full size image

ac, Relationships between park–step slope and average daily steps (a), average age (b) and the percentage of White people (c). The red lines represent linear fits of the data points, with the shaded areas indicating 95% confidence intervals. The Pearson correlation coefficient is displayed in the top corner of each plot.

Discussion

Using a dataset of daily steps from wearable devices, this large-scale investigation, covering 53 metropolitan areas in the contiguous USA, shows that park accessibility is associated with significantly more daily steps across all age, gender, income and education groups, accounting for weather and built environment conditions. Extensive evidence from cohort and intervention studies suggests that increases of 500–1,000 daily steps are associated with clinically meaningful reductions in mortality and cardiometabolic risk4,14,19. For example, a recent meta-analysis reported a 15% reduction in all-cause mortality per additional 1,000 steps per day and a 7% reduction in cardiovascular mortality for every 500-step increase. In our analysis, moving from the 25th percentile (park accessibility = 1.45) to the 75th percentile (5.89)—a realistic shift within the observed range—corresponds to an estimated increase of approximately 128 steps per day. A one-standard-deviation increase in park accessibility equates to about 181 additional steps per day, an effect size that falls within thresholds linked to meaningful health benefits. This suggests that access to parks may have a notable influence on an individual’s daily physical activity, highlighting the potential for urban planning and public health initiatives that expand park access to deliver tangible, population-level health benefits. Our findings align with previous studies indicating a positive association between park access and physical activity20,21,22,23 and provide nuanced insights into how this relationship varies among urban residents and across geographies in the USA.

We had expected that both indicators of urban green space (park accessibility and the amount of urban greenery (that is, NDVI)) would be positively associated with physical activity. The results only partly supported this expectation. Park accessibility was positively related to daily step count, whereas NDVI showed no such association. NDVI was, however, positively linked to time spent partaking in lightly active behaviours (for example, slow walking). One potential explanation for this finding is that although park accessibility measures green spaces that could specifically be used by urban residents for physical activity, the variable capturing the amount of greenery also includes private spaces that may not be readily accessible to residents, as well as urban green areas that may be too distributed to promote movement. Low-intensity movements such as neighbourhood walking may still benefit from visible greenery, explaining NDVI’s association with lightly active minutes, whereas step counts—which reflect broader mobility patterns—appear to depend more on the presence of accessible parks.

The results of our multilevel analysis also indicate substantial variation in daily step count and time spent on lightly active behaviours among individuals from different regions. Notably, much of the variance in daily step count is accounted for by random effects, especially at the individual level, rather than by fixed effects, meaning that even among individuals with similar demographic and socioeconomic backgrounds, physical activity levels can vary widely. The association between park accessibility and daily steps also varied considerably among participants and cities. Geography played a significant role, with stronger associations between park accessibility and both daily steps and lightly active minutes observed in western and southern regions of the USA compared with eastern and northern regions. These findings suggest that, in cities that are geographically close and share similar socioeconomic characteristics, the relationship between park accessibility and physical activity remains largely consistent. For example, in cities with more moderate temperatures, park accessibility had a greater positive relationship with daily steps and time spent partaking in lightly active activity than in cities with extreme temperatures (Fig. 4c and Extended Data Fig. 6c).

Furthermore, the relationship between park accessibility and daily steps varied across cities with differing demographic profiles. The effect was more pronounced for cities with lower baseline step counts, and those with a higher proportion of elderly and non-White populations—groups that typically have lower baseline step counts relative to other groups (Fig. 5). This suggests that cities with older, less active and more racially diverse populations could experience greater increases in daily steps with improved park accessibility compared with other cities. These findings are consistent with the notion of an equigenic effect, wherein enhanced access to green space can disproportionately benefit socioeconomically disadvantaged populations24,25,26,27. Privileged populations tend to have greater access to green space within and beyond their locale, thereby diminishing the beneficial association between local green space and physical activity. In contrast, improvements in park accessibility are likely to yield greater benefits for less active populations, particularly those with currently limited access to green space and usable park space.

The scientific evidence for the physical activity benefits of parks and other forms of urban green space is supported by a growing number of epidemiological studies, primarily using self-report questionnaires or reasonably short-term usage of research-specific pedometers or accelerometers to measure individual physical activity levels28,29,30,31. Based on our review of the literature, none of the studies to date evaluating parks or urban green space more generally and physical activity provides empirical estimates of physical activity across large populations or over time. In most cases, the available physical activity data in this area have been limited to a single city and often capture only a single point in time28,29,30,31,32,33,34,35. Our study design and analytical approach diverge from previous studies in several critical ways that enhance the novelty and clinical relevance of our findings. First, previous studies typically assessed step count over a single, brief monitoring period (usually days)28,31,34. Such short monitoring periods are susceptible to observed effects and may not accurately reflect true longer-term activity patterns. In contrast, our approach incorporated step data across three years for participants, offering a more accurate depiction of physical activity patterns over time. Second, the easy-to-use wearable device data we utilized encompass a large cohort of participants across major US metropolitan areas, providing an extensive sample and broad spatial coverage. This large dataset enabled us to examine variations in physical activity across both individuals and cities, better accounting for the diversity and uncertainties of human behaviour. Third, there is a lack of national-level research demonstrating the generalizable effects of parks and other forms of green space on physical activity. As noted earlier, the existing literature has focused on a single city or a small number of cities, often yielding inconsistent findings regarding the relationship between parks (or green space more generally) and physical activity15,31,32,34. Our results, derived from a nationwide sample, shed light on broad and generalizable public health implications. As an upstream intervention, parks and green space—when optimally allocated, designed and integrated with existing land-use patterns and tailored to the characteristics of the resident population—have the potential to enhance daily physical activity levels, thereby contributing to the overall wellbeing and health of urban populations.

There are several limitations that could be addressed in future studies. First, our study could not differentiate between indoor and outdoor step counts. Individuals with higher socioeconomic status often have more options for physical activity, such as access to indoor fitness facilities, and may therefore engage in less park- or green-space-related physical activity. Second, our sample was skewed towards individuals of higher socioeconomic status, who in general are more able and likely to purchase wearable devices, as well as engage in regular physical activity. However, the benefits of improved green space access could be even larger for lower socioeconomic status or less active populations, who may face more barriers to physical activity and be more sensitive to improvements in the built environment. This demographic skew may limit the generalizability of our findings to broader, more diverse populations—a common and well-documented issue in research utilizing wearable devices15,16,17,36. Future studies should aim to include participants who are historically under-represented in wearable-device-related research. Third, consistent with previous research indicating that individuals who use wearable devices tend to be more physically active16, participants in this study recorded a median of 7,676 steps per day, exceeding the average daily step count reported for US adults in general (4,000–5,000 steps per day)37. This suggests that our analytical cohort was more active than the general population, which could attenuate associations between park access and physical activity. It suggests that our results may be more conservative relative to what might be observed in a more sedentary or underserved population. Fourth, although significant associations between daily step count and park accessibility were found in this large sample, the actual sizes of the differences in step count were reasonably modest. Although it is the case that the extensive physical activity literature has demonstrated that the relationship between physical activity levels and a range of physical and mental health outcomes is of a continuous nature (that is, more is generally better across the physical activity continuum), it is currently unclear whether the reasonably small step count differences found here would be meaningful from a personal or public health perspective. Further research in this area is deemed important. Fifth, our observational study does not enable causal conclusions. Although we considered a range of relevant contextual confounders, potentially hidden third variables may remain elusive38. However, our study provides a critical step towards causal findings by establishing within-person associations in a large intensive longitudinal dataset. This should be followed up with future research endeavours applying experimental manipulations in everyday life39 or through the types of natural experiments that have been reported in other physical activity areas. Sixth, our study acknowledges two central challenges in spatial epidemiology: the modifiable areal unit problem and the uncertain geographic context problem. Recent research has emphasized the importance of moving beyond static, administratively defined boundaries by using dynamic or behaviour-based spatial units40,41. Advances such as GPS-derived activity spaces, ecological momentary assessment and wearable sensor data now allow for more individualized and temporally sensitive exposure assessment. Given the nature of the available data, we were not able to measure NDVI or park accessibility at the individual level, instead relying on three-digit zipcode estimates. This approach may not fully capture the uneven distribution of green spaces across different areas. Future research should aim to link individual-level physical activity data with individual-level green space exposure; for example, through using geolocation-enabled devices. Finally, all data were collected before the COVID-19 pandemic, which represents a strength in that it avoids major disruptions to physical activity patterns caused by lockdowns, remote working/schooling or changes in commuting behaviour. However, it also raises questions about generalizability. Recent research suggests that average step counts and exercise routines may not have fully returned to pre-pandemic levels42. Although absolute activity levels may have shifted, the structural relationships between green space access and physical activity are likely to persist; they may even have become more pronounced since outdoor spaces gained importance for safe recreation during and after the pandemic43. Future research should examine whether the same associations hold under post-pandemic conditions.

Despite these limitations, the data sources used in our study demonstrate the critical value of using wearable device data to reveal relationships between green space exposure and physical activity at a finer-grained level than has heretofore been available. Although socially disadvantaged populations currently have less access to wearable devices than those of higher socioeconomic status, the broadening availability of a range of wearable devices, including step counter sensing on mobile phones, indicates that this gap is progressively diminishing, with their adoption having increased across diverse populations44,45. Future studies will therefore probably have access to a broader range of wearable data from more heterogeneous segments of the population, including under-represented groups. Our study shows how large-scale, nationwide wearable data can be leveraged to examine the impact of park availability and urban green spaces on physical activity across individuals and cities over time. With rapid urbanization and increasing urban densification, our findings suggest that, if further investigations support and extend these findings, improving access to parks could be an impactful public health intervention enabled by urban design and planning to alleviate the sedentary pandemic.

Methods

Study participants

We analysed anonymized retrospective data collected from Fitbit users between 1 January 2017 and 31 December 2019 through the All of Us Research Program18. Participants over the age of 18 years were enroled in the programme after providing primary consent. Those who owned a Fitbit device had the option to share their Fitbit data by linking their Fitbit account to the All of Us Participant Portal. Participants agreed to share both real-time and retrospective data from their Fitbit devices. To protect privacy, all participant information was de-identified and the data were reported as daily step counts. A detailed description of the data collection process is available in the All of Us Research Program report18.

The All of Us data provide Fitbit user data linked to metropolitan areas based on the three-digit zipcode of each participant. We restricted our analysis to 53 metropolitan areas, each of which may encompass multiple three-digit zipcode zones, with at least 30 users (Extended Data Fig. 2). Since individual daily step counts showed minimal variation over short periods, we aggregated the daily step data by month.

Step counts and activity intensity

Although Fitbit devices show greater variability in data quality compared with research-grade actigraphy, they outperform other commercially available devices in accurately recording step counts46,47. To minimize the impact of device malfunction and improper use, we implemented a systematic quality control process for the Fitbit step data. First, we excluded records from users with fewer than 180 days of data during the study period from 1 January 2017 to 31 December 2019, resulting in the removal of 0.7% of the data sample. Second, we removed step count outliers, specifically records with daily step counts below 100 or above 20,000, which accounted for 1.2% of the data. Daily totals of <100 steps (non-wear) and >20,000 steps were coded as outliers (<0.4% of person days) and set to missing. The upper threshold lies well above the 99th percentile in the present data and exceeds the 13,500-step cut-off point that encompassed 99% of observations in a large cohort of US women48. Third, to avoid the effects of prolonged interruptions and data loss, we discarded records where monthly data completeness was less than 50%, excluding an additional 2.7% of the sample. Finally, we applied the median absolute deviation (MAD) method to further filter out outliers49,50. Specifically, we calculated MAD on a monthly basis using equations (1) and (2). In these equations, Xi is the step count at day i, ̃ \(\widetilde{X}\) is the median of Xi in 1 month and b = 1.4826, a constant linked to the assumption of normality of the data, disregarding the abnormality induced by outliers49. We defined the outlier threshold based on the deviation of step counts from a multiple of the MAD, with a multiplier of three, following previous studies50. In this step, we excluded 1.9% of the data.

$$\mathrm{MAD}=b\times \mathrm{median}(|{X}_{i}-\widetilde{X}|)$$
(1)
$${X}_{i} < \widetilde{X}-3\times \mathrm{MAD}\,\mathrm{or}\,{X}_{i} > \widetilde{X}+3\times \mathrm{MAD}$$
(2)

In addition to daily step counts, Fitbit provides estimates of daily time spent partaking in physical activities of different intensity levels for each participant (Extended Data Fig. 1). These classifications are based on metabolic-equivalent-of-task values—a widely accepted measure of activity intensity51: sedentary, lightly active, fairly active and very active. We excluded sedentary minutes from out analysis because this category includes sleep, which does not accurately capture sedentary behaviour in the context of physical activity research52.

After data cleaning, we finally gathered 167,334 average daily step records and 374,454 activity duration records from 7,013 participants in 53 US metropolitan areas. The average monitoring duration for participants was 588 days (approximately 19.6 months), with a median of 590 days and an IQR of 277–934 days. On average, participants recorded 7,655 steps per day.

Nature exposure

We quantify exposure to nature using two key metrics: greenness and park accessibility. Although these metrics do not encompass the full complexity of nature, they capture two significant components commonly associated with urban nature53. We use the NDVI, a widely applied indicator for vegetation54 as our measure of greenness. To complement NDVI, we use a metric of park accessibility encompassing information about the existence of parks, their distance from population centres and their connectivity to one another55.

NDVI quantifies greenness with values that range from −1 to +1. Values closer to 1 indicate more greenness, whereas values below zero indicate land-use types other than vegetation. We obtained monthly average NDVI values for the USA between 2017 and 2019 from the National Oceanic and Atmospheric Administration Climate Data Record database at a spatial resolution of 0.05° (5,600 m at the equator)56. We then calculated monthly average NDVI values for all three-digit zipcode areas across the 53 metropolitan areas (Extended Data Fig. 3 and Supplementary Table 2).

Although NDVI is effective at estimating clustered greenery, such as forests with dense tree cover, it is less effective for sparse greenery, such as shrubs or small stands of trees. Also, our dataset spans various ecoregions, including arid areas with sparse tree cover and less green vegetation, where NDVI is a less useful indicator of nature exposure. Moreover, NDVI cannot distinguish between publicly accessible greenery and restricted greenery on private property, such as backyard greenery. Therefore, we included park accessibility as a second metric of nature exposure. We collected publicly accessible park data across the contiguous USA from the Trust for Public Land ParkServe database. This dataset includes data on around 145,000 parks in the USA, ranging from small municipal parks that provide recreational and sports facilities with little or simplified nature to national parks that preserve vast landscapes and have high biodiversity.

Research has shown that people are more likely to visit parks when they are closer to their homes, with visitation frequency decreasing as the distance increases—an effect known as distance decay57. To quantify this relationship, we modelled the distance decay effect between urban parks and the population using a Gaussian function (equation (3))58, where dij represents the distance between park j and the centroid of census block group (CBG) i. In this model, d0 is a customized search distance from the CBG centroid, set to 1 km in our study, which aligns with the commonly acceptable walking distance for most people59.

We calculated park accessibility as an integrated measure incorporating park area, the distance between parks and CBGs and the walkability of each CBG (equation (4))58. Each three-digit zipcode area comprises multiple CBGs (Extended Data Fig. 2). We then aggregated park accessibility to the mean value at the CBG level and aligned it with the corresponding three-digit zipcodes, enabling linkage with participants’ step count data for statistical analysis. Extended Data Table 1 presents the mean park accessibility for three-digit zipcode areas within metropolitan areas.

$$f\left({d}_{{ij}},\,{d}_{0}\right)=\frac{{e}^{-\frac{1}{2}{\left(\frac{{d}_{{ij}}}{{d}_{0}}\right)}^{2}}-{e}^{-\frac{1}{2}}}{1-{e}^{-\frac{1}{2}}}\,\mathrm{if}\,{d}_{{ij}}\le {d}_{0}$$
(3)
$${\mathrm{PA}}_{i}={\mathrm{WI}}_{i}\times {\sum }_{i\in \left\{{d}_{{ij}}\le {d}_{0}\right\}}\left({A}_{j}\times f\left({d}_{{ij}},\,{d}_{0}\right)\right)$$
(4)

where PAi is the park accessibility index for CBG i, WIi is the walkability index for CBG i, Aj is the park area (km2) for park j and \(f\left({d}_{{ij}},\,{d}_{0}\right)\) is the distance-weighted decay function based on the Euclidean distance from the centroid of CBG i to park j.

Park accessibility and NDVI both vary across the 53 metropolitan areas (Fig. 2, Extended Data Fig. 3 and Supplementary Table 2) and our findings show that metropolitan areas with higher park accessibility are not always greener (Extended Data Fig. 4). The median park accessibility score is 2.76 (IQR: 1.45–5.89) (Extended Data Fig. 8). Extended Data Fig. 9 illustrates representative three-digit zipcode areas at the minimum, 25th percentile, median, 75th percentile and maximum values, displaying their corresponding walkability, park area ratio and park accessibility scores.

Confounding variables

For each metropolitan area, we collected information about variables that may also affect physical activity, including temperature60, precipitation61, population density62, walkability63 and air quality64. We obtained monthly temperature and precipitation data for each three-digit zipcode area from the National Oceanic and Atmospheric Administration Climate Data Record dataset. We calculated population density as the ratio of the total population of a metropolitan area to its total area. We obtained population data and metropolitan area size data from the US Census Bureau 2014–2018 American Community Survey five-year estimates65. We used walkability scores from the Environmental Protection Agency National Walkability Index dataset for each three-digit zipcode area66. We used the annual median AQI to represent the general air quality condition for each metropolitan area67. We also collected individuals’ demographic and socioeconomic characteristics from the All of Us dataset, including age, gender, race, education, household income and employment status. Sociodemographic information was collected from participants through initial surveys in the All of Us dataset.

Multilevel analysis

To examine the within-person association of green spaces with step count, we conducted a multilevel analysis and nested daily step counts as well as daily time spent partaking in physical activity of different intensity levels (level 1) within participants (level 2) and metropolitan areas (level 3). Our primary predictors of interest were park accessibility (level 3) and NDVI (level 1). To account for other potential influences on monthly step counts and activity time, we included the covariates temperature (in degrees Celsius), temperature squared and precipitation (in 1,000 mm; all monthly at level 1). Level 2 covariates included age (in years), gender (binary: male = 1; female = 0), race (binary: White = 1; non-White = 0), education level (binary: college degree or higher = 1; otherwise = 0), household income (in US$1,000) and employment status (binary: employed = 1; not employed = 0). To account for between-city variation (level 3), we included variables such as walkability score, population density (1,000 people per km2), and air quality (AQI score). Park accessibility was standardized to a range of 0–1. Thus, a value of 0 represents the three-digit zipcode area with the lowest park accessibility and 1 represents the three-digit zipcode area with the highest park accessibility. Intermediate values reflect proportional positions within this observed range. NDVI, temperature, temperature squared and precipitation were aggregated to the monthly mean within each three-digit zipcode region to differentiate within- from between-region effects. We first incorporated random effects for the intercept and each predictor and subsequently deleted non-significant random effects. The final model is detailed in equation 5:

$$\,\begin{array}{l}{Y}_{ijk}{=}{\beta }_{{000}}{+}{\beta }_{{001}}{\times }{\rm{park\,accessibility}}_{k}{+}{\beta }_{{002}}\\ {\times }{\rm{walkability}}_{k}{+}{\beta }_{{003}}{\times }{\rm{population\,density}}_{k}{+}{\beta }_{{004}}{\times }{\rm{AQI}}_{k}\\ {+}{\beta }_{{010}}{\times }{\rm{age}}_{jk}{+}{\beta }_{{020}}{\times }{\rm{male}}_{jk}{+}{\beta }_{{030}}{\times }{\rm{income}}_{jk}{+}{\beta }_{{040}}{\times }{\rm{White}}_{jk}\\ {+}{\beta }_{{050}}{\times }{\rm{college}}_{jk}{+}{\beta }_{{060}}{\times }{\rm{employment}}_{jk}{+}{\beta }_{{100}}{\times }{\rm{NDVI}}_{ijk}{+}{\beta }_{{200}}\\ {\times }{\rm{temperature}}_{ijk}{+}{\beta }_{{300}}{\times }{\rm{temperature\,squared}}_{ijk}{+}{\beta }_{{400}}{\times }{\rm{precipitation}}_{ijk}\\ {+}{u}_{{0}j}{+}{u}_{{1}j}{\times }{\rm{park\,accessibility}}_{k}{+}{v}_{{0}k}{+}{v}_{{1}k}{\times }{\rm{park\,accessibility}}_{k}{+}{\epsilon }_{ijk}\end{array}$$
(5)

where Yijk represents the daily step count or daily minutes spent partaking in physical activity of different intensities (lightly, fairly and very active) for person j from city k at time i. Beta coefficients represent the intercept (β000), the effects of our primary predictors (park accessibility and NDVI) and the effects of covariates that control for within-participant effects (level 1), between-participant effects (level 2) and between-city effects (level 3). Random effects were included to account for individual- and city-level variation in the effect of park accessibility on the daily step counts or activity time. The random intercepts for daily steps or activity time at the individual and city level are denoted as u0i and u0k, respectively. The random slopes that reflect the association between park accessibility and daily step counts or activity time within individuals and between cities are denoted as u1j and v1j, respectively.

Reporting summary

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