## 1 Introduction  
Health risks for human beings arising from heavy metals have been widely studied [1]. Farmland plays an important role in agricultural production and human survival, so the potential contamination of farmland deserves special attention [2]. In recent years, farmland quality has been compromised by heavy metals pollution originating from industry and unreasonable use of agricultural chemicals [3; 4; 5; 6]. Heavy metals are non-biodegradable and toxic in soils [7], affecting the soil physical and chemical properties and soil quality [8]. The national soil pollution survey Bulletin issued by China in 2014 showed that 19.4% of cultivated soil was mainly polluted with heavy metals [9]. The most serious pollutant was Cd, followed by Hg [10]. These elements can trigger ecological risks [11; 12; 13; 14]. Heavy metals absorbed by plants in the farmland enter the human body through the food chain, posing health risks to humans [15; 16; 17; 18; 19]; especially, Cd and Pb, even at low contents, are very poisonous [20]. An increased risk of cancer is associated with chronic exposure to heavy metals [21]. Exposure to heavy metals threatens human health through oxidative stress and other mechanisms [22]. For example, chronic exposure to Cd is harmful to kidney functions, long-term Pb contact can affect the reproductive system [23], and Zn can cause adverse effects on cholesterol balance and fertility [24]. Hence, it is of great importance to conduct the risk evaluation of heavy metals in the soils. This evaluation is useful to establish the different degrees of pollution and to suggest suitable protection policies for the environment [25; 26].  
Most studies focused on heavy metals distribution in agricultural soil near the industry or mining areas [27] or in areas irrigated with sewage. For example, a significant pollution of As, Pb, and Hg which existed in Suxian was associated with extensive polymetallic mining [27]; [PERSON] et al. [28] found that soils irrigated with wastewater were contaminated by Cd and Pb in Wuqing, Tianjin, China. However, the distribution of heavy metals in the agricultural areas dominated by a cattle-producing area near Bashang farmland has been insufficiently studied.  
The Zhangbei county develops animal husbandry and is a main green crops production base for Beijing-Tianjin-Hebei region and also for the whole of China. The random discharge of livestock manure and misuse of fertilizers have gradually caused pollution in soils. Heavy metals are found to be existing in soils, which pose health threats to the entire ecological system. It is important to study the content and spatial distribution characteristics of heavy metals in the farmland in the agricultural zone, to evaluate the risk of the ecological and human health risk of heavy metals in the soil. Such information provides a basis for the local farmland pollution control and ensures the safety of food.  
The potato and hulless oat are the main agricultural products in Zhangbei. In the study, the spatial distribution and ecological risks of heavy metals in potato soils and oat soils were investigated, through combining the methods of pollution index, geo-accumulation index, potential ecological risk index, human health risk, and principal component analysis.