Coder Social home page Coder Social logo

inkenbrandt / peeters_piper Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 6.0 2.99 MB

From Peeters 2014 in Groundwater; ArcGIS Python Toolbox; Piper Diagram; Water Chemistry

Python 99.85% Jupyter Notebook 0.15%
piper plot groundwater chemistry trilinear hydrology hydrogeology arcgis arcgis-desktop

peeters_piper's Introduction

THIS LIBRARY IS NOW OUT OF DATE. PLEASE USE WQChartPy AS IT IS BY THE ORIGINAL AUTHOR AND MUCH MORE ROBUST.

Peeters_Piper

This script plots a piper diagram of water chemisty. It includes an ArcGIS Toolbox for use in ArcGIS Pro.

Reference

This script was taken from Peeters 2014 in Groundwater

@article {GWAT:GWAT12118,
author = {Peeters, Luk},
title = {A Background Color Scheme for Piper Plots to Spatially Visualize Hydrochemical Patterns},
journal = {Groundwater},
volume = {52},
number = {1},
publisher = {Blackwell Publishing Ltd},
issn = {1745-6584},
url = {http://dx.doi.org/10.1111/gwat.12118},
doi = {10.1111/gwat.12118},
pages = {2--6},
year = {2014},
}

Please refer to the original publication for licensing guidelines.

Installation

pip install https://github.com/inkenbrandt/Peeters_Piper/zipball/master 

Example

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

from peeters_piper.peeter_piper import piper

filename = "examples/GW20130314-0057-s02_additional_field.csv"

df = pd.read_csv(filename)

# Plot example data
# Piper plot
fig = plt.figure()
markers = ["s", "o", "^", "v", "+", "x"]
arrays = []
for i, (label, group_df) in enumerate(df.groupby("additional-field")):
    arr = group_df.iloc[:, 2:10].values
    arrays.append(
        [
            arr,
            {
                "label": label,
                "marker": markers[i],
                "edgecolor": "k",
                "linewidth": 0.3,
                "facecolor": "none",
            },
        ]
    )

rgb = piper(arrays, "title", use_color=True, fig=fig)
plt.legend()
fig.savefig(filename + "_piper_plot.png", dpi=120)

Example Piper Output

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.