The paper investigates the causes of mass blooms of phytoplankton, the overgrowth of water bodies with certain species of higher aquatic plants in the upper reaches of the Southern Bug River by comparing them with the results of parameter measurements obtained from open resources of the State Agency of Water Resources of Ukraine. Statistical processing of the results of measurements of nitrogen-containing compounds according to open data of the State Agency of Water Resources of Ukraine was carried out and ecological risks were assessed. With the help of the STATISTICA 12 program and our own Python software, scale diagrams and histograms were created with indicators of ammonium ions, biochemical oxygen consumption, suspended (suspended) substances, dissolved oxygen, nitrate ions, nitrite ions, sulfate ions, phosphate ions (polyphosphates), chloride ions. To check the conformity of the normal distribution law, the Kolmogorov-Smirnov and Lilliefors criteria were applied and it was found that the distribution law differs from the normal distribution for all the investigated indicators. Median and interquartile range values were used for further data processing and construction of the range diagram. The risks of exceeding the MPC were assessed for all observation posts based on the indicated indicators. Significant excesses of the maximum permissible levels of nitrogen-containing compounds were detected, particularly below the city of Khmelnytskyi. Due to the self-purification processes taking place in the river, the indicators of the levels of nitrogen-containing compounds decrease to permissible values when measured in the drinking water intake of the city of Vinnytsia, but at the same time, the concentration of phytoplankton increases significantly. Correlations between pollution parameters were investigated and scatter diagrams were obtained. Using linear regression, the correlation between the indicated ammonium ions and nitrate ions was investigated and the regression coefficient r=0.41 was obtained, which indicates the presence of a weak connection between the specified parameters. A weak relationship was also found between such parameters as nitrate ions and nitrite ions (regression coefficient r=0.26) and dissolved oxygen and biochemical oxygen consumption (r=0.21). Natural and artificial wetlands, located in the coastal protective strip, are a natural mechanism for cleaning waters polluted by nitrogen-containing compounds from agricultural sources that enter water bodies. In addition to the cleaning function, wetlands are especially important for the preservation of biodiversity.