Showing posts with label Mean Center. Show all posts
Showing posts with label Mean Center. Show all posts

Tutorial: Accumulative Mean Center (Plug-in Method)

Here is post-intro. I just want this part to be snippet

Q: How has the mean center of Starbucks stores in Gangnam, Seoul changed over the years?

Before you begin this tutorial, do the following first:

Running the Spatial Analyzer

[1] Click the Processing menu at the top, then click Toolbox.
The Processing Toolbox panel will appear on the right side of the window.

If the Spatial Analyzer plugin is not installed, refer to "Installing Urban Analyzer".Processing Toolbox panel screenshot

[2] In the Processing Toolbox, expand the SpatialAnalyzer submenu and double-click Mean Center Tracker.

Mean Center Tracker in toolbox

[3] In the “Mean Center Tracker” window, set Start Field to open_year, then click Run.Mean Center Tracker parameters

[4] Execution Result:Execution result layer


Tutorial: Accumulative Mean Center (Manual Method)


Q: How has the mean center of Starbucks stores in Gangnam, Seoul changed over the years?

Before you begin this tutorial, do the following first:
The method presented in this practice relies on basic QGIS functionality but can be time-consuming for practical use. This practice is designed primarily for learning QGIS operations. For practical cumulative mean center calculation, use the plug-in method

Checking the Layer Attribute Table

With the sbucks layer selected in the Layers panel, press the F6 shortcut key.

Result: The attribute table for sbucks opens. We will use the open_year field to compute cumulative mean centers.

Attribute table showing open_year field


A. Cumulative Mean Center up to 2002

Tutorial: Mean Center, Median Center and Central Feature(Plug-in Method)


Q: Find the Median Center and Central Feature of Starbucks Stores in Gangnam, Seoul.

Before you begin this tutorial, do the following first:


Finding the Median Center and Central Feature

[1] At the top of the screen, click the Processing menu, then click Toolbox. The Processing Toolbox panel will appear on the right side of the window.

Open Processing Toolbox in QGIS

[2] In the Processing Toolbox, expand SpatialAnalyzer at the bottom. Under Spatial Central Tendency, double-click Centers (Mean Center, Median Center, Central Feature)





[3] In the Spatial Central Tendency window, ensure Median Center and Central Feature are checked, then click Run. (By default, Mean Center, Median Center, and Central Feature are selected.)Select Median Center and Central Feature options

Weight Field lets you compute weighted centers using an attribute instead of pure distance. Examples include seating capacity, sales revenue, or number of employees. If you choose “sales revenue,” the resulting mean or median center will shift toward higher-revenue areas.

Group Field computes centers separately for each category when your data is classified. For example, if there is an administrative-district attribute, selecting that field will calculate centers per district. This method is discussed further in cluster analysis.

Result

Three point layers representing the Mean Center, Median Center, and Central Feature are created.



Tutorial: Compute the Mean Center(Built-in Method)


Adding the Starbucks Layer

The locations of Starbucks stores in the Gangnam area of Seoul are added as point features on the QGIS canvas.

Starbucks points loaded on the QGIS canvas

For attribute information of this file, see Checking the Attribute Table.


Adding the Mean Center

[1] With the Starbucks layer selected, go to VectorAnalysis ToolsMean Coordinate(s)...Opening the Mean Coordinate(s) tool in QGIS


[2] Confirm the input layer shows sbucks [EPSG:5179], then click Run.Mean Coordinate(s) tool parameters with EPSG:5179


[3] Result: The mean center point is added to the canvas.Mean center point displayed on the map
In the Mean Coordinate(s) tool:
Weight field lets you compute a weighted mean center using an attribute (e.g., number of seats, sales volume, or employees). If you choose sales volume as the weight, the mean center reflects where sales are geographically concentrated.
Unique ID field enables separate mean centers for each group. For example, if the administrative district is stored in an attribute, selecting that field will compute a mean center for each district.

Theory: Mean Center(3): Cumulative Mean Center


While the Mean Center itself represents a meaningful value indicating the central location of spatial data, it is also highly useful for analyzing dynamic changes over time. The figure below shows the mean center of the U.S. population every 10 years from 1790 to 2010. The small map in the upper-left corner is enlarged. Through this, we can observe how the socio-economic center of the United States has gradually shifted westward since independence.

Change in the Mean Center of U.S. Population
Change in the Mean Center of U.S. Population (1790–2010)

This type of analysis is known as the Cumulative Mean Center, which shows how the spatial center has shifted over time. That is, it calculates the cumulative mean center up to each time point to trace the spatio-temporal trends in the center’s movement. The cumulative mean center is derived by computing the mean center of all points that have occurred up to each time stage.

Characteristics of the Cumulative Mean Center

  • The mean center is updated each time a new time point is added.
  • By connecting these values in a time series, the trajectory of movement in the central location over time can be visualized.
  • It allows for the analysis of spatial trends such as directional movement or patterns of dispersion and concentration.

Application Examples

  • Crime analysis: Tracking how the center of crime incidents shifts over time
  • Urban expansion analysis: Visualizing how the center of development or population moves due to new town development or migration
  • Logistics and mobility analysis: Monitoring delivery or vehicle movement centers across time

The cumulative mean center is a tool used to analyze the movement of spatial centers by chronologically accumulating spatial data, serving as a foundation for time-series spatial analysis. The results are typically visualized in the form of a linear trajectory, allowing a comprehensive understanding of change trends, directionality, and speed of the center.

Theory: Mean Center(2): Weighted Mean Center

The Weighted Mean Center is the central point calculated by assigning importance or influence (weights) to each point. While the regular mean center treats all points equally, the weighted mean center allows greater influence to be reflected for specific points, making it more suitable for realistic spatial analysis. In practice, various real-world factors such as population, sales volume, or the number of visitors can be used as weights.

$$ \bar{X}_w = \frac{\sum_{i=1}^{n} w_i x_i}{\sum_{i=1}^{n} w_i},\quad \bar{Y}_w = \frac{\sum_{i=1}^{n} w_i y_i}{\sum_{i=1}^{n} w_i} $$

$ \text{Here, } x_i \text{ and } y_i \text{ are the coordinates of point } i,\ \text{and } w_i \text{ is its weight.} $

Characteristics of the Weighted Mean Center

  • Points with larger weights have a greater influence on the calculation of the mean center.
  • The overall center tends to shift toward the points with higher weights.
  • In real analyses, various real-world factors such as population, sales, or visitor numbers can be applied as weights.

Application Examples

  • Identifying the actual customer center by setting the number of customers at each location as weights
  • Selecting the optimal service location (e.g., schools, hospitals, fire stations) by considering positions and population
  • Determining the optimal placement for logistics hubs using shipment volumes as weights

For example, one can identify the actual customer center by weighting each point by the number of customers, or select a service center location by considering both facility locations and population size. Likewise, shipment volumes can be used as weights to determine the optimal logistics hub location.