Skip to content

Commit

Permalink
fix a bunch of docs problems
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Jun 10, 2020
1 parent d70e840 commit dcbebbf
Show file tree
Hide file tree
Showing 37 changed files with 3,164 additions and 1,512 deletions.
Binary file modified docs/_build/doctrees/col.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/gni.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/gnr.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/ids.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/itis.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/tax.doctree
Binary file not shown.
7 changes: 6 additions & 1 deletion docs/_build/html/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@
<div itemprop="articleBody">

<h1>All modules for which code is available</h1>
<ul><li><a href="pytaxize/itis/itis.html">pytaxize.itis.itis</a></li>
<ul><li><a href="pytaxize/col/col.html">pytaxize.col.col</a></li>
<li><a href="pytaxize/gbif/parse.html">pytaxize.gbif.parse</a></li>
<li><a href="pytaxize/gn/gni.html">pytaxize.gn.gni</a></li>
<li><a href="pytaxize/gn/gnr.html">pytaxize.gn.gnr</a></li>
<li><a href="pytaxize/ids/ids.html">pytaxize.ids.ids</a></li>
<li><a href="pytaxize/itis/itis.html">pytaxize.itis.itis</a></li>
<li><a href="pytaxize/tax.html">pytaxize.tax</a></li>
</ul>

Expand Down
539 changes: 539 additions & 0 deletions docs/_build/html/_modules/pytaxize/col/col.html

Large diffs are not rendered by default.

253 changes: 253 additions & 0 deletions docs/_build/html/_modules/pytaxize/gbif/parse.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@


<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>pytaxize.gbif.parse &mdash; pytaxize 0.6.91 documentation</title>















<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />


<script src="../../../_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav">


<div class="wy-grid-for-nav">


<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">



<a href="../../../index.html" class="icon icon-home"> pytaxize



</a>




<div class="version">
0.6.91
</div>




<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>


</div>

<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">






<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../col.html">Catalogue of Life</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../gnr.html">Global Names Resolver</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../gni.html">Global Names Index</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../tax.html">Variety of functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../ids.html">Taxonomic Identifiers Class</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../itis.html">ITIS</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../changelog_link.html">Changelog</a></li>
</ul>



</div>
</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">


<nav class="wy-nav-top" aria-label="top navigation">

<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">pytaxize</a>

</nav>


<div class="wy-nav-content">

<div class="rst-content">

















<div role="navigation" aria-label="breadcrumbs navigation">

<ul class="wy-breadcrumbs">

<li><a href="../../../index.html">Docs</a> &raquo;</li>

<li><a href="../../index.html">Module code</a> &raquo;</li>

<li>pytaxize.gbif.parse</li>


<li class="wy-breadcrumbs-aside">

</li>

</ul>


<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<h1>Source code for pytaxize.gbif.parse</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">json</span>
<span class="kn">from</span> <span class="nn">pytaxize.refactor</span> <span class="kn">import</span> <span class="n">Refactor</span>

<span class="k">try</span><span class="p">:</span>
<span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
<span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
<span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span><span class="s2">&quot;Pandas library not installed, dataframes disabled&quot;</span><span class="p">)</span>
<span class="n">pd</span> <span class="o">=</span> <span class="kc">None</span>

<span class="k">def</span> <span class="nf">parse</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">as_dataframe</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Parse taxon names using the GBIF name parser.</span>

<span class="sd"> :param name: A character vector of scientific names.</span>
<span class="sd"> Returns a DataFrame containing fields extracted from parsed</span>
<span class="sd"> taxon names. Fields returned are the union of fields extracted from</span>
<span class="sd"> all species names in scientificname</span>
<span class="sd"> :param as_dataframe: (optional) Type: boolean. Return as pandas data frame?</span>
<span class="sd"> default: False</span>

<span class="sd"> Author John Baumgartner (johnbb@student.unimelb.edu.au)</span>

<span class="sd"> References http://dev.gbif.org/wiki/display/POR/Webservice+API,</span>
<span class="sd"> http://tools.gbif.org/nameparser/api.do</span>

<span class="sd"> Usage::</span>

<span class="sd"> from pytaxize import gbif</span>
<span class="sd"> gbif.parse(name=[&#39;x Agropogon littoralis&#39;])</span>
<span class="sd"> names = [&#39;x Agropogon littoralis&#39;, &#39;Helianthus annuus texanus&#39;]</span>
<span class="sd"> gbif.parse(names)</span>
<span class="sd"> gbif.parse(names, as_dataframe=True)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">name</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
<span class="n">url</span> <span class="o">=</span> <span class="s2">&quot;https://api.gbif.org/v0.9/parser/name&quot;</span>
<span class="n">headers</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;content-type&quot;</span><span class="p">:</span> <span class="s2">&quot;application/json&quot;</span><span class="p">}</span>
<span class="n">tt</span> <span class="o">=</span> <span class="n">Refactor</span><span class="p">(</span><span class="n">url</span><span class="p">,</span> <span class="n">payload</span><span class="o">=</span><span class="p">{},</span> <span class="n">request</span><span class="o">=</span><span class="s2">&quot;post&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">json</span><span class="p">(</span>
<span class="n">data</span><span class="o">=</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">name</span><span class="p">),</span> <span class="n">headers</span><span class="o">=</span><span class="n">headers</span>
<span class="p">)</span>
<span class="k">if</span> <span class="n">as_dataframe</span><span class="p">:</span>
<span class="n">tt</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">tt</span><span class="p">)</span>
<span class="k">return</span> <span class="n">tt</span>
</pre></div>

</div>

</div>
<footer>


<hr/>

<div role="contentinfo">
<p>
&copy; Copyright 2020, Scott Chamberlain.

</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.

</footer>

</div>
</div>

</section>

</div>





<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.6.91',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>



<script type="text/javascript" src="../../../_static/js/theme.js"></script>

<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>

</body>
</html>
Loading

0 comments on commit dcbebbf

Please sign in to comment.