## 2 Materials and Methods  
The research area is located in the northern part of the Central Valley in California, USA. This part of the Central Valley, also called the Sacramento Valley, is dominated by the Sacramento River (Figure 1). In addition, several smaller streams that have their catchments in the surrounding mountain ranges discharge into the Sacramento River. The largest part of the study area in the Sacramento Valley is covered by agricultural land, with several larger cities in the floodplain, such as Sacramento, east of the Sacramento River. Multiple datasets were combined to form the basis for the analysis. First, the soil chemical concentration data were obtained from the National Geochemical Database (NGDB) soil database [41]. All samples were taken from the topsoil (0-25 cm depth) at various locations. From the available samples, only those located in the floodplain defined by the GFPLAIN250m dataset [42] were selected for this study. The mean distance between the resulting 411 sample sites was 2904.4 m. The geochemical data described the concentration of 38 different metals in the soil samples. For the location of each soil sample, environmental features data was collected. The resulting variables were grouped into five groups. Group terrain: elevation, slope, and Topographic Wetness Index (TWI) were extracted or calculated from SRTM 30 m data [43; 44; 45; 46]. TWI is an index that expresses the terrain-controlled wetness of any given grid cell in a digital elevation model. Group input streams: the SRTM dataset was also used to delineate the five streams that enter the floodplain from the neighbouring mountainous areas. For brevity, they were called west-1 (Cache Creek), west-2 (Putah Creek), east-1 (American River), east-2 (Cosumnes River), and east-3 (Mokelumne River), as indicated in Figure 1. Raster grids containing the proximity to each of the five streams were created based on inverse Euclidean distance. The Euclidean distance grids and density grids of the Sacramento River (Group Sacramento River) were created based on vector data [47]. Group  
Figure 1: Overview of the research area in the Sacramento River floodplain in California, USA. Indicated are the soil sample sites, traffic routes, and rivers. soil: additional soil data, such as sand, silt, and clay percentages of the fine soil fraction, were obtained from a database based on the STATSO2 soil database, pre-processed for use in the Soil And Water Assessment Tool (SWAT) model [48]. This database was chosen because it contains derived parameters expected to affect soil metal concentrations. The selected features were soil bulk density (g/cm\({}^{3}\)), the available water capacity (AWC), measuring the soil volume that can be filled with water (mm/mm), hydraulic conductivity K (mm/h), the carbon, rock, sand, silt and clay content (%), the soil albedo (%), and the Universal Soil Loss Equation (USLE) factor K, measuring erodibility. Group vegetation: the vegetation indices Normalized Difference Vegetation Index (NDVI) and Enhanced Vegetation Index (EVI) were calculated based on Landsat-5 imagery captured in September 1986 (Landsat-5 image courtesy of the U.S. Geological Survey). NDVI and EVI are based on the near-infrared reflectance of the Earth's surface and are indicators of land cover type and vegetation health status [49]. Table 1 shows a summary statistic of the environmental features used in this study. Maps of the factors for the study area can be found in the Supplementary Figures S1-S3. The input data pre-processing, raster arithmetic, and sampling for each soil sample location were performed in ArcGIS (version 10.4, Esri, Redlands, CA, USA), QGIS (version 3.16.4, QGIS Association, Gruet, Switzerland), and SAGA GIS (version 2.3.2, SAGA User Group Association, Hamburg, Germany). The data analysis was performed in the R statistical programming language (version 4.0.5, R Core Team, Vienna, Austria) in the RStudio development environment (version 2022.02.3+492, RStudio, Boston, MA, USA).