The Effect of Temperature on Physical Activity: An Aggregated Analysis of Smartphone Users in Five Major Chinese Cities

Physical activity is an important factor in premature mortality reduction, non-communicable disease prevention, and well-being protection. Climate change will alter temperatures globally, with impacts already found on mortality and morbidity. While uncomfortable temperature is often perceived as a barrier to physical activity, the actual impact of temperature on physical activity has been less well studied, particularly in China. This study examined the associations between temperature and objectively measured physical activity among adult populations in ve major Chinese cities. Methods: Aggregated anonymized step count data was obtained between December 2017-2018 for ve major Chinese cities: Beijing, Shanghai, Chongqing, Shenzhen, and Hong Kong. The associations of temperature with daily aggregated mean step count were assessed using Generalized Additive Models (GAMs), adjusted for meteorological, air pollution, and time-related variables. Results: Signicant decreases in step counts during periods of high temperatures were found for cold or temperate climate cities (Beijing, Shanghai, and Chongqing), with maximum physical activity occurring between 16-19.3°C. High temperatures were associated with decreases of 800-1500 daily steps compared to optimal temperatures. For cities in subtropical climates (Shenzhen and Hong Kong), non-signicant declines were found with high temperatures. Overall, females and the elderly demonstrated lower optimal temperatures for physical activity and larger decreases of step count in warmer temperatures. should temperatures in high temperatures, steeper decreases of physical activity were found in hot temperatures compared to cold temperatures. In Hong Kong, a non-signicant association was found between temperature and step count, however, a marginally signicant curvilinear association was found with optimal temperatures at 21.9°C when the city-specic air pollution index (AQHI) was taken out of the model, and a signicant negative association was found in high apparent temperatures. Optimal percentile temperatures ranged between 48th percentile in Chongqing to 68th percentile in Beijing. Other results remained largely consistent in the sensitivity analyses.


Introduction
The public health burden of hot and cold temperatures has been documented by studies showing impacts on excess mortality (1)(2)(3)(4)(5), hospital admissions (3, 6-8), as well as help-seeking behaviour (9). However, much less has been discussed about the impact of temperatures at the level of daily human activity. Physical activity is an important factor for premature mortality reduction, as insu cient physical activity is attributed to be responsible for an estimated 9% of premature deaths worldwide (10). Furthermore, physical activity plays an essential role in preventing non-communicable disease and enhancing well-being (11)(12)(13). Poor weather has often been described as a 'barrier to physical activity' in qualitative studies (14,15), and research has shown that objectively-measured physical activity can be affected by temperatures (14,(16)(17)(18)(19). However, few studies have been conducted in the Asia, particularly in China, although this relationship may vary across different climates and regional contexts.
With a population of 1.4 billion people as of 2019 (20), China currently has the largest population worldwide. Over the recent decades, the physical activity levels of the population have decreased, particularly in more urbanized areas (21). A study found that work-and household-physical activity decreased by nearly half between 1991 and 2011, while active leisure and transport physical activity did not see a meaningful change in the same period (22). The recent Tsinghua-Lancet Commission on healthy cities in China calls for integration of health into all policies, including the increased facilitation of physical activity (21).
With climate change, temperatures in China are predicted to increase by 2.3°C to 3.3°C from 2000 to 2050 (23), increasing the occurrence of extremely hot temperatures in the coming decades. Yet there is a lack of understanding about the relationship between temperature and physical activity in China. Previous studies had only assessed small samples of the population (24,25), or observed physical activity ecologically in speci c locations such as public parks (26). A more comprehensive Physical activity data Anonymous secondary data on physical activity was collected from the mobile application Wechat's in-app function WeRun ( ) for the duration of the study period. Wechat is an app commonly used by smartphone users in China, regardless of age. The in-app function WeRun is a voluntary addition that enables users to compare tness levels with their community and reads from the step count data of the phone's health applications (iPhone or Android) or other data sources such as smartwatches, as allowed by the user. Both the iPhone and Android phones have been validated against regularly accepted pedometers and accelerometers in eld-based research (33,39). These studies have found comparable estimates in both laboratory and freeliving environments, although the mobile phone-proxy estimates may be liable to underestimation due to inconstant phone carrying (33,39).
The secondary physical activity data was collected from users who had speci cally enabled the tness tracking function of WeRun, authorizing the collection of their daily step counts. All data was anonymized prior to retrieval and only collected in aggregate form to protect personal privacy. Aggregated mean daily step counts were obtained for each city from anonymized users of the in-app function who were located in the city at night (10 pm). Aggregated mean daily step counts were also obtained strati ed by gender and age group (18-64, 65+) along with the number of anonymized users included in each aggregate value.
Weather and pollutant data Meteorological data were obtained from the China Meteorological Administration for the following stations for the mainland Chinese cities: Beijing (ID: 54511), Shanghai (ID: 58362), Chongqing (ID: 57516), and Shenzhen (ID: 59493). Data from Hong Kong was obtained from the Hong Kong Observatory. Daily mean temperature was used as the main exposure for this analysis, and also adapted into apparent temperature and percentile temperature of the study period. Apparent temperature was calculated from temperature and relative humidity using the following formulas, where T = temperature and RH = relative humidity (40,41): Other daily meteorological covariates obtained from the meteorological stations included: mean relative humidity, total rainfall, mean wind speed, mean atmospheric pressure, and total sunshine hours. A square root transformation was done for rainfall and windspeed, in order to reduce the effect of outliers. Extreme weather event information on typhoon days were incorporated as binary indicators from a WMO report on China and the Hong Kong Observatory (42)(43)(44). The occurrence of super typhoon Mangkhut was included separately due to the severity of the storm, which made landfall in Shenzhen and Hong Kong on Sept 16, 2018.
Air pollution data was obtained from China National Environmental Monitoring Center network (CNEMC) and Hong Kong Environmental Protection Department. An air quality index was used instead of individual air pollutant variables, to reduce possible collinearity. In China, the Air Quality Index (AQI) is based on the concentration levels of six pollutants (SO2, NO2, PM2.5, PM10, CO, O3) and reported using a scale of 1-300+ (45). All hourly AQI values were aggregated to the daily level and further log-transformed to adjust for the right skew. Missing variables were imputed using a simple moving average for consecutively missing data of twelve hours or less. Longer consecutive missing data were left as missing. The imputation was completed with the R package 'imputeTS'. In Hong Kong, the Air Quality Health Index (AQHI) was used, based on the concentration levels of four pollutants (SO2,NO2, O3, and particulate matter) and reported using a scale of 1-10+ (46). Hourly AQHI values were available for twelve general stations located throughout the city, which were averaged together to indicate the daily value for the entire city. For values '10+', a value of 12 was used in the daily aggregation. The Tap Mun monitoring station was not included, as its rural location is not re ective of the residence of the general population.
Time-related variables, such as month, day of week (DOW), and public holiday, were included to control the analysis. Mainland China had extra workdays to compensate for extended holiday periods, which were adjusted for in the analysis as well (47). A city-wide marathon was included as a special event in Hong Kong during the study period and adjusted for in the analysis (48). The authors were unable to identify the occurrence of city-wide events in the other Chinese cities during the study period.

Statistical analysis
The associations of temperature were assessed on aggregated mean daily step count, adjusted by other meteorological conditions, air pollution index, and time-related variables. A stepdown analysis was conducted separately for each city using Generalized Additive Models (GAMs). Meteorological covariates with the highest p-value were removed in each model, until no variables with p-value over 0.1 remained. The AIC was also compared between models to ensure the model quality did not decrease. Air pollution index and time-related variables were kept in the model as control variables. The full model had a formula as follows: s() indicates the smoothing function of continuous independent variables in R package "mgcv" k indicates the basis dimension for the smooth, such that k-1 is the maximum degrees of freedom considered for the variable factor() indicates the categorical independent variables; variables were excluded if irrelevant to the city The analysis was further strati ed by gender and age group. Sensitivity analyses assessed the 1) effect of apparent temperature, 2) effect of percentile temperature, 3) removal of air pollution index, and 4) removal of outlier data caused by Typhoon Mangkhut in Shenzhen and Hong Kong. Statistical signi cance level was set at p ≤ 0.05. All analyses were conducted using R version 3.5.2 (49), using the package "mgcv" (gam) (50).

Descriptive statistics
The study period was from Dec 6, 2017 to Dec 31, 2018. The average amount of anonymized users included during the study period were 11.1 million for Beijing, 9.6 mil for Shanghai, 2.8 mil for Chongqing, 4.9 mil for Shenzhen and 0.4 mil for Hong Kong. Compared to census data, the study samples in all ve cities had a comparable gender distribution with their respective general populations (see Table 1). However, the sample populations tended to be signi cantly younger than the general population. Note: Chi-square test was used to measure the overall difference in proportion between the sample and 2018 population data.
Population age group categories were based on the available census data per city; no age group data was found for Shenzhen.
Note: Chi-square test was used to measure the overall difference in proportion between the cities.
\ indicates the absence of data.

Main model
The nal models for Beijing, Chongqing, and Hong Kong underwent a stepdown process, in which atmospheric pressure and relative humidity were removed (see Table 3). For Shanghai and Shenzhen, no changes were required from the full models.  Table 4 and Figure 1). During periods of high temperature, populations in Beijing, Shanghai, and Chongqing had signi cantly lower physical activity compared to optimal temperatures, while no signi cant associations were found in Shenzhen and Hong Kong. In periods of low temperatures, while populations in Beijing, Shanghai, and Shenzhen also found signi cantly lower step counts compared to optimal temperatures, the amount of decrease was less than in hot temperatures. The optimal temperature of peak step counts varied slightly between cities. In Beijing, the estimate of optimal temperature was at 19.3°C, with a change in -386.0 steps (95% CI: -626.6, -145.5) for a 10°C increase from optimal temperature. In Shanghai, the optimal temperature was 17.9°C, with a change in -432.7 steps (95% CI: For other meteorological variables, higher relative humidity was negatively associated with step counts in Shanghai, Chongqing, and Shenzhen in a non-linear manner (see Figure S1). High relative humidity in Beijing had a non-signi cant association with average step count. Rainfall and windspeeds were negatively associated with daily step count in all ve cities, while daily sunshine hours were positively associated with step count, with a particularly strong association observed in inland Chongqing. Where atmospheric pressure remained in the model, it was found to be positively associated with step counts in Shenzhen and Shanghai. The air pollution index was signi cantly associated with physical activity levels in all cities except Beijing. Overall, the nal model of these cities explained 73% to 88% of the variance in daily mean step counts (see Table 4 for model information).

Strati ed analyses
When strati ed by gender, a lower optimal temperature was found among females than males in all four cities with curvilinear associations (Beijing, Shanghai, Chongqing, and Shenzhen) (see Table 5). A slightly larger decline in step counts was found in Beijing among females at 10°C above the optimal temperature (28.7°C, change in steps: -405.4; 95% CI: -641.1, -169.6).
Alternately, in Shenzhen a slightly larger effect was found among females at 10°C colder temperatures from optimal (13.5°C, change in steps: -338.1; 95% CI: -629.9, -46.4). In Hong Kong, the associations among both males and females remained nonsigni cant.
When strati ed by age group, a lower optimal temperature was also found for the elderly over 65 in all cities with curvilinear associations (Beijing, Shanghai, Shenzhen, Hong Kong). In Chongqing, the association among the elderly was no longer inverse U-shaped, but had a steep signi cant negative slope. Additionally, in warmer temperatures, the elderly were associated with a markedly larger decrease in step counts compared with the adult age group (aged 18-64), with an approximate additional reduction of ~70 steps in Beijing and Shanghai and ~1200 steps in Chongqing. Furthermore, in Shenzhen and Hong Kong, the association of decreased step counts in warm temperatures was found signi cant among the elderly, while still remaining nonsigni cant among the adults. In cold temperatures, there was no clear difference between the elderly and adults in most cities, except in Shenzhen, where the elderly were associated with a larger decrease in step counts with an approximate additional 130~ steps.

Sensitivity analyses
Several sensitivity analyses were conducted including 1) examining the effect of apparent temperature and 2) examining the effect of percentile temperature, 3) removal of air pollution index, and 4) removal of outlier data caused by Typhoon Mangkhut in Shenzhen and Hong Kong on Sept 16, 2018. The results were largely consistent with the primary ndings (see Table 6).
For apparent temperature models, the AIC was higher than for the original models in all cities aside from Hong Kong. A slightly higher optimal apparent temperature was found in Beijing, Shanghai, and Shenzhen. A slightly lower optimal apparent temperature was found in Chongqing, although the effect at +10°C was no longer signi cant. In Hong Kong, the effect at +10°C from 20°C was to signi cantly decrease step counts by -83.  Note: BJ = Beijing, SH = Shanghai, CQ = Chongqing, SZ = Shenzhen, HK = Hong Kong; OptT = optimal temperature; CI = con dence interval; df = degrees of freedom; AIC = Akaike information criterion. The model for each city was adjusted for relative humidity#, precipitation, windspeed, pressure#, sunshine, AQI/AQHI, month, day of week, public holiday, extra workdays, typhoon, super typhoon, and marathon (#some cities had these variables removed in the stepdown process). Percentile temperatures were set to 10 th and 90 th percentiles for analysis.
a Where association was not curvilinear, the optimal temperature was pre-set to 20°C or 50 th percentile.

Discussion
Inverse U-shaped associations of temperature on city-wide aggregated step counts in four of ve Chinese cities (Beijing, Shanghai, Chongqing, and Shenzhen) were found, with signi cant decreases in high temperatures for three cities (Beijing, Shanghai, and Chongqing).
Step counts peaked at optimal temperatures ranging from 16.0°C in Chongqing, 17.9°C in Shanghai, 19.3°C in Beijing, to 24.2°C in Shenzhen. In warm temperatures, average decreases of 322 to 433 steps were found for those cities at 10°C increase from optimal temperature, while temperatures in Shenzhen did not extend high enough to nd a signi cant association. Among cities with a signi cant decrease in high temperatures, steeper decreases of physical activity were found in hot temperatures compared to cold temperatures. In Hong Kong, a non-signi cant association was found between temperature and step count, however, a marginally signi cant curvilinear association was found with optimal temperatures at 21.9°C when the city-speci c air pollution index (AQHI) was taken out of the model, and a signi cant negative association was found in high apparent temperatures. Optimal percentile temperatures ranged between 48th percentile in Chongqing to 68th percentile in Beijing. Other results remained largely consistent in the sensitivity analyses.
Only a few temperature-physical activity studies have previously been conducted in China or in the Asian region. Two studies located in Japan had similarly found curvilinear associations between temperature and step counts, with step counts peaking between 17°C and 20.7°C (19,51). A study from Harbin, China, a city in the far north with a very cold climate, found a positive association during the spring months between temperature and the intensity of activity and number of active persons in the public park (26). A previous study in Beijing found no seasonal variation and hourly association between temperature and average physical activity among 40 Chinese participants of an accelerometer study (25). However, the study seemed to only consider the possibility of a linear association using general linear models. In Hong Kong, a study on Pokémon Go users found a signi cant negative association between temperature and daily distance travelled in the summer (24), while the negative association in our study was non-signi cant.
In other published multi-location studies, a trail study across the USA found increasing optimal temperatures with warmer American-centric climate regions (18 This study found that optimal temperatures for physical activity ranged between 48th to 68th percentile, with the highest percentile found in Beijing. As indicated by Beijing's climate classi cation Dwa, the 'a' demonstrates hot summer temperatures in an overall cold snow climate zone 'D' (52). This produces a wider temperature range than other cities, as seen in Table 2.
With half of days having mean temperatures below 12°C in Beijing, the population may seek to take advantage of the warmer temperatures and other connected weather conditions (increased daylight hours, absence of icy surfaces etc.) to conduct more active leisure activities (53), leading to the ndings of a greater increase of physical activity in warmer temperatures and higher optimal temperature than other cities. Additionally, the inter-city variations in physical activity patterns seem to demonstrate population adaptation to local climates (54) and may have also been in uenced by variations in infrastructural or spatial patterns of the urban environment, such as the city density and urban sprawl (55). As mentioned in a Beijing study on travel behaviour, the built environment can signi cantly affect people's allocation of time and pursuit of activities (56).
In the strati ed analyses, lower optimal temperatures were found among females in all cities with curvilinear relationships. This is a new nding, as previous studies that strati ed by gender did not assess for a difference in optimal temperature between genders (51,53,57,58). Only one study stratifying by gender found overall lower step counts among females compared to males (51), while other studies did not nd clear differences in temperature-related physical activity between males and females (53,57,58). Our study also found that elderly over 65 had lower optimal temperatures and larger decreases of step count in warmer temperatures compared with the adult age group. These ndings are consistent with several previous studies that strati ed by age and found stronger temperature effects among those over 65, particularly over 80 (51,59,60). These are also aligned with the physiological understanding of a lower heat tolerance among older adults due to a decreased capacity to thermoregulate (61, 62).

Strengths and limitations
This was the rst multi-location comparative study on temperature and physical activity located in China and in Asia. This study demonstrated a decrease of daily physical activity in high temperatures using aggregated objectively measured step counts from a large, anonymized sample size. The data collection method ensured that anonymized users were located in the respective cities in order to be included in the analysis. A non-linear statistical analysis allowed for exible associations between temperature and physical activity, as well as all other meteorological variables. The analysis comprised over a year's duration, covered all seasons, and controlled for time-related variables and holidays and special events (typhoons and marathons) where feasible.
However, this study's data collection was limited to only those who voluntarily downloaded the mobile application, and may have skewed towards the health-conscious, able-bodied (no mobility problems), younger, and more active subset of the population. This can be seen by the relatively high average daily step count of each city and the skewed age distribution compared to the general population, and suggests that this study may underestimate the temperature effect, particularly among more vulnerable populations. The accelerometer could only collect information on ambulatory activities when the phone was located with the person and was unable to account for any cycling or aquatic activities. As this study could not control for whether the anonymized users kept their phones on them, the aggregation from a large data sample could be an underestimation of actual physical activity levels. Finally, the aggregated data could not control at the individual participant level and would have included any visitors or temporary stay individuals who used the in-app function and were located in the city during any evenings of the study period.

Future research directions
Future studies should assess the temperature-physical activity relationship in more climate and geographically diverse locations of China and other regions. An increased understanding is needed on the role of urban planning and spatial patterns in affecting the relationship between temperature and physical activity. Extreme temperature events could be assessed in warmer subtropical climate locations like Shenzhen and Hong Kong, to elucidate the effect of extreme temperatures. Furthermore, the singular effect of the super typhoon in these two cities also hints at the large impact that extreme weather events can have on population physical activity patterns. With climate change and an increased frequency of heat waves, typhoons, storms, and other climate-related hazards, there may be increased days where population activity is lowered by such extreme events. Studies could further examine and project the impact of physical activity in extreme weather events.

Conclusions
This study demonstrated that the public health burden of cold and hot temperatures extended to physical activity, an important health behaviour for populational well-being. An association between temperatures and physical activity was found in the major cities in China, with physical activity peaking between 16°C to 19.3°C in temperate climate cities. The impact of temperature seemed to be greater in climates with wider temperature ranges, whereas cities in subtropical climates did not have signi cant declines in step counts on days with high temperatures. On days with extremely hot temperatures, the mean step counts of the city population decreased as far as 800 to 1500 steps compared to the optimal temperature. With increasing temperatures from climate change, cities could possibly see a reduction in their population physical activity levels, as the temperatures shift higher than the optimal temperature for physical activity. The impact of these minor reductions in physical activity could subsequently lead to consequential health effects. Awareness of decreased physical activity in cold and heat would help formulate adaptations to the promotion of physical activity in China. Healthcare providers should be informed to provide appropriate physical activity recommendations and heat prevention measures. Recommended city-wide interventions include increased access to indoor recreational facilities and urban design measures to alleviate the heat and to support sustainable physical activity levels in the face of climate change.

Declarations
Ethics approval: Ethics approval on the secondary data was obtained from the Survey and Behavioural Research Ethics Committee of The Chinese University of Hong Kong.
JYH, WBG, PKHM and EYYC contributed to the conceptualization, design, interpretation, and writing. JYH acquired and analysed the data. All authors read and approved the nal manuscript.

Figure 1
Relationships between temperature and daily step count in ve Chinese cities Note: The model for each city was adjusted for relative humidity#, precipitation, windspeed, pressure#, sunshine, AQI/AQHI, month, day of week, public holiday, extra workdays, typhoon, super typhoon, and marathon (#some cities had these variables removed in the stepdown process). Black markings along the x-axis indicate the actual existing temperature data of each city; Vertical red dotted lines indicate the identi ed optimal temperature; Grey shading indicates the 95% con dence interval.

Supplementary Files
This is a list of supplementary les associated with this preprint. Click to download. Supplementalmaterial.docx