Skip to content

Commit

Permalink
updated docs for v0.34
Browse files Browse the repository at this point in the history
  • Loading branch information
speleophysics committed Feb 5, 2018
1 parent b004b96 commit ed29b89
Show file tree
Hide file tree
Showing 296 changed files with 1,278 additions and 1,183 deletions.
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXBUILD = python -msphinx
PAPER =
BUILDDIR = _build

Expand Down
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.USGS.DataRetrieval.GetSiteData.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.USGS.DataRetrieval.querySiteList.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.USGS.PhreeqcPandas.processPanel.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.USGS.WQXtoPandas.WQXtoPandas.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.USGS.WQXtoPandas.runWQXtoPandas.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.USGS.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.H2CO3fromPCO2.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.H2CO3sfromPCO2.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.PCO2FromSolution.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.activityHFromPCO2.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_K_0.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_K_1.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_K_2.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_K_H.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_K_W.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_K_c.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_k1.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_k2.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_k_neg1.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_k_neg2.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_kappa1.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_kappa2.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_kappa3.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_kappa4Franci.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_kappa4Pascal.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.calc_kappa4Theory.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.concCaEqFromPCO2.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.concCaEqFromSolution.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.concHFromCaPCO2Relaxed.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.palmerFromSolution.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.palmerRate.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.pwpFromSolution.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.pwpRateFranci.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.pwpRatePascal.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.pwpRateTheory.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.pwp_to_mm_yr.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.solutionFromCaPCO2.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.solutionFromCaPCO2Relaxed.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.calcite.solutionFrompHCaRelaxed.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.CaFromCond.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.CtoK.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.DebyeHuckel.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.HardnessFromCond.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.KtoC.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.approxI.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.condTo25.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.gamma.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.getProperties.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.mgL_to_molL.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.mmolL_to_meqL.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.molL_to_meqL.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.molL_to_mgL.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.neutralGamma.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.general.solution.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/olm.loggers.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 2bc3b75627c85f94c46e07f0934c4813
config: 3d55d12245d82e05c77290866a35feed
tags: 645f666f9bcd5a90fca523b33c5a78b7
9 changes: 3 additions & 6 deletions docs/_build/html/_modules/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Overview: module code &#8212; olm 0.33 documentation</title>

<link rel="stylesheet" href="../_static//default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />

<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
Expand All @@ -27,7 +24,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
</head>
<body role="document">
<body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
Expand Down Expand Up @@ -96,7 +93,7 @@ <h3>Navigation</h3>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2014,2015 Matthew Covington.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.1.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.3.
</div>
</body>
</html>
53 changes: 28 additions & 25 deletions docs/_build/html/_modules/olm/USGS/DataRetrieval.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>olm.USGS.DataRetrieval &#8212; olm 0.33 documentation</title>

<link rel="stylesheet" href="../../../_static//default.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />

<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
Expand All @@ -27,7 +24,7 @@
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
</head>
<body role="document">
<body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
Expand All @@ -54,9 +51,12 @@ <h1>Source code for olm.USGS.DataRetrieval</h1><div class="highlight"><pre>
<span class="sd">&quot;&quot;&quot;</span>

<span class="kn">from</span> <span class="nn">lxml</span> <span class="k">import</span> <span class="n">etree</span>
<span class="kn">import</span> <span class="nn">lxml.html</span>
<span class="kn">import</span> <span class="nn">urllib</span><span class="o">,</span> <span class="nn">requests</span> <span class="c1">#could eventually rework to use only requests</span>
<span class="kn">from</span> <span class="nn">StringIO</span> <span class="k">import</span> <span class="n">StringIO</span>
<span class="kn">import</span> <span class="nn">lxml.html</span><span class="o">,</span> <span class="nn">requests</span>
<span class="k">try</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">urllib.parse</span> <span class="k">import</span> <span class="n">quote</span> <span class="c1">#could eventually rework to use only requests</span>
<span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">urllib</span> <span class="k">import</span> <span class="n">quote</span>
<span class="kn">from</span> <span class="nn">io</span> <span class="k">import</span> <span class="n">StringIO</span>
<span class="kn">from</span> <span class="nn">pandas</span> <span class="k">import</span> <span class="n">read_csv</span><span class="p">,</span> <span class="n">DataFrame</span><span class="p">,</span> <span class="n">to_datetime</span>
<span class="c1">#import requests</span>
<span class="c1">#import os</span>
Expand Down Expand Up @@ -172,17 +172,17 @@ <h1>Source code for olm.USGS.DataRetrieval</h1><div class="highlight"><pre>
<span class="n">BASEURL</span> <span class="o">=</span> <span class="s1">&#39;https://waterservices.usgs.gov/nwis/site/?site=&#39;</span>
<span class="n">queryURL</span> <span class="o">=</span> <span class="n">BASEURL</span> <span class="o">+</span> <span class="n">sitenum</span> <span class="o">+</span> <span class="s1">&#39;&amp;siteOutput=expanded&#39;</span>
<span class="c1">#Need to skip header, which is hopefully uniform across USGS queries</span>
<span class="n">skiprows</span> <span class="o">=</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">59</span><span class="p">)</span>
<span class="n">skiprows</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">59</span><span class="p">))</span>
<span class="n">skiprows</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="mi">60</span><span class="p">)</span>
<span class="n">siteDF</span> <span class="o">=</span> <span class="n">read_csv</span><span class="p">(</span><span class="n">queryURL</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s1">&#39;</span><span class="se">\t</span><span class="s1">&#39;</span><span class="p">,</span> <span class="n">skiprows</span><span class="o">=</span><span class="n">skiprows</span><span class="p">)</span>
<span class="n">siteDF</span> <span class="o">=</span> <span class="n">siteDF</span><span class="o">.</span><span class="n">ix</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="c1">#change axis so that we only have key-data pairs</span>
<span class="k">return</span> <span class="n">siteDF</span></div>

<div class="viewcode-block" id="querySiteList"><a class="viewcode-back" href="../../../olm.USGS.DataRetrieval.querySiteList.html#olm.USGS.DataRetrieval.querySiteList">[docs]</a><span class="k">def</span> <span class="nf">querySiteList</span><span class="p">(</span><span class="n">siteList</span><span class="p">,</span> <span class="n">charList</span><span class="p">):</span>
<span class="n">BASE_URL</span> <span class="o">=</span> <span class="s1">&#39;https://waterqualitydata.us/Result/search?&#39;</span>
<span class="n">BASE_URL</span> <span class="o">=</span> <span class="s1">&#39;https://www.waterqualitydata.us/Result/search?&#39;</span>
<span class="n">queryText</span> <span class="o">=</span> <span class="n">BASE_URL</span> <span class="o">+</span> <span class="s1">&#39;siteid=&#39;</span>
<span class="c1">#add sites to query</span>
<span class="k">for</span> <span class="n">site</span> <span class="ow">in</span> <span class="n">siteList</span><span class="p">:</span>
<span class="k">for</span> <span class="n">site</span> <span class="ow">in</span> <span class="n">siteList</span><span class="p">:</span>
<span class="c1">#check for USGS prefixes (are there others? EPA?)</span>
<span class="k">if</span> <span class="ow">not</span><span class="p">(</span><span class="n">site</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s1">&#39;USGS-&#39;</span><span class="p">)):</span>
<span class="n">site</span> <span class="o">=</span> <span class="s1">&#39;USGS-&#39;</span> <span class="o">+</span> <span class="n">site</span>
Expand All @@ -199,17 +199,17 @@ <h1>Source code for olm.USGS.DataRetrieval</h1><div class="highlight"><pre>
<span class="c1">#add mime type</span>
<span class="n">queryText</span> <span class="o">+=</span> <span class="s1">&#39;&amp;mimeType=xml&#39;</span>
<span class="c1">#convert query string to url special characters</span>
<span class="n">queryText</span> <span class="o">=</span> <span class="n">urllib</span><span class="o">.</span><span class="n">quote</span><span class="p">(</span><span class="n">queryText</span><span class="p">,</span> <span class="n">safe</span><span class="o">=</span><span class="s2">&quot;/&amp;=:?&quot;</span><span class="p">)</span>
<span class="n">queryText</span> <span class="o">=</span> <span class="n">quote</span><span class="p">(</span><span class="n">queryText</span><span class="p">,</span> <span class="n">safe</span><span class="o">=</span><span class="s2">&quot;/&amp;=:?&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">queryText</span></div>


<div class="viewcode-block" id="GetDailyDischarge"><a class="viewcode-back" href="../../../olm.USGS.DataRetrieval.GetDailyDischarge.html#olm.USGS.DataRetrieval.GetDailyDischarge">[docs]</a><span class="k">def</span> <span class="nf">GetDailyDischarge</span><span class="p">(</span><span class="n">location</span><span class="p">,</span> <span class="n">date</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Retrieve daily average discharge value from USGS database for given date and USGS site.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> location : string </span>
<span class="sd"> location : string</span>
<span class="sd"> Full USGS site number starting with &#39;USGS-&#39; or a string that just contains the bare integer number of a USGS site.</span>
<span class="sd"> date : string</span>
<span class="sd"> String containing the date for which discharge will be retrieved. Should be given as YYYY-MM-DD.</span>
Expand Down Expand Up @@ -237,13 +237,15 @@ <h1>Source code for olm.USGS.DataRetrieval</h1><div class="highlight"><pre>
<span class="n">query_html</span> <span class="o">=</span> <span class="n">BASE_URL</span> <span class="o">+</span> <span class="s1">&#39;&amp;sites=&#39;</span> <span class="o">+</span> <span class="n">site_number</span> <span class="o">+</span> <span class="s1">&#39;&amp;startDT=&#39;</span><span class="o">+</span><span class="n">date</span><span class="o">+</span><span class="s1">&#39;&amp;endDT=&#39;</span><span class="o">+</span><span class="n">date</span>
<span class="c1">#read in xml file through html query</span>
<span class="k">try</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Discharge query html: &quot;</span><span class="p">,</span><span class="n">query_html</span><span class="p">)</span>
<span class="n">r</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">query_html</span><span class="p">)</span>
<span class="n">qtree</span> <span class="o">=</span> <span class="n">etree</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">StringIO</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">content</span><span class="p">))</span>
<span class="c1">#qtree = etree.parse(r.raw)</span>
<span class="n">root</span> <span class="o">=</span> <span class="n">etree</span><span class="o">.</span><span class="n">fromstring</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">content</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">IOError</span><span class="p">:</span>
<span class="nb">print</span> <span class="s2">&quot;Problem retrieving discharge value (IOError).&quot;</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Problem retrieving discharge value (IOError).&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="o">-</span><span class="mi">1</span>
<span class="c1">#parse xml file to pull out discharge and quality code</span>
<span class="n">root</span> <span class="o">=</span> <span class="n">qtree</span><span class="o">.</span><span class="n">getroot</span><span class="p">()</span>
<span class="c1">#root = qtree.getroot()</span>
<span class="c1">#get namespace map</span>
<span class="n">NSMAP</span> <span class="o">=</span> <span class="n">root</span><span class="o">.</span><span class="n">nsmap</span>
<span class="n">NS1</span> <span class="o">=</span> <span class="s2">&quot;{</span><span class="si">%s</span><span class="s2">}&quot;</span> <span class="o">%</span> <span class="n">NSMAP</span><span class="p">[</span><span class="s1">&#39;ns1&#39;</span><span class="p">]</span>
Expand Down Expand Up @@ -272,16 +274,16 @@ <h1>Source code for olm.USGS.DataRetrieval</h1><div class="highlight"><pre>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> location : str </span>
<span class="sd"> location : str</span>
<span class="sd"> Full USGS site number starting with &#39;USGS-&#39; or a string that just contains the bare integer number of a USGS site.</span>
<span class="sd"> start_date : str</span>
<span class="sd"> String containing the beginning date in the range for which discharge will be retrieved. Should be given as YYYY-MM-DD.</span>
<span class="sd"> end_date : str (optional)</span>
<span class="sd"> String containing the ending date in the range for which discharge will be retrieved. Should be given as YYYY-MM-DD. If not provided then data will be retrieved up to the current date.</span>
<span class="sd"> </span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> data : pandas dataframe </span>
<span class="sd"> data : pandas dataframe</span>
<span class="sd"> Returns a Pandas dataframe with an index of the date, a column &#39;discharge&#39; of discharge values, and a column &#39;quality&#39; of the USGS quality rating.</span>

<span class="sd"> Notes</span>
Expand All @@ -306,12 +308,13 @@ <h1>Source code for olm.USGS.DataRetrieval</h1><div class="highlight"><pre>
<span class="c1">#read in xml file through html query</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">r</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">query_html</span><span class="p">)</span>
<span class="n">qtree</span> <span class="o">=</span> <span class="n">etree</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">StringIO</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">content</span><span class="p">))</span>
<span class="c1">#qtree = etree.parse(r.raw)</span>
<span class="n">root</span> <span class="o">=</span> <span class="n">etree</span><span class="o">.</span><span class="n">fromstring</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">content</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">IOError</span><span class="p">:</span>
<span class="nb">print</span> <span class="s2">&quot;Problem retrieving discharge value (IOError).&quot;</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Problem retrieving discharge value (IOError).&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="o">-</span><span class="mi">1</span>
<span class="c1">#parse xml file to pull out discharge and quality code</span>
<span class="n">root</span> <span class="o">=</span> <span class="n">qtree</span><span class="o">.</span><span class="n">getroot</span><span class="p">()</span>
<span class="c1">#root = qtree.getroot()</span>
<span class="c1">#get namespace map</span>
<span class="n">NSMAP</span> <span class="o">=</span> <span class="n">root</span><span class="o">.</span><span class="n">nsmap</span>
<span class="n">NS1</span> <span class="o">=</span> <span class="s2">&quot;{</span><span class="si">%s</span><span class="s2">}&quot;</span> <span class="o">%</span> <span class="n">NSMAP</span><span class="p">[</span><span class="s1">&#39;ns1&#39;</span><span class="p">]</span>
Expand Down Expand Up @@ -374,7 +377,7 @@ <h3>Navigation</h3>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2014,2015 Matthew Covington.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.1.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.3.
</div>
</body>
</html>

0 comments on commit ed29b89

Please sign in to comment.