Visualization, Spatiotemporal Patterns, and Directional Analysis of Urban Activities Using Geolocation Data Extracted from LBSN

: Location-based social networks (LBSNs) have rapidly prevailed in China with the increase in smart devices use, which has provided a wide range of opportunities to analyze urban behavior in terms of the use of LBSNs. In a LBSN, users socialize by sharing their location (also referred to as “geolocation”) in the form of a tweet (also referred to as a “check-in”), which contains information in the form of, but is not limited to, text, audio, video, etc., which records the visited place, movement patterns, and activities performed (e.g., eating, living, working, or leisure). Understanding the user’s activities and behavior in space and time using LBSN datasets can be achieved by archiving the daily activities, movement patterns, and social media behavior patterns, thus representing the user’s daily routine. The current research observing and analyzing urban activities behavior was often supported by the volunteered sharing of geolocation and the activity performed in space and time. The objective of this research was to observe the spatiotemporal and directional trends and the distribution di ﬀ erences of urban activities at the city and district levels using LBSN data. The density was estimated, and the spatiotemporal trend of activities was observed, using kernel density estimation (KDE); for spatial regression analysis, geographically weighted regression (GWR) analysis was used to observe the relationship between di ﬀ erent activities in the study area. Finally, for the directional analysis, to observe the principle orientation and direction, and the spatiotemporal movement and extension trends, a standard deviational ellipse (SDE) analysis was used. The results of the study show that women were more inclined to use social media compared with men. However, the activities of male users were di ﬀ erent during weekdays and weekends compared to those of female users. The results of the directional analysis at the district level reﬂect the change in the trajectory and spatiotemporal dynamics of activities. The directional analysis at the district level reveals its ﬁne spatial structure in comparison to the whole city level. Therefore, LBSN can be considered as a supplementary and reliable source of social media big data for observing urban activities and behavior within a city in space and time.


Introduction
Social media has dramatically expanded in popularity around the world and produced a massive amount of social media big data with the association of a spatial context (human dynamics and mobility behaviors within the urban context) to check-ins and posts. Historically, to study urban activities behavior, traditional methods (i.e., survey, census) [1,2] were adopted, but these methods are more expensive and laborious, and too often result in data sparsity, which in turn requires longer processing time. Due to these limitations, traditional methods are considered to be less effective for studying urban activities behavior.
For urban activities behavior, precise measures and indictors are required along with a spatially unambiguous methodology, as urban activities behavior are considered to be related to multiple dimensions: urban and environmental topographies and human activity. Big data [3,4] (i.e., location-based social networks (LBSNs) and points of interest (POI))-characterized by high volumes of data, comprising geolocations, and being readily open-source-are providing an opportunity for spatially unambiguous methodologies to measure human activities behavior. In LBSNs, users can announce their geolocation and activity performed based on the venue type and venue category as a check-in [5]. This geolocation-based social media check-in phenomenon generates a massive amount of data, also referred to as social media big data [6]. Regardless of the fundamental limitations (i.e., biases in sex, low sampling rates, and biases in venue location and venue type) of researching human check-in and urban activities behavior [7], LBSN check-in data can uncover urban activities behavior in space and time. LBSN data, including geolocation, venue location, and venue type, are available at a much lower cost in comparison to the aforementioned traditional methods when observing and analyzing urban activities behavior.
The development of LBSNs has progressed rapidly due to the integration of smartphones, which allow for the fast sharing of information about what, where, why, and with whom users share information. The sharing of a users' current location and their ability to discover their friends' locations has raise concerns related to user privacy [8,9]. However, LBSN privacy primarily depends on the legislative and business-oriented actors involved in data sharing. Although privacy is an individual issue, some of the personal data are shared unintentionally or willingly by the user [10,11]. Sometimes, data are deliberately or voluntarily made public by users [12]. Thus, LBSN data offer new dimensions for observing urban activities behavior and can be helpful for creating new analysis methods as well as representing urban activities behavior. A variety of studies [13][14][15] were conducted to examine the demographics and spatial context of users and to identify the factors that lead different users (men and women) to use social media. These studies highlighted some of the motivations that can influence the change in behavior of the use of social media networks between users (men and women). Smith [16] showed that women are more inclined to use social media for increased levels of connectivity with their families compared to men. Muscanell and Guadagno [17] showed that male users are more inclined to use social media for forming new relationships, whereas female users are more inclined to use it for relationship maintenance.
In terms of social media in relation to different urban activities, slightly different behavior (usage patterns and motivation) is observed between sexes. Hwang and Choi [18] explored the online behavior of college students on Weibo and the motivations of usage by sex, and suggested that Weibo acts as a tool for searching for information about social concerns and benefits. Saleem et al. [19] explored prominent locations of use and introduced a method for determining location influence, with the ability to reach out geographically using LBSN data. They proposed a memory-efficient algorithm that provided in an efficient and scalable process for gathering diverse sets of locations with a broad geographical spread. Research based on social media evidence showed that positive effects are observed in a male user's potential involvement when searching for useful information related to entertainment and expressiveness; however, the positive effects observed in female users are for meeting new people and entertainment [20].
Historically, research based on urban geography and activities behavior related to the Weibo dataset has been limited in comparison to Facebook and Twitter. However, this research started to increase in China as of 2015, mainly focusing on the characteristics of people in scenic spots, for example, analyzing the spatiotemporal distribution and spatial autocorrelation of tourists with different attributes in the scenic area [21]. Urban perception research explored the positive and negative attitudes of people toward urban style using the semantic analysis method [22]; for work-life balance, the relationship between home and work was tested in the space and time of check-ins and land use classification [23]; the work-life balance and commuting scenario was analyzed by spatial clustering method [24]. Research on city (group) spaces and hotspots has mainly focused on the internal structure and dynamics of urban land-use patterns [25], the characteristics of city (group) residents, spatiotemporal variation [26,27], and hotspots in the city [28]. Various studies were conducted using LBSN datasets to observe human check-in and activities behavior under domains like privacy [11,29,30], sex differences [31], geographic spaces [32], urban emotions [33], activity location choice, urban green space [34], and lifestyle patterns [35,36]. Other studies [37][38][39][40][41][42] focused on observing human mobility patterns and analyzing check-in data for location prediction and venue tagging in the city using LBSN datasets. Li and Chen [43] analyzed the user's profile, characteristics, and activities in the form of correlations and social graphs to study and better understand user motivations for sharing their real-world location. Ebrahimpour et al. [44] reviewed and compared the current analysis of multisource crowd approaches. The survey provided the basics of crowd analysis by considering video, spatio-temporal, and social media approaches for crowd analysis. Wakamiya et al. [45] proposed a novel spatial visualization system based on the Twitter dataset for uncovering the collective spatial attention and interest of users not at, but rather toward, different locations to answer the following questions: What do users collectively talk about when they refer to specific geographical places? What do users at a specific place commonly talk about when they refer to another geographical place?
Research based on urban activity space and behavior began to emerge in the 1960s [46,47], which mainly focused on the spatially distributed population [48,49] and the geography over time to better understand humans in terms of behavior and land use and their relationships over time. This research on urban activity space and behavior encouraged our research on urban activities behavior using LBSN data. The current studies based on daily urban activities in space and time [50,51] observed, e.g., living space, referred to as residence (spatial structure of the living space and the diversity mechanism [52,53]); workspace, referred to as professional; and leisure space, referred to as sports and leisure (focuses on the evolution of leisure time-space characteristics [54] and public leisure space selection and activity path [55,56]). Therefore, along the lines of the research mentioned above, the LBSN dataset not only documents the daily lives, activity patterns, and social media usage behavior of users, but also provides spatiotemporal patterns and dynamics that are related to the daily routines and behavior of users. The LBSN dataset also reflects the current rapid urbanization of the city. In this direction, we aimed to investigate the spatiotemporal information related to check-ins to identify and determine urban activities behavior. The simple hypothesis is that people are often likely to follow a typical daily routine: e.g., go to work, eat at some preferred restaurant, and go shopping and return home.
We explored the LBSN data to observe urban activities behavior in space and time using Sina Weibo (referred as "Weibo" [57]), the most famous Chinese microblog that is considered the Chinese version and replacement of Facebook launched by Sina Corporation [58] in 2009. By the third quarter of 2017, Weibo had 376 million monthly active users (MAU) and 172 million daily active users (DAU), where 93% of the active users used mobile devices to access Weibo [59,60]. This enormous number of users were attracted worldwide due to fast information sharing and check-in features [61]. Therefore, if we have enough data to observe distinctive human activities behaviors, this knowledge can be analyzed to study human daily activities behavior. However, others [62][63][64][65] explored the LBSN datasets to examine people's daily check-ins, activities behavior, and mobility patterns in different cities. Most of the existing literature focused on Facebook and Twitter rather than Weibo. Therefore, our findings serve to fill this research gap by focusing on the most popular Chinese local social network site, Weibo. Previous studies [18,20] analyzed sex-based activities behavior in Weibo and suggested that female users are more inclined to use Weibo to provide helpful information to others. Another motivation of our research was that existing studies have not thoroughly analyzed sex-based urban activities behavior on Sina Weibo usage, especially in Shanghai, China. The contributions of our study are as follows:

•
We used a practical approach to study sex-based urban activities behavior in Shanghai, China, using geo-tagged posts from Weibo.

•
We examined urban activities density to explore the spatiotemporal distribution of activities using kernel density estimation kernel density estimation (KDE). The geographically weighted regression geographically weighted regression (GWR) method was used to observe the sex-based relationship between check-ins and associated activities, and standard deviational ellipse standard deviational ellipse (SDE) analysis was used to observe spatial directional trends of activities in the study area.
The motivations for using Weibo may differ between male and female users as, in Shanghai, 48.3% of the population is male and 51.7% is female. However, statistics show that 50.10% of Weibo users are men and 49.90% are women [66] and is considered one of the most popular social media platforms in China due to the unavailability of Facebook and Twitter. According to statistics [67], 72% of the total Sina Weibo users are aged from 20-35 years, among whom the majority of users are in their 20s [18]. Hence, by analyzing the spatiotemporal information of the Weibo dataset, we can explore urban activities' behavior. This line of research can help improve our understanding of urban activities behavior by considering LBSN data (a source of social media big data) as supplementary to rather than a substitute of traditional data sources when making policy decisions [68] associated with urban planning [69] and city functions [70].
The rest of the paper is organized as follows: Section 2 defines the area of study and dataset. Section 3 describes the methodology. Section 4 presents the experimental results. Finally, Section 5 concludes the paper with a proposal for future research.

Study Area
Shanghai, China (30 • 40 -31 • 53 N and 120 • 52 -122 • 12 E [71]) is situated on the eastern edge of the Yangtze River Delta, which has a total area of 8359 km 2 . In 2015, Shanghai had a GDP of USD $366 billion [72], income per capita of USD $7333, with disposable income per capita of USD $7788 for urban residents, and USD $3412 income per capita for rural residents [73]. Shanghai, an international center for trade, tourism, and fashion has a population of around 24.15 million, an agricultural land area of 317,926 ha, construction land area of 301,709.27 ha, and an unused land area 193,564.46 ha, which is considered a highly dense and populated community.

Check-In Data
In the current study, we used the Weibo dataset during January to December 2017 from Shanghai, China, as it contains information like a unique user ID, time and date of the check-in, geolocation (longitude and latitude), venue type, venue category, and sex, which were collected via web or mobile applications [76]. A total of 921,581 anonymized records of geo-tagged check-ins related to the study area were acquired. The LBSN dataset could therefore archive the day-to-day activity patterns and behaviors toward using social media, and present the spatiotemporal trends of daily life [77]. An example of a typical Weibo check-in is shown in Table 1.

Check-In Data
In the current study, we used the Weibo dataset during January to December 2017 from Shanghai, China, as it contains information like a unique user ID, time and date of the check-in, geolocation (longitude and latitude), venue type, venue category, and sex, which were collected via web or mobile applications [76]. A total of 921,581 anonymized records of geo-tagged check-ins related to the study area were acquired. The LBSN dataset could therefore archive the day-to-day activity patterns and behaviors toward using social media, and present the spatiotemporal trends of daily life [77]. An example of a typical Weibo check-in is shown in Table 1.

POI Data
In China, the point of interest (POI) categories are classified in accordance with land use. However, POI data have the following advantages over check-in and land use data: POI data have greater flexibility because point data are easy to transform into arbitrary scales; in POI data, a user's preferences and social interactions can be characterized by social interactions instead of land use types; and POI data have much finer statistical granularity.
The POI dataset used in the current study were attained from a web-based mapping platform, "AutoNavi." In total, 123,658 POIs are attained, and we categorized the points into 10 activity categories ( Table 2) based on the geolocation and type of the visited locations (but not limited to) obtained from Weibo check-in. About 95.6% of the check-ins were associated with the category information; the rest of the check-ins with no valid match with the categories were considered invalid.  In China, the point of interest (POI) categories are classified in accordance with land use. However, POI data have the following advantages over check-in and land use data: POI data have greater flexibility because point data are easy to transform into arbitrary scales; in POI data, a user's preferences and social interactions can be characterized by social interactions instead of land use types; and POI data have much finer statistical granularity.
The POI dataset used in the current study were attained from a web-based mapping platform, "AutoNavi." In total, 123,658 POIs are attained, and we categorized the points into 10 activity categories ( Table 2) based on the geolocation and type of the visited locations (but not limited to) obtained from Weibo check-in. About 95.6% of the check-ins were associated with the category information; the rest of the check-ins with no valid match with the categories were considered invalid.

Methodology
We analyzed the Weibo-based geolocation dataset (January-December 2017) from Shanghai, China containing information like the unique user ID, sex, time, day, venue type, venue category, and geolocation. Figure 2 presents the activities analytics framework, where the LBSN data analysis methodology involves the two stages: collection, storage, and analysis of LBSN data. The download of Weibo data was the main task in the data collection and storage stage, which was achieved by using a python-based Weibo application programming interface (API) an open interface of Sina Weibo [78], which resulted in separate files in JavaScript Object Notation (JSON) format. However, JSON is used as a standard data format and is considered a dominant programming language with the availability of public modules (reading and writing) [79,80]. All the check-ins downloaded in multiple JSON files were then transformed into a single comma-separated values (CSV) format file to list the check-ins according to space and time.
However, in the data analysis stage, the critical task is to mine and investigate the features of LBSN data. During data pre-processing, invalid records were excluded by considering four criteria: (1) Full availability of information, i.e., user ID, date, time, sex, venue type, venue category, and location (longitude and latitude). The missing check-in information was added by comparing the information with POI, and accurately identifying the check-in location with high similarity, unifying the standard format, and re-integrating the information. (2) The geolocation of the records in the study area concerning the POI location.
(3) The range of records within the set date and the prescribed time for the sampled data. (4) Every user checked-in twice in a month. We deleted multiple or duplicate data with the same time, same location, and similar content, and specified that a check-in location performed by the same user on the same day counted as one check-in.
From 921,581 anonymized check-in records, 887,008 check-in records of activities were obtained after pre-processing for data noise, incomplete records, and invalid and fake users related to POI association and study area. The distribution of check-ins based on months and sex is shown in Figure 3. Finally, in the data insight stage, we mined and further investigated the features related to LBSN check-in data by considering geolocation, time, venue type, venue category, and sex. However, in the data analysis stage, the critical task is to mine and investigate the features of LBSN data. During data pre-processing, invalid records were excluded by considering four criteria: (1) Full availability of information, i.e., user ID, date, time, sex, venue type, venue category, and location (longitude and latitude). The missing check-in information was added by comparing the information with POI, and accurately identifying the check-in location with high similarity, unifying the standard format, and re-integrating the information. (2) The geolocation of the records in the study area concerning the POI location.
(3) The range of records within the set date and the prescribed time for the sampled data. (4) Every user checked-in twice in a month. We deleted multiple or duplicate data with the same time, same location, and similar content, and specified that a check-in location performed by the same user on the same day counted as one check-in. From 921,581 anonymized check-in records, 887,008 check-in records of activities were obtained after pre-processing for data noise, incomplete records, and invalid and fake users related to POI association and study area. The distribution of check-ins based on months and sex is shown in Figure  3. Finally, in the data insight stage, we mined and further investigated the features related to LBSN check-in data by considering geolocation, time, venue type, venue category, and sex.   However, in the data analysis stage, the critical task is to mine and investigate the features of LBSN data. During data pre-processing, invalid records were excluded by considering four criteria: (1) Full availability of information, i.e., user ID, date, time, sex, venue type, venue category, and location (longitude and latitude). The missing check-in information was added by comparing the information with POI, and accurately identifying the check-in location with high similarity, unifying the standard format, and re-integrating the information. (2) The geolocation of the records in the study area concerning the POI location.
(3) The range of records within the set date and the prescribed time for the sampled data. (4) Every user checked-in twice in a month. We deleted multiple or duplicate data with the same time, same location, and similar content, and specified that a check-in location performed by the same user on the same day counted as one check-in. From 921,581 anonymized check-in records, 887,008 check-in records of activities were obtained after pre-processing for data noise, incomplete records, and invalid and fake users related to POI association and study area. The distribution of check-ins based on months and sex is shown in Figure  3. Finally, in the data insight stage, we mined and further investigated the features related to LBSN check-in data by considering geolocation, time, venue type, venue category, and sex.

Kernel Density Estimation
In the current study, to estimate the density function and to observe the spatial patterns of activities, kernel density estimation (KDE) [81][82][83] was used before detecting the status of activity hotspots. KDE is a popular spatial tool [41,42,84,85] used to examine numerous aspects (e.g., usage behavior, boundary defining, activities association, and mobility patterns) of LBSN data and data features, which are relative to the destination and time of the location. KDE helps researchers to observe and analyze the sparse distribution of activities and destinations, and to examine the spatial distribution in communities based on neighborhoods. For spatially distributed events in time, KDE can be used to identify the fine density of events [86] to create a finer surface that better exemplifies the density of the events.
To calculate the fine density of activities at location a, let f KD be a density function at geolocation a and A is a set of activities related to the check-ins data: where the geolocation of the activity 1 < i < n: a i = <x,y>, where i is individual, and t is time.
where a is the geolocation of an activity in dataset A with bandwidth h. To produce fine density around activities dataset A at point a i , we assumed the value of bandwidth h depends on the estimated density f KD . However, in the density estimation, bandwidth (larger/smaller) is assumed to be a vital parameter; too fine a density is produced with a large bandwidth, whereas abrupt changes occur with small bandwidth [87]. Therefore, constantly setting the bandwidth in comparison with the density surface results in achieving the optimal bandwidth. The subsequent density estimate f KD is interdependent on bandwidth h. To construct the density estimate and calculate the value of bandwidth h, the data-driven approach for the log-probability was used, which is given as follows: where a t represents the events and a i are data points in dataset A.

Geographically Weighted Regression (GWR)
To observe the spatial regression to estimate the local parameters by considering the spatial nonstationarity, GWR analysis was used, which is given as follows: where the geolocation of the observation is represented as (u i , v i ), the value of the intercept is represented as β 0 (u i , v i ), the kth variable of observation i for the estimated parameter is expressed as β k (u i , v i ), and the error term is represented as ε i . However, the estimated coefficients may differ in space, and the observation i near the observed data is more effective compared to the data beyond i from β k (u i , v i ), which is represented as follows: where the diagonally distributed matrix, the weighting matrix, is represented as W(u i , v i ). For the observation i neighbors, the GWR is partly dependent on the estimated bandwidth, where the bandwidth for an area with more check-ins is large compared to the small areas that have fewer check-ins. The minimum Akaike information criterion (AIC) for the GWR model [88] was used to calculate the suitable bandwidth.

Standard Deviational Ellipse (SDE)
In the current study, we used a spatial directional analysis technique named standard deviational ellipse (SDE), which is a popular geographic information system (GIS) tool, and describes the bivariate distribution of the features (central tendency, dispersion, and directional trends) first proposed by Lefever [89]. The parameters of SDE include the center of the ellipse, axis (major and minor) of the ellipse, and the orientation angle of the ellipse (also referred to as azimuth). Equation (7) is used to calculate the axis (major and minor) of the SDE, and the relative relationships of the axis (major and minor) of the ellipse represent the flattening degree. Equation (8) calculates the direction of the orientation angle trend, and Equation (9) calculates the standard deviations of the axis (major and minor) of the ellipse for the SDE. The major axis of the ellipse for the SDE is demarcated as the leading direction to observe the deviation trend [89], and the spatially distributed region for the distribution of the check-ins formed for the axis (major and minor) of the ellipse. The ellipse center of SDE (X w , Y w ) is calculated as: where the geolocation for activities is i and the total number of activities is n; x i and y i are the geometric center coordinates of activities to represent the spatial location of check-in; w i is the corresponding weight; x i , y i denote the coordinate's deviation from the spatial location of each object to the ellipse center of SDE (X w , Y w ). The orientation angle θ of SDE is calculated as follows: The standard deviations of the ellipse σ x and σ y in the x and y directions are calculated as follows: In the current study, we calculated SDEs for different activities to observe the spatial orientation and direction, and the temporal activities behavior for trends.

Density Variation and Distribution of Activities
In the current study, we used the geolocation-based check-in dataset, which was obtained from Weibo, and analyzed the density of activities using KDE. Figure 4 presents the overall check-in distribution of activities in Shanghai. A significant amount of check-ins in Shanghai was associated with activities related to Food and Drink (28%), Residence (16%), and Professional and Others (13%). Generally, more time was spent at home than at food and drink locations (e.g., restaurants, coffee shops). The high amount of check-ins at food and drink facilities may be because they provide free Internet access. ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 10 of 35    Figure 5 presents the distribution of activities during weekdays and weekends, illustrating that the distribution of activities related to Education and Learning, Hospital and Healthcare, and Professional and Others was high during weekdays and very low during weekends compared to the activities associated with Food and Drink, Residence, Sales and Services, Shopping, Sports and Leisure, Tourism, and Travel and Transport.  Figure 5 presents the distribution of activities during weekdays and weekends, illustrating that the distribution of activities related to Education and Learning, Hospital and Healthcare, and Professional and Others was high during weekdays and very low during weekends compared to the activities associated with Food and Drink, Residence, Sales and Services, Shopping, Sports and Leisure, Tourism, and Travel and Transport.    The check-in densities for Sales and Services, and Tourism were dense in the city center, and low density dispersed amongst the rest of the study area. A high check-in density for Travel and Transport was observed alongside the subway and railway stations, and the airport, but dispersed in the city near highways due to the Shanghai Bus Rapid Transit (BRT) network. However, the check-in density of Professional was high in the city center, but Food and Drink, Residence, and Shopping were dense in the city center as well as in the suburban areas (Baoshan and Minhang districts). Hence, Figure 6 shows that Food and Drink, Residence, and Shopping are directly connected with the simple assumption that more Food and Drink, and Shopping facilities exist near the residential areas, which resulted in the high density of these activities in almost the same pattern. Generally, increasing numbers of people are preferring to live near the communities where they have easy access to service, i.e., transport, health, entertainment.
To investigate the activities behavior, we analyzed the data based on sex during weekdays and weekends in Shanghai. Figure 7 presents the sex-based check-in distribution of activities in Shanghai during the weekdays and weekends. Female users used Weibo more when performing activities related to Food and Drink, Hospital and Healthcare, Residence, Shopping, and Tourism. However, men were more inclined to use Weibo when performing activities related to Education and Learning, Professional and Others, Sales and Services, and Travel and Transport. However, we observed that during weekdays, men were more inclined to use Weibo when performing the activities related to Education and Learning, Professional and Others, and Travel and Transport, whereas women were more inclined to use Weibo when performing the activities related to Food and Drink, Hospital and Healthcare, Residence, Sales and Services, Shopping, and Tourism. We observed that during the weekends, male users were more inclined to use Weibo when performing activities related to Sales and Services compared to weekdays and female users for the rest of the activities. ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 11 of 35 The check-in densities for Sales and Services, and Tourism were dense in the city center, and low density dispersed amongst the rest of the study area. A high check-in density for Travel and Transport was observed alongside the subway and railway stations, and the airport, but dispersed in the city near highways due to the Shanghai Bus Rapid Transit (BRT) network. However, the checkin density of Professional was high in the city center, but Food and Drink, Residence, and Shopping were dense in the city center as well as in the suburban areas (Baoshan and Minhang districts). Hence, Figure 6 shows that Food and Drink, Residence, and Shopping are directly connected with the simple assumption that more Food and Drink, and Shopping facilities exist near the residential areas, which resulted in the high density of these activities in almost the same pattern. Generally, increasing   Figure 8b,c present the sex-based weekly activities trend, where male users' activities trends for Food and Drink, Residence, and Sales and Services were consistent during weekdays but tended to rise during the weekend, but the trend for Professional and Others tended to decline during the weekends. However, for female users, the activities trends for Food and Drink, Residence, Shopping, and Tourism rose during the weekends compared to weekdays.
Professional and Others, Sales and Services, and Travel and Transport. However, we observed that during weekdays, men were more inclined to use Weibo when performing the activities related to Education and Learning, Professional and Others, and Travel and Transport, whereas women were more inclined to use Weibo when performing the activities related to Food and Drink, Hospital and Healthcare, Residence, Sales and Services, Shopping, and Tourism. We observed that during the weekends, male users were more inclined to use Weibo when performing activities related to Sales and Services compared to weekdays and female users for the rest of the activities.  and Sales and Services were consistent during weekdays but tended to rise during the weekend, but the trend for Professional and Others tended to decline during the weekends. However, for female users, the activities trends for Food and Drink, Residence, Shopping, and Tourism rose during the weekends compared to weekdays.   Figure 8a depicts the weekly activities trends. The trend for Food and Drink and Residence started increasing on Fridays and continued until Sunday, whereas the trend for Professional started to decline from Friday and continued to decrease until Sunday. However, Figures 8b,c present the sex-based weekly activities trend, where male users' activities trends for Food and Drink, Residence, and Sales and Services were consistent during weekdays but tended to rise during the weekend, but the trend for Professional and Others tended to decline during the weekends. However, for female users, the activities trends for Food and Drink, Residence, Shopping, and Tourism rose during the weekends compared to weekdays.       Figure 9 presents the district activities distribution by men and women in Shanghai, where check-in distribution of Professional and Others was relatively high in the city center districts. The check-in distribution of Food and Drink was high in Changning and Huangpu districts compared to the other districts. Suburban districts (Baoshan and Minhang) had a high distribution of check-ins related to Food and Drink and Residence compared to the city center districts. Noticeable differences based on sex were observed in the Pudong New Area district.  In Shanghai, to observe the activities based on the check-in trend, we measured the sex-based temporal trend of activities. In Figure 10a-c, increasing activities trends can be observed from 05:30 to 09:30 and 13:00 to 22:30, especially for Food and Drink, Residence, and Professional and Others. However, in Figure 10a,b, a decreasing activities trend is observed for Professional and Others after 20:00. An increasing activities trend can be observed for male and female users related to activities Food and Drink and Residence after 15:00.       Figure 9.
Finally, the results of LBSN data in the current section showed that the city center has a relatively high density variation of activities compared to suburban districts. However, a high density variation of activities related to Food and Drink and Residence was observed in suburban districts (Baoshan and Minhang). A high density variation of activities was found near the district borders.

Spatial Regression Analysis
The GWR results for activities performed in Shanghai by men and women during weekdays and weekends are presented in Table 3. All selected variables were significant at the 1% level. The coefficient of determination (R 2 ) values were 0.9993 and 0.9975, denoting that the selected variables can explain 99.9% and 99.7% of the variation in the check-in on weekdays and weekends, with optimal spatiotemporal bandwidths of 0.954 and 0.966 for weekdays and weekends, respectively. The variation trends of activities for men and women during weekdays varied due to a higher number of check-ins by the women compared to men ( Figure 12). The variation trends of activities for men and women during the weekends are roughly the same due to the increased number of check-ins by the men as compared to weekdays.  Figure 12 shows the average spatial change tendencies of the parameter estimates for check-ins, which were pivotal and focus factors in this study. We also manually set zero as a threshold to distinguish between the positive and negative effects of the general tendencies and nuances of check-ins by men and women. The impact of check-ins by the women in Shanghai was mostly higher than 0.5 Standardised residual (StdResid) compared to men. The greater the StdResid, the higher the check-in frequency by women. Finally, the results of LBSN data in the current section showed that the city center has a relatively high density variation of activities compared to suburban districts. However, a high density variation of activities related to Food and Drink and Residence was observed in suburban districts (Baoshan and Minhang). A high density variation of activities was found near the district borders.

Spatial Regression Analysis
The GWR results for activities performed in Shanghai by men and women during weekdays and weekends are presented in Table 3. All selected variables were significant at the 1% level. The coefficient of determination (R 2 ) values were 0.9993 and 0.9975, denoting that the selected variables can explain 99.9% and 99.7% of the variation in the check-in on weekdays and weekends, with optimal spatiotemporal bandwidths of 0.954 and 0.966 for weekdays and weekends, respectively. The variation trends of activities for men and women during weekdays varied due to a higher number of check-ins by the women compared to men (Figure 12). The variation trends of activities for men and  Table 4 presents the GWR results for activities performed in Shanghai by men and women. All selected variables were significant at the 1% level. The R 2 values were 0.9950 and 0.9283, denoting that the selected variables explained 99.5% and 92.8% of the variation in the check-in for men and women in Shanghai, with optimal spatiotemporal bandwidths of 0.389 and 0.389, respectively. The variation trends of activities by men and women were quite different for most of the activities due to the higher number of check-ins by women in Shanghai.   Figure 12 shows the average spatial change tendencies of the parameter estimates for check-ins, which were pivotal and focus factors in this study. We also manually set zero as a threshold to distinguish between the positive and negative effects of the general tendencies and nuances of checkins by men and women. The impact of check-ins by the women in Shanghai was mostly higher than 0.5 Standardised residual (StdResid) compared to men. The greater the StdResid, the higher the check-in frequency by women.  Figures 13 and 14 show the average spatial change tendencies of the parameter estimates for check-ins by men and women. The effects of check-ins are mostly higher than 0.5 StdResid by women in Shanghai. However, the impact of check-ins by the women in Shanghai was mainly higher than 0.5 StdResid compared to men due to a high number of check-ins during weekdays. We also observed that the women's check-ins were mostly scattered in Shanghai compared to men's. Table 5 presents the GWR results for activities performed in Shanghai during weekdays and weekends. All selected variables were significant at the 1% level. The R 2 values were 0.9311 and 0.9277, denoting that the selected variables explained 93.1% and 92.7% of the variation in the check-ins in Shanghai during weekdays and weekends, with optimal spatiotemporal bandwidths of 0.3895 and 0.3895, respectively. The variation trends during weekdays were quite different due to the higher number of check-ins by women compared to men. The variation trends during the weekends were almost the same for both men and women in Shanghai due to the higher number of check-ins by men in the city center compared to weekdays.   Figure 13 and Figure 14 show the average spatial change tendencies of the parameter estimates for check-ins by men and women. The effects of check-ins are mostly higher than 0.5 StdResid by women in Shanghai. However, the impact of check-ins by the women in Shanghai was mainly higher than 0.5 StdResid compared to men due to a high number of check-ins during weekdays. We also observed that the women's check-ins were mostly scattered in Shanghai compared to men's. Figure 13. Spatial distribution of activities by the men in Shanghai. Figure 13. Spatial distribution of activities by the men in Shanghai. Figures 15 and 16 show the average spatial change tendencies of the parameter estimates for check-ins during weekdays and weekends. The effects of check-ins during weekdays in Shanghai were mostly higher than 0.5 StdResid and were more scattered compared to weekends. The impact of check-ins during the weekends in Shanghai was mainly higher than 0.5 StdResid and more toward the city center compared to the weekdays. ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 22 of 35 Figure 14. Spatial distribution of activities by the women in Shanghai. Table 5 presents the GWR results for activities performed in Shanghai during weekdays and weekends. All selected variables were significant at the 1% level. The R 2 values were 0.9311 and 0.9277, denoting that the selected variables explained 93.1% and 92.7% of the variation in the checkins in Shanghai during weekdays and weekends, with optimal spatiotemporal bandwidths of 0.3895 and 0.3895, respectively. The variation trends during weekdays were quite different due to the higher number of check-ins by women compared to men. The variation trends during the weekends were almost the same for both men and women in Shanghai due to the higher number of check-ins by men in the city center compared to weekdays.  Figure 15 and Figure 16 show the average spatial change tendencies of the parameter estimates for check-ins during weekdays and weekends. The effects of check-ins during weekdays in Shanghai were mostly higher than 0.5 StdResid and were more scattered compared to weekends. The impact of check-ins during the weekends in Shanghai was mainly higher than 0.5 StdResid and more toward the city center compared to the weekdays.  Finally, from the results mentioned above, overall, the urban areas including the city center had positive effects on check-in frequency during the weekends, whereas the suburban areas districts mostly had adverse effects. ISPRS Int. J. Geo-Inf. 2020, 9,   Finally, from the results mentioned above, overall, the urban areas including the city center had positive effects on check-in frequency during the weekends, whereas the suburban areas districts mostly had adverse effects.

Spatial Directional Analysis
The overall spatial pattern change of activities across Shanghai was determined through standard deviational ellipse (SDE) analysis. Figure 17 shows the overall spatial pattern change of activities in Shanghai, where the major axis indicates the direction and minor axis indicates the range of the data distribution. The trajectory of the center shows a linear movement of activities in a

Spatial Directional Analysis
The overall spatial pattern change of activities across Shanghai was determined through standard deviational ellipse (SDE) analysis. Figure 17 shows the overall spatial pattern change of activities in Shanghai, where the major axis indicates the direction and minor axis indicates the range of the data distribution. The trajectory of the center shows a linear movement of activities in a clockwise direction toward the northeast, also exhibiting apparent orientation and direction of activities in the study area. Table 6 presents the features of SDE regarding major and minor axes, azimuth, and flattering for activities in Shanghai. For Education and Learning, Hospital and Healthcare, and Residence, the azimuth laid between 41 • and 45 • . Education and Learning, with a 1136.73 km 2 area and a minor axis of 18.13 km; and Residence with a 1024.20 km 2 area and minor axis 16.67 km, produced the larger eccentricity of the SDE. The larger eccentricity of the SDE indicates that the check-ins related to Education and Learning and Residence are more scattered in the city and cover more of the suburban area (Baoshan and Minhang). For Food and Drink, with a 658.63 km 2 area, Professional and Others with a 752.76 km 2 area, Sales and Services with a 940.70 km 2 area, Shopping with a 757.61 km 2 area, Sports and Leisure with an 822.73 km 2 area, and Tourism with an 828.02 km 2 area, we observed a clockwise shift toward (city center) the northeast, where the azimuth lies between 53 • and 64 • . However, Figure 13 shows that for Travel and Transport, a significant clockwise shift occurred with large eccentricity toward the city center with azimuth 79 • , 1133.65 km 2 area, and minor axis of 17.11 km.
ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 26 of 35 clockwise direction toward the northeast, also exhibiting apparent orientation and direction of activities in the study area.  Figure 13 shows that for Travel and Transport, a significant clockwise shift occurred with large eccentricity toward the city center with azimuth 79°, 1133.65 km 2 area, and minor axis of 17.11 km.   Figure 18 shows the district SDEs for the overall spatial pattern of activities of 10 districts in Shanghai. The SDEs of districts were significantly different from the whole study area due to   Figure 18 shows the district SDEs for the overall spatial pattern of activities of 10 districts in Shanghai. The SDEs of districts were significantly different from the whole study area due to differences in size and structure. Figure 18 and Table 7 show that the overall spatial pattern and linear movement for activities were almost the same in Changning, Hongkou, Putuo, Xuhui, and Yangpu districts. Large differences were observed for Travel and Transport compared to other activities. However, in Yangpu district, a totally different behavior was observed, with a linear movement in a clockwise direction toward the northeast by a rotating azimuth of 131 • (Table 7). differences in size and structure. Figure 18 and Table 7 show that the overall spatial pattern and linear movement for activities were almost the same in Changning, Hongkou, Putuo, Xuhui, and Yangpu districts. Large differences were observed for Travel and Transport compared to other activities. However, in Yangpu district, a totally different behavior was observed, with a linear movement in a clockwise direction toward the northeast by a rotating azimuth of 131° (Table 7).
In Baoshan, which is considered a suburban area, for Food and Drink, Residence, Shopping, and Sports and Leisure, the azimuth laid between 33° and 38° with an apparent linear movement toward the clockwise direction, covering most of the suburban area. For Hospital and Healthcare, Professional and Others, and Tourism, the azimuth laid between 40° and 44°; for Education and Learning and Travel and Transport, the azimuth laid between 52° and 55° with a linear movement toward the northeast in the clockwise direction and toward the city center.  In Baoshan, which is considered a suburban area, for Food and Drink, Residence, Shopping, and Sports and Leisure, the azimuth laid between 33 • and 38 • with an apparent linear movement toward the clockwise direction, covering most of the suburban area. For Hospital and Healthcare, Professional and Others, and Tourism, the azimuth laid between 40 • and 44 • ; for Education and Learning and Travel and Transport, the azimuth laid between 52 • and 55 • with a linear movement toward the northeast in the clockwise direction and toward the city center.  In Huangpu, for Education and Learning, Food and Drink, Hospital and Healthcare, Professional and Others, Sales and Services, Shopping, Sports and Leisure, and Tourism, the azimuth laid between 1 • and 24 • with a linear movement toward the north-east in the clockwise direction. However, for Residence and Travel and Transport, the apparent change in the azimuth between 174 • to 177 • toward the southeast was observed, demonstrating the shift in these activities away from the city center. In Jingan, for Education and Learning, Professional and Others, Sales and Services, Shopping, Tourism, and Travel and Transport, the azimuth laid between 173 • to 180 • with a linear movement toward the southeast in a clockwise direction. However, for Food and Drink, Hospital and Healthcare, Residence, and Sports and Leisure, the apparent change in the azimuth between 1 • to 5 • toward the northeast was observed, demonstrating the shift of these activities away from the city center toward the suburban Baoshan district.
In Minhang, which is also considered a suburban district, the azimuth laid between 140 • and 173 • with a linear movement toward the southeast in a clockwise direction toward the suburban areas and away from the city center. In Pudong New Area, which is considered the business center of Shanghai, for Food and Drink, Hospital and Healthcare, Professional and Others, Residence, Sales and Services, and Shopping, the azimuth laid between 21 • to 31 • with a linear movement toward northeast in a clockwise direction. For Sports and Leisure, the azimuth shifted to 55 • with a linear progression toward the northeast in a clockwise direction compared to the activities mentioned above. However, for Education and Learning and Travel and Transport, an apparent shift in the azimuth occurred to 179 • and 99 • with a linear movement toward the southeast in a clockwise direction.
In summary, because check-in data are raw and imprecise for determining the movement of activities from one destination to another, they data cannot precisely indicate the exact nature of the progression of users among the districts. Combining LBSN and POI data could help to better understand central tendency, dispersion, and directional trends of human activities behavior at city and district levels.

Conclusions
In this study, we conducted a spatiotemporal investigation of sex-based differences in human activities behavior to explore hourly and daily check-in patterns, as well as during weekdays and weekends. The results showed that in almost all Shanghai districts, women are more likely to consume social media compared to men during the weekdays. However, during the weekends, nearly the same check-in trend was observed for both men and women. The city center was found to have a high density of check-ins near the subways and highways.
Supplementing the prior research on check-in behavior, we considered LBSN data as a supplement rather than a substitute for traditional data sources for observation of, for example, human mobility, activity analysis, defining city boundary, and social issues in a city. Additionally, compared with other traditional data sources, the LBSN dataset has some advantages, including low cost and high spatial precision, and some disadvantages, including sex prejudice, a low frequency of sampling, and location type prejudice. The spatiotemporal dynamics of SDE based on city and district scales exhibited different human behaviors. On the city scale, we observed an activities behavior trend toward the city center in northeast direction. However, the activities behavior trend on the district scale was significantly different from that at a city scale. In general, the movement rate and direction of SDE for different districts were different for various activities, which may be related to the spatial distribution of check-ins. Based on the results of the current study, the LBSN dataset is a novel source of big data that has the potential to provide a new outlook as a supplement for observing human activities behavior and sex differences in space and time. The findings could help policymakers to define policies regarding the supply of services (i.e., transport, health, entertainment) by highlighting the check-in hotspots in the city.
We only focused on an analysis of the spatiotemporal dynamics patterns of human activities using LBSN data. The results revealed that different activities had different change characteristics in various directions on different scales, which could help with evaluating urban development trends of the city. Further studies could analyze the influence of change in human activities behavior and spatiotemporal dynamic patterns of urbanization to better understand the city's development. The factors that influence the change of urban activities behavior in space and time could be examined.