Sitemap

Principal Component Analysis of U.S. Metropolitan Area Livability Indicators: A Multidimensional Ranking Approach.

A data-driven exploration of what makes cities thrive using PCA on 329 U.S. metropolitan areas.

--

1. Introduction

This report details a Principal Component Analysis (PCA) performed on a dataset evaluating the performance of 329 cities in the United States across ten key attributes: Climate & Terrain, Housing, Health Care & Environment, Crime, Transportation, Education, The Arts, Recreation, and Economics. The primary objectives of this analysis are:

  1. To reduce the dimensionality of the ten correlated attributes into a smaller set of uncorrelated principal components.
  2. To determine the optimal number of components to retain for interpretation.
  3. To interpret the meaning of the retained components in the context of city livability and character.
  4. To draw conclusions about the relative standings and profiles of the cities based on their component scores.

1.1 Dataset Description

The analysis is based on a sample dataset containing standardized performance scores for 329 U.S. metropolitan areas. An excerpt of the first 20 cities from the dataset is provided in Table 1.1 below. Each city is evaluated on the ten attributes previously listed. The scores are standardized measures, where positive and negative values indicate performance relative to a national benchmark. For example, a positive score in “The Arts” indicates above-average cultural amenities, while a negative score in “Crime” suggests a lower-than-average crime rate (a desirable outcome). The dataset includes diverse cities ranging from major metropolitan hubs like Atlanta, GA, to smaller cities like Anderson, IN, providing a comprehensive cross section of urban living conditions in the United States.

Press enter or click to view image in full size
Table 1.1: Excerpt of U.S. City Performance Data (First 20 of 329 Cities)

The analysis was conducted using Minitab statistical software and Microsoft Excel. The correlation matrix for the ten attributes is provided in Table 1 below.

Press enter or click to view image in full size
Table 1.2: Correlation Matrix of City Attributes

The correlation matrix reveals the underlying relationships between the ten city attributes, which is the foundation for PCA. We made the following key observations:

  • Strong Positive Correlations: The strongest correlation in the dataset is between Health Care & Environment (X3) and The Arts (X7) at 0.866. This suggests that cities investing in or possessing robust cultural infrastructures (The Arts) also tend to have strong healthcare and environmental quality, potentially indicating a broader commitment to public welfare and quality of life. Furthermore, Health Care & Environment shows substantial positive correlations with Transportation (0.470) and Education (0.490), hinting at a latent “Public Amenities & Services” factor.
  • Strong Negative Correlations: Housing (X2) exhibits moderate to strong negative correlations with several “amenity” variables: Health Care & Environment (-0.453), The Arts (-0.449), and Recreation (-0.422). This inverse relationship is classic in urban studies and may represent a trade-off between “Affordability” and “Amenity/Vibrancy.” Cities with high amenity scores often have higher costs of living (reflected in lower housing scores in this dataset).
  • Crime’s Relationships: Crime (X4) is negatively correlated with most positive amenity variables, most notably with The Arts (-0.389) and Recreation (-0.345). This aligns with the concept that safer cities tend to support more cultural and recreational activities.
  • Economics as an Isolated Driver: The Economics (X9) variable shows weak correlations with most other attributes (all below |0.27|), except for a mild positive link with Recreation (0.174). This suggests that a city’s economic performance, as measured here, may be somewhat independent of its scores on specific lifestyle or service-oriented attributes.

These patterns confirm significant shared variance among the variables, validating the use of PCA to uncover a smaller set of composite dimensions that capture these interrelationships.

2. Reduced Model Development

The first step in PCA is to extract eigenvalues and eigenvectors from the correlation matrix. The eigenvalues, their percentage of explained variance, and cumulative variance are presented in Table 2.

Press enter or click to view image in full size
Table 2.1: PCA Eigenvalues and Variance Contribution

We used the following criteria to make a decision on the number of principle components (PCs) to retain.

Kaiser’s Criterion (Eigenvalue > 1)

This rule, introduced by Henry Kaiser, posits that a principal component should only be retained if its eigenvalue exceeds 1.0. The rationale is that an eigenvalue of 1.0 corresponds to the amount of variance explained by a single standardized original variable in the dataset. Therefore, a component with an eigenvalue greater than 1.0 accounts for more variance than any one of the original variables individually, indicating that it represents a meaningful, composite source of information. Examining Table 2.1, only the first three components (PC1 = 3.411, PC2 = 1.216, PC3 = 1.141) possess eigenvalues exceeding this threshold. Components PC4 through PC9 have eigenvalues below 1.0, meaning each explains less variance than a single original variable, and are thus considered insufficiently significant to retain as independent dimensions. Consequently, Kaiser’s criterion strongly supports retaining exactly three principal components for further interpretation.

Scree Plot Examination

The scree plot visually displays the eigenvalues. Its analysis shows a very sharp drop from Component 1 (eigenvalue ~3.4) to Component 2 (~1.2), and another noticeable drop to Component 3 (~1.1). After Component 3, the eigenvalues fall below 1.0 and the curve flattens into a gentle downward slope, forming a clear “elbow” after Component 3. This visual inflection point indicates that subsequent components contribute minimally to explaining additional variance.

Press enter or click to view image in full size
Figure 2.2: PCA Scree Plot

Cumulative Variance Explained

The first three components collectively explain 64.0% of the total variance in the dataset, as shown in the Cumulative % column of Table 2.1. This represents a substantial reduction from ten variables to three while retaining nearly two-thirds of the original information. The remaining six components collectively account for only 36% of the total variance, with each contributing a relatively small increment, further justifying the focus on the first three.

Get Jeremiah Muchazondida’s stories in your inbox

Join Medium for free to get updates from this writer.

Based on the strong convergence of Kaiser’s criterion, the clear elbow in the scree plot, and a satisfactory cumulative variance of 64% from Table 2.1, three principal components are retained for further interpretation and analysis.

3. Interpretation of Principal Components Using Correlations (Loadings)

The meaning of each principal component is derived from its loadings, which are the correlations between the original variable and the component, as shown in Table 3.1. Higher absolute values signify a stronger contribution. Following the loadings, the proportion of variance in each original variable explained by each principal component is presented in Table 3.1. Finally, the cumulative proportion of variance explained in each variable as components are successively added is shown in Table 3.2. This multi-table analysis provides a complete picture of how each component contributes to the variance of the original data.

Press enter or click to view image in full size
Correlations (Loadings)
Table 3.1: Correlations (Loadings)

Note: Loadings are correlations. Values with an absolute value > 0.5 are in bold, indicating a very strong association. Values between |0.3| and |0.5| are considered moderate.

The first principal component (PC1) explains 37.9% of the variance and serves as the dominant Classification Component. It represents a strong, general factor contrasting cities with high-quality amenities against those with affordability and safety concerns. The positive pole of PC1, corresponding to a high score, is defined by extremely high loadings from Health Care & Environment (0.85) and The Arts (0.855), supported by Transportation (0.648) and Recreation (0.605), with Education (0.508) also contributing positively. The negative pole, or a low PC1 score, is characterized by Housing (-0.658) and Crime (-0.519), with Climate & Terrain also loading negatively (-0.381). Consequently, PC1 effectively separates “High-Amenity, High-Cost, Safer Metros” from “More Affordable, Lower-Amenity Cities,” establishing itself as the primary axis for overall city desirability as defined by these metrics.

The second principal component (PC2) explains 13.5% of the variance and reveals a secondary, orthogonal axis of differentiation, acting as a Market Segmentation Component. It represents a tension between intellectual capital and economic or recreational orientation. The positive pole of PC2 is strongly driven by Education (0.533), with Crime (0.392) and Health Care (0.330) also loading positively. Conversely, the negative pole is dominated by Economics (-0.519) and Recreation (-0.424). Therefore, PC2 distinguishes “Knowledge and Service-Oriented Cities,” such as major university towns or state capitals, from “Business and Lifestyle-Oriented Cities.”

The third principal component (PC3) explains 12.7% of the variance and captures a distinct Strategic Profile Component. It represents a combination of inherent geographic appeal and economic strength. This component is overwhelmingly defined by Climate & Terrain (0.737) and Economics (0.649). Thus, PC3 identifies cities that are “Prosperous and Geographically Blessed,” such as growing Sunbelt tech hubs or affluent coastal cities, highlighting a specific competitive advantage.

The loadings on the second table of Table 3.1 quantifies how much of each original variable’s variance is captured by each principal component. For instance, PC1 captures a dominant share of the variance for several key variables: 72.2% of Health Care & Environment, 73.1% of The Arts, 43.3% of Housing, and 42.0% of Transportation. This reinforces PC1’s role as the primary composite measure of urban livability and cost. PC2 is most critical for explaining variance in Education (28.4%) and Economics (27.0%), confirming its role in differentiating between knowledge-based and commercially-oriented cities. Notably, PC3 is the dominant component for Climate & Terrain, explaining 54.3% of its variance, and is also the main component for Economics, explaining 42.1% of its variance, which powerfully validates the interpretation of PC3 as the “Natural & Economic Advantage” component. These distributions confirm that the three retained components are not only statistically significant but also substantively meaningful, each taking the lead in explaining a distinct set of original variables.

Press enter or click to view image in full size
Table 3.2: Cumulative Explained Variances

Table 3.2 demonstrates the efficiency of the three-component solution in capturing the information from the original dataset. After retaining just three components (PC1, PC2, and PC3), the cumulative explained variance for most variables is substantial. For example, Climate & Terrain is 74.6% explained, Economics is 75.3% explained, and Health Care & Environment is 83.1% explained. This shows that the three-component model successfully recaptures the core signal in the data. The table also highlights which variables require more components for full explanation. For instance, Transportation and Crime see significant jumps in explained variance with later components (PC4, PC5), indicating these attributes have unique variance not fully captured by the first three dominant themes. However, the primary objective of PCA, dimensionality reduction while retaining key patterns, is met, as the three components explain a majority of the variance for all variables and nearly all variance for the most defining ones like Health Care, The Arts, and Economics.

Dissection of the Loading Plot

Press enter or click to view image in full size
Figure 3.3: Loadings Plot

The Loading Plot, which visually represents the first two principal components, reinforces the interpretations derived from the tables above. The right-hand side, representing positive PC1, contains the “High Amenity” cluster of Health Care, The Arts, and Transportation. The left-hand side, representing negative PC1, groups the “Affordability/Challenge” variables of Housing and Crime. The top-half of the plot, corresponding to positive PC2, features the isolated “Cerebral” anchor of Education. The bottom-half, corresponding to negative PC2, contains the “Commercial/Leisure” anchor of Economics and Recreation. The plot clearly maps these relationships, showing the strong opposition between Housing and The Arts/Health Care, and the orthogonal separation of Education from Economics, providing a comprehensive visual summary of the city attribute structure confirmed by the numerical loadings in Table 3.1.

Dissection of the Score Plot

Press enter or click to view image in full size
Figure 3.4: Loadings Plot

The Score Plot visualizes the 329 U.S. cities in the space defined by the first two principal components. Cities on the right side of the plot (positive PC1) are high scorers on the “Urban Vibrancy & Livability” dimension, excelling in healthcare, arts, transportation, and recreation. Major hubs such as San Francisco, Boston, New York, and Washington, D.C., appear on the far right, confirming their status as top-tier metropolitan areas. Conversely, cities on the left side, such as Miami and Detroit, score lower on these core amenities and may face challenges related to affordability or crime, reflecting the trade-off captured by PC1.

Cities higher on the vertical axis (positive PC2) represent “Knowledge and Service-Oriented” profiles, driven by strong educational performance, as seen with Boston’s high position. Cities lower on this axis (negative PC2), such as San Francisco and Chicago, are better described as “Business and Lifestyle Hubs,” emphasizing economic and recreational strengths over educational dominance. This two-dimensional mapping effectively classifies cities into distinct archetypes, vibrant knowledge capitals, commercial powerhouses, affordable college towns, and challenged regions, demonstrating how the principal components differentiate urban profiles beyond a simple ranking of overall quality.

4. Data Assessment & Conclusions Regarding Cities

City Rankings and Profiles:

The principal component analysis enables a multidimensional ranking and classification of the 329 U.S. cities based on their derived component scores. The most direct ranking is achieved by ordering cities by their score on the first principal component (PC1), the “Urban Vibrancy & Livability” index. Cities with high PC1 scores, such as New York, San Francisco, Boston, and Washington, D.C., rank at the top. These cities are characterized by exceptional performance in healthcare, cultural arts, transportation, and recreational amenities, coupled with lower crime rates. This profile confirms their status as leading metropolitan hubs, though the strong negative loading of Housing on PC1 indicates that this high quality of life is typically associated with a higher cost of living. Conversely, cities with low PC1 scores, which would appear at the bottom of this ranking, lag in these core urban amenities. They may offer less developed infrastructure in healthcare, arts, and transit, and potentially face higher crime rates. Their positive statistical association with the Housing variable suggests a potential compensatory advantage: more affordable living conditions.

A more nuanced and informative classification is achieved by considering all three retained components, transforming a simple ranking into a typology of city profiles:

  • High PC1 & High PC2: Vibrant “Knowledge Capitals” (e.g., Boston, MA). These cities excel in overall amenities and are strongly oriented towards education and knowledge-based services.
  • High PC1 & Low PC2: Vibrant “Business & Leisure Hubs” (e.g., San Francisco, CA; Chicago, IL). These cities are top-tier in amenities but are more defined by their economic strength and recreational offerings.
  • High PC3: “Prosperous Sunbelt Cities” (e.g., Atlanta, GA; Dallas, TX). These cities are distinguished by a combination of favorable climate/geography and robust economic performance.
  • Low PC1 & High PC2: “Affordable Knowledge Centers” or “College Towns.” These cities may have modest overall amenity scores but possess a strong educational or institutional focus.
  • Low across all PCs: “Challenged or Transitional Cities.” Cities in this category score low on the primary dimensions of vibrancy, knowledge/commerce, and natural/economic advantage, suggesting they face broader socio-economic challenges across the measured attributes.

A fundamental assumption for applying Principal Component Analysis is that significant correlations exist among the original variables, justifying the search for a reduced set of composite dimensions. This assumption was validated using Bartlett’s Test of Sphericity. The test evaluates the null hypothesis that the observed correlation matrix is an identity matrix, implying the variables are uncorrelated. The analysis resulted in a test statistic with a p-value of p < 0.001. This exceedingly small p-value provides strong statistical evidence to reject the null hypothesis. Therefore, we conclude that significant correlations are present among the ten city attributes, confirming the dataset’s suitability for dimensionality reduction via Principal Component Analysis.

Note: Please leave a comment in the comments section if you need more materials for this project (e.g., datasets, Excel analysis files, or Minitab files).

--

--

Jeremiah Muchazondida
Jeremiah Muchazondida

Written by Jeremiah Muchazondida

0 followers

software engineer & Data analyst sharing real-world tech projects, web, mobile, AI, data analytics, and lessons from building systems that create impact.