The development of criteria and indicators to quantify the transition to sustainability of the urban socio-ecological systems quality is determinant for planning policies and the 21st century urban agenda. This study models the spatial variation in the concentration and distribution of some macronutrients, micronutrients, and trace nutrients in the soil of a high-altitude city in the Andes. Meanwhile, machine learning methods were employed to study some interactions between the different dimensions that constitute an urban socio-ecosystem that caused these variations. We proposed a methodology that considered two phases: a) field work to collect data on 300 soil samples; laboratory analysis to measure the concentrations of 24 macronutrients, micronutrients, and trace nutrients; and the design of geophysical, spectral, and urban co-variables; b) statistical and geo-informatics analysis, where multivariate analysis grouped the elements into factors; and, machine learning integrated with co-variables was applied to derive the intensity of each factor across the city. Multivariate statistics described the variation in soil co-concentrations with a moderate percentage (42%). Four factors were determined that grouped some of the analyzed elements, as follows: F1 (Zn, S, Cu, Pb, Ni, and Cr), F2 (Ba, Ag, K, In, and Mg), F3 (B, V, Li, and Sr), and F4 (Si and Mn). The percentage R2 out-of-bag of the spatial model were: F1 = 20%, F2 = 8%, F3 = 14%, and F4 = 10%. Our outputs show that the enrichment and contamination by anthropogenic factors, such as the increase in population density, land use, road network, and traffic generated by fossil fuel vehicles, should be prioritized in urban planning decisions.