High-Dimensional Urban Economy and Livability: A Panel Data Modeling Approach

    This article presents a reproducible workflow for modeling urban economic development and livability using high-dimensional panel data. It covers panel data structuring and indicator design across economic, social, public-service, environmental, and demographic dimensions, followed by data cleaning, missing-value handling, outlier treatment, and standardization. The core method combines a Simulated Plant Growth Algorithm to optimize K-means initial centers with Pareto-based multi-objective selection, producing more stable and interpretable city classifications. It then applies ARIMA, convolutional neural network, and grey forecasting models to core indicators, and evaluates them with out-of-sample error metrics and robustness checks. Readers will learn how to turn multi-city, multi-year data into defensible city typologies and forecasts that support urban planning decisions.

    1. Background and Overall Approach

    Evaluating urban development usually involves many dimensions at once: economic scale, industrial structure, resident income, public services, transportation, the ecological environment, population attractiveness, and cost of living. These indicators are inherently multi-dimensional, time-dependent, and regionally varied. Looking at any single indicator in isolation rarely gives an accurate picture of a city’s overall development.

    For example, a high regional GDP does not necessarily mean a good quality of life, and a city with well-developed public services may still face high housing costs and population pressure. For this reason, research on urban economy and livability should not rely on single-indicator rankings. Instead, multiple indicators should be placed within a unified data framework to identify city types, development stages, and future trends.

    The analysis pipeline in this article consists of the following steps:

    1. Assemble multi-city, multi-year, multi-indicator panel data;
    2. Handle missing values, detect outliers, and unify indicator direction;
    3. Apply standardization to remove the effect of differing units;
    4. Use a Simulated Plant Growth Algorithm to find more stable initial clustering centers;
    5. Run K-means to divide cities into types;
    6. Build several time series forecasting models for core indicators;
    7. Evaluate the models using error metrics, stability tests, and business interpretation;
    8. Propose development recommendations based on the clustering and forecasting results.

    The study objects can be a set of key cities covering roughly ten or more years of annual data. The number of indicators can be adjusted according to data availability, typically spanning economic, demographic, employment, education, healthcare, transportation, environmental, and consumption dimensions.

    2. Panel Data Structure and Indicator Design

    2.1 Data Organization

    Panel data is typically organized as follows:

    City Year Indicator 1 Indicator 2 Indicator 3 … Indicator n
    City A 2005 … … … … …
    City A 2006 … … … … …
    City B 2005 … … … … …

    Here, city and year form the panel index, while the indicator columns describe a city’s overall state in a given year.

    When building the model, the unit of analysis must be defined clearly. If the goal is to compare long-term development levels across cities, annual data can be aggregated into long-term city means, growth rates, or trend slopes. If the goal is to observe dynamic changes, the two-dimensional “city–year” structure should be preserved and clustering performed separately for each year.

    2.2 Indicator Categories

    The indicator system can be organized as follows:

    • Economic development: total output, per-capita output, fiscal revenue, fixed-asset investment, industrial structure;
    • Resident life: per-capita income, consumption expenditure, employment level, housing burden;
    • Public services: education resources, healthcare resources, social security, public transit;
    • Ecological environment: green coverage, air quality, sewage treatment, energy consumption;
    • Population and vitality: resident population, net population inflow, population density, share of working-age population;
    • Urban efficiency: output per unit of resource, transportation efficiency, public facility utilization.

    Indicator direction must be unified in advance. For positive indicators, a higher value means better development (for example, per-capita income and healthcare resources). For negative indicators, a higher value means greater pressure (for example, pollution emissions, congestion, and housing cost). Without unifying direction, subsequent clustering results will be biased in interpretation.

    3. Data Cleaning and Standardization

    3.1 Missing-Value Handling

    Common missing-data situations in panel data include:

    • A city is entirely missing for a given year;
    • An indicator is missing in some years;
    • Structural gaps caused by changes in statistical definitions;
    • Invalid records represented by special characters or null values.

    For a small number of consecutive missing years, interpolation from adjacent years can be used. For indicators with a high missing ratio, evaluate whether they are suitable for inclusion in the model. Do not simply replace all missing values with zero, because zero may represent a real state and would severely distort the indicator distribution.

    The following principles can be applied:

    1. When the missing ratio is low, use linear interpolation or the mean of adjacent years;
    2. When missing values cluster at the start or end of a series, trend extrapolation may be used but must be flagged;
    3. When the missing ratio is high, consider dropping the indicator or using robust estimation;
    4. Add a flag column for imputed data to support later sensitivity analysis.

    3.2 Outlier Handling

    Outliers are not necessarily errors; they may reflect a major event in a city during a certain period. Therefore, distinguish data-entry errors from genuine extreme phenomena first.

    Common methods include:

    • The interquartile range method;
    • Quantile winsorization;
    • Standard-deviation detection based on the yearly cross-section;
    • Change-point detection based on a city’s own time series.

    For genuine outliers, direct deletion is not recommended. Winsorization can be applied, or a distance measure that is insensitive to outliers can be used in the model.

    3.3 Standardization Methods

    Different indicators may have very different units. Population counts, monetary amounts, ratio indicators, and index indicators cannot be used directly in distance calculations. Common standardization methods include min-max scaling and Z-score standardization.

    Min-max scaling can be expressed as:

    1. Positive indicator: z = (x - min(x)) / (max(x) - min(x))
    2. Negative indicator: z = (max(x) - x) / (max(x) - min(x))

    Z-score standardization is:

    1. z = (x - mean(x)) / std(x)

    If the data contains obvious extreme values, Z-score may be affected by the mean and standard deviation. In that case, robust standardization based on the median and the median absolute deviation can be considered.

    4. Optimizing Clustering Centers with a Simulated Plant Growth Algorithm

    4.1 Limitations of Traditional K-means

    K-means partitions data by minimizing the squared distance from samples to their assigned cluster centers. Its objective function is:

    1. J = Σ ||x_i - c_j||²

    where x_i is the i-th sample and c_j is the j-th cluster center.

    Traditional K-means usually generates initial centers randomly, which can lead to the following problems:

    • Different initializations produce different classifications;
    • Initial centers that are too close prevent some clusters from fully forming;
    • Distance differences are weakened in high-dimensional data;
    • A few outliers can pull the center positions;
    • Results are hard to interpret and reproduce.

    Therefore, a Simulated Plant Growth Algorithm can be used first for global search, and the resulting candidate centers can then serve as the initial solution for K-means.

    4.2 Basic Idea of the Simulated Plant Growth Algorithm

    The algorithm treats candidate solutions as different growth points in a plant’s growth process. It typically involves the following steps:

    1. Randomly generate several candidate cluster centers;
    2. Compute the clustering objective function for each set of centers;
    3. Keep the better growth points;
    4. Generate new candidate points near the dominant direction;
    5. Control the search range to prevent candidate points from diverging excessively;
    6. Iterate and update until the objective function converges or the maximum number of iterations is reached.

    Candidate solutions can be evaluated against multiple objectives:

    • Minimize the within-cluster squared error;
    • Maximize the between-cluster distance;
    • Keep cluster sizes as balanced as possible;
    • Ensure cluster centers are strongly representative;
    • Remain stable across different sampled datasets.

    If only the within-cluster error is optimized, the algorithm may produce cluster centers that are very close to each other. A composite objective function with a between-cluster separation term can therefore be constructed:

    1. F = α × within-cluster error - β × between-cluster distance + γ × imbalance penalty

    where α, β, and γ are weight parameters. The weights should be determined through sensitivity analysis rather than set arbitrarily.

    4.3 Introducing Pareto Optimality

    In multi-objective optimization, different candidate solutions may each excel at different objectives. For example, one solution may have a smaller within-cluster error while another has a larger between-cluster distance. In this case, the set of candidates not fully dominated by any other solution can be retained as the Pareto solution set.

    When selecting the final cluster centers from the Pareto set, the following can be used:

    • A composite evaluation score;
    • Distance to an ideal point;
    • A stability-first principle;
    • A business-interpretability-first principle.

    This approach is more robust than simply picking a single random optimum, and it is especially suited to problems such as city classification that care about both “internal similarity” and “between-category difference.”

    5. K-means Clustering and Urban Type Interpretation

    After obtaining the optimized initial centers, run K-means for local iteration. Each iteration consists of two steps:

    1. Assign samples to the nearest cluster center;
    2. Recompute the centers based on the samples in each cluster.

    Repeat until the change in centers falls below a set threshold or the maximum number of iterations is reached.

    The number of clusters should not be determined by experience alone. It can be chosen using a combination of:

    • The elbow method;
    • The silhouette coefficient;
    • The Calinski-Harabasz index;
    • The Davies-Bouldin index;
    • Classification stability across different years;
    • The real-world interpretability of city types.

    For example, the final result may form the following city types:

    1. Comprehensive-advantage type: high economic scale, public services, and population attractiveness;
    2. Economic-growth type: fast economic growth but room for improvement in public services;
    3. Livable type: good ecological environment and quality of life but relatively limited industrial vitality;
    4. Transition-under-pressure type: a high share of traditional industries with insufficient population and investment growth;
    5. Basic-improvement type: many indicators at low-to-medium levels, with both development potential and weaknesses.

    Note that cluster labels themselves carry no inherent ranking, and cluster numbers should not be interpreted as a development ranking. Each type should be named based on its indicator means, indicator contributions, and city profile.

    6. Time Series Forecasting Model Design

    Clustering answers “how do cities differ,” while forecasting answers “how might a given city change in the future.” The two should be used together.

    6.1 ARIMA Model

    ARIMA is suitable for univariate series with strong temporal dependence. It handles trends through differencing and then describes dynamic changes with autoregressive and moving-average terms.

    The modeling process includes:

    1. Check whether the series is stationary;
    2. Apply first-order or higher-order differencing if necessary;
    3. Select parameters based on autocorrelation and partial autocorrelation features;
    4. Fit the model on the training set;
    5. Perform rolling forecasts on the validation set;
    6. Check whether the residuals are approximately white noise.

    ARIMA is suitable for indicators with relatively limited data and clear trends and autocorrelation, but it is not sensitive enough to structural breaks and changes in external variables.

    6.2 Convolutional Neural Network Time Series Model

    A convolutional neural network can extract local temporal patterns through sliding windows. After setting a history window of length L, the previous L periods are used as input to predict the next period’s indicator.

    The basic process is:

    1. Input: x(t-L+1), ..., x(t)
    2. Output: x(t+1)

    The window length, number of convolutional layers, number of hidden units, and number of training epochs should all be selected via the validation set. Since annual city data usually has a limited sample size, the model should not be too deep, or it will easily overfit.

    When using this type of model, note the following:

    • The training and test sets must be split in time order;
    • The time series should not be randomly shuffled;
    • Standardization parameters must be computed from the training set only;
    • Forecast results need to be inverse-transformed;
    • Results should be compared against simple baseline models.

    6.3 Grey Forecasting Model

    When data is scarce, fluctuation patterns are unclear but the overall trend is strong, the grey forecasting model is somewhat applicable. It weakens random fluctuations through accumulated generation and then builds a trend relationship.

    The advantages of the grey model are its few parameters and its friendliness to small samples; its drawback is limited ability to express periodic fluctuations, abrupt changes, and complex nonlinear behavior. It should therefore be treated as a supplementary model rather than a single method applied to all indicators.

    7. Model Evaluation and Robustness Testing

    Forecasting models should not be judged by training error alone; out-of-sample performance matters most. Common metrics include:

    1. MAE = Mean Absolute Error
    2. RMSE = Root Mean Squared Error
    3. MAPE = Mean Absolute Percentage Error

    When true values are close to zero, MAPE can produce large deviations, so it should be assessed together with MAE and RMSE.

    Clustering models should be tested along the following dimensions:

    • Whether results remain stable after changing the random seed;
    • Whether clusters change substantially after removing a few samples;
    • Whether conclusions stay consistent after changing the standardization method;
    • Whether city profiles remain clear after adjusting the number of clusters;
    • Whether the classification structure holds across different year ranges;
    • Whether the method improves on traditional random initialization.

    In addition, indicator sensitivity analysis should be performed. Remove one category of indicators at a time, re-cluster, and observe changes in city assignments and center characteristics. If removing a certain indicator completely changes the overall structure, the model depends heavily on that indicator, and this must be stated clearly in the conclusions.

    8. Results Presentation and Business Application

    To improve the readability of the analysis, results can be presented at three levels:

    8.1 City Classification Map

    Use a two-dimensional dimensionality-reduction plot to show similarity relationships among cities, with different colors indicating cluster categories. Note that the dimensionality-reduction plot is mainly an aid to observation and cannot replace clustering results in the original high-dimensional space.

    8.2 Indicator Profile Charts

    For each type, compute the standardized indicator means and draw radar charts, heatmaps, or grouped bar charts to highlight the strengths and weaknesses of different city types.

    8.3 Trend Forecast Charts

    For each city or each type, plot the historical values, forecast values, and prediction intervals of core indicators. Prediction intervals matter more than a single forecast curve because they reflect uncertainty.

    The final report should not stop at “a city belongs to a certain type.” It should further answer:

    • What is the city’s main strength;
    • What is the most obvious current weakness;
    • Whether the weakness shows a long-term trend;
    • Which areas should be prioritized for future improvement;
    • Whether the forecast results are affected by data quality or model settings.

    9. Conclusion

    The key to high-dimensional urban economy and livability analysis is not simply stacking more indicators, but building a reproducible, interpretable, and verifiable data modeling workflow. Panel data governance reduces the impact of differing statistical definitions and missing values; optimizing K-means initial centers with a Simulated Plant Growth Algorithm reduces the dependence of traditional K-means on random initialization; the Pareto idea balances within-cluster compactness and between-cluster difference to yield more interpretable city classifications; and the combined comparison of ARIMA, convolutional neural network, and grey forecasting models improves adaptability to different time series characteristics.

    In practice, model results should be combined with the business context of urban planning, public services, and industrial development. Only by valuing data quality, algorithm stability, forecast uncertainty, and result interpretation together can high-dimensional data be turned into urban development insights with decision-making value.