Home / Lab / Water quality in the Rímac
Case 1 · Environmental quality
Where does the Rímac exceed the quality standard for its reach before reaching La Atarjea, and from which kilometre?
Six metals in the Rímac River against the ECA standard for each reach, from the Andes to La Atarjea, with 4,552 OEFA monitoring results.

Six metals exceed the ECA
In the main channel and tributaries, arsenic and manganese exceed the ECA in 49% and 44% of results. Lead exceeds it in 9%, and in a February 2024 supervision, at km 27, it reached 229 times the ECA. In the main channel, exceedances begin at km 4.4, with manganese; the first station is at km 3.4.

Manganese upstream, arsenic from the Blanco River on
In the headwaters, manganese exceeds the ECA in 64% of samples. Between the Blanco River and Santa Eulalia, arsenic exceeds it in 79% of main-channel samples: 90% in the wet season and 66% in the dry season.

Between Parac and Santa Eulalia, four or more metals at once
Between Parac and Santa Eulalia, 36% of samples exceed the ECA in four or more metals. Across the whole main channel, only 23% of 197 samples meet the ECA for all six metals.

Arsenic: no clear trend
Between the Blanco River and Parac, the slope is +6% per year, with an interval of −4 to +20%: consistent with either a decrease or an increase. None of the 21 tests (seven metals in the reaches with enough data) shows a trend: that requires both Kendall tests to be significant and the 90% interval of the slope to exclude zero.

No frequent monitoring: from Matucana to La Atarjea
From Matucana (km 43) to La Atarjea, no OEFA station has more than 2 dates. The ANA network has 4 points in that reach, with results in the SNIRH, which the case does not yet include.

About this tool
Rímac explorer (Shiny for Python) exported with Shinylive: it runs in the browser with Pyodide, without a server. It loads plotly.js from cdn.jsdelivr.net and fonts from Google Fonts, so it needs an internet connection. It weighs about 61 MB; the browser downloads part of it on the first visit.
Services
What we can do with your data
- Identify which ECA category applies where your project is located, according to the ANA classification.
- See which parameters already exceed the ECA upstream and downstream of your monitoring point.
- Compare your results with the river's public record since 2014.
Open source
Code and methods
The code downloads the public data and generates every figure on this page.
See the code on GitHubgithub.com/mytnatureint/caso-agua-rimacTechnical sheet and sources
- Extent
- Rímac River and its tributaries Blanco, Parac and Santa Eulalia (ANA hydrographic unit 137554, 3,485 km²), down to La Atarjea, at km 114 of the main channel
- Period
- 2014–2026
- Data
- 17,493 OEFA supervision results at 148 stations; 4,552 compared with the ECA at 70 stations on classified rivers
- Standard
- ECA for water, category 1A2 (D.S. 004-2017-MINAM), according to the ANA river classification (R.J. 056-2018-ANA)
- Method
- Comparison with the current ECA, with treatment of results below the detection limit; trends with the regional seasonal Kendall test for censored data
- OEFA: «Resultados de los monitoreos del componente ambiental agua para la matriz agua superficial», Dirección de Supervisión, Plataforma Nacional de Datos Abiertos (datosabiertos.gob.pe). Open Data Commons Attribution License.
- ANA: hydrographic units, classified rivers (R.J. 056-2018-ANA) and quality monitoring network points.
- Standard: ECA for water, D.S. 004-2017-MINAM, category 1A2.
- IGN: populated places.
- Terrain: © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018, provided under COPERNICUS by the European Union and ESA.
- Trends: Helsel, D. R., Hirsch, R. M., Ryberg, K. R., Archfield, S. A. and Gilroy, E. J. 2020. Statistical Methods in Water Resources. U.S. Geological Survey, Techniques and Methods 4-A3.
- Comparison with the current ECA, not an assessment of legal compliance: the ECA applies to raw river water, before the treatment plant. The results come from OEFA supervisions near operations; they do not form a basin-wide surveillance network. Below the detection limit, a result complies if the limit is equal to or lower than the ECA and is “not assessable” if it is higher.
Tools
- OEFA · ANA · D.S. 004-2017-MINAM
- Python · geopandas · pandas · scipy
- Treatment of results below the detection limit and regional seasonal Kendall test for censored data
- Shiny for Python in the browser (Shinylive) · uv · step-by-step pipeline
Let’s talk about your project
Tell us what data you have and what you need to solve. We reply by email.