A Piper Diagram is an effective graphic procedure to segregate relevant analytical data to understand the sources of the dissolved constituents in water. This procedure was born under the statement that most natural waters contain cations and anions in chemical equilibrium. It is assumed that the most abundant cations are calcium (Ca), magnesium (Mg) and sodium (Na). The most common anions are bicarbonate (HCO3), sulphate (SO4) and chloride (Cl).
The Piper diagram can be made by free and commercial desktop software, however in this tutorial we have generated the Python scripts and working procedure to create a Piper Diagram from values stored in a working spreadsheet.
There are several outputs of the Piper Diagram, including a SVG format that allows further graphical editing in Inkscape. All the conversions and graphical assembly are presented on the script, so it will be much easier to modifiy for custom representation, filtering, or automated reporting.
The scripts, working spreadsheet and output folders for this tutorial can be downloaded from this link. it is recommended to place it under “My Documents” if you are working in Windows.