Skip to content

Commit

Permalink
fix #35 added eg usage of mulitpolygon to search method, updated docs…
Browse files Browse the repository at this point in the history
…, bump dev ver
  • Loading branch information
sckott committed Sep 7, 2016
1 parent 32c52a9 commit a87468c
Show file tree
Hide file tree
Showing 30 changed files with 112 additions and 94 deletions.
Binary file modified docs/_build/doctrees/changelog_link.doctree
Binary file not shown.
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 modified docs/_build/doctrees/occurrences.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/registry.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/species.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: bc36c4c9c2d03236bb923cd2cf18b8e6
config: c571cc8b8670797ed127d983f05ff704
tags: 645f666f9bcd5a90fca523b33c5a78b7
8 changes: 4 additions & 4 deletions docs/_build/html/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

<title>Overview: module code &mdash; pygbif 0.1.5.1 documentation</title>
<title>Overview: module code &mdash; pygbif 0.1.5.3 documentation</title>



Expand All @@ -30,7 +30,7 @@



<link rel="top" title="pygbif 0.1.5.1 documentation" href="../index.html"/>
<link rel="top" title="pygbif 0.1.5.3 documentation" href="../index.html"/>


<script src="../_static/js/modernizr.min.js"></script>
Expand Down Expand Up @@ -58,7 +58,7 @@


<div class="version">
0.1.5.1
0.1.5.3
</div>


Expand Down Expand Up @@ -170,7 +170,7 @@ <h1>All modules for which code is available</h1>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'0.1.5.1',
VERSION:'0.1.5.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
8 changes: 4 additions & 4 deletions docs/_build/html/_modules/pygbif/occurrences/count.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

<title>pygbif.occurrences.count &mdash; pygbif 0.1.5.1 documentation</title>
<title>pygbif.occurrences.count &mdash; pygbif 0.1.5.3 documentation</title>



Expand All @@ -30,7 +30,7 @@



<link rel="top" title="pygbif 0.1.5.1 documentation" href="../../../index.html"/>
<link rel="top" title="pygbif 0.1.5.3 documentation" href="../../../index.html"/>
<link rel="up" title="Module code" href="../../index.html"/>


Expand Down Expand Up @@ -59,7 +59,7 @@


<div class="version">
0.1.5.1
0.1.5.3
</div>


Expand Down Expand Up @@ -296,7 +296,7 @@ <h1>Source code for pygbif.occurrences.count</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.1.5.1',
VERSION:'0.1.5.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
29 changes: 17 additions & 12 deletions docs/_build/html/_modules/pygbif/occurrences/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

<title>pygbif.occurrences.download &mdash; pygbif 0.1.5.1 documentation</title>
<title>pygbif.occurrences.download &mdash; pygbif 0.1.5.3 documentation</title>



Expand All @@ -30,7 +30,7 @@



<link rel="top" title="pygbif 0.1.5.1 documentation" href="../../../index.html"/>
<link rel="top" title="pygbif 0.1.5.3 documentation" href="../../../index.html"/>
<link rel="up" title="Module code" href="../../index.html"/>


Expand Down Expand Up @@ -59,7 +59,7 @@


<div class="version">
0.1.5.1
0.1.5.3
</div>


Expand Down Expand Up @@ -155,7 +155,7 @@ <h1>Source code for pygbif.occurrences.download</h1><div class="highlight"><pre>
<span class="n">value</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">variable</span><span class="p">)</span>
<span class="k">if</span> <span class="n">is_none</span><span class="p">(</span><span class="n">value</span><span class="p">):</span>
<span class="n">stop</span><span class="p">(</span><span class="s1">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">variable</span><span class="p">,</span>
<span class="sd">&quot;&quot;&quot; not supplied and no entry in environmental </span>
<span class="sd">&quot;&quot;&quot; not supplied and no entry in environmental</span>
<span class="sd"> variables&quot;&quot;&quot;</span><span class="p">]))</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="n">value</span>
Expand Down Expand Up @@ -213,6 +213,7 @@ <h1>Source code for pygbif.occurrences.download</h1><div class="highlight"><pre>
<span class="sd"> - issue = ``ISSUE``</span>
<span class="sd"> - mediatype = ``MEDIA_TYPE``</span>
<span class="sd"> - recordedBy = ``RECORDED_BY``</span>
<span class="sd"> - repatriated = ``REPATRIATED``</span>

<span class="sd"> See the API docs http://www.gbif.org/developer/occurrence#download</span>
<span class="sd"> for more info, and the predicates docs</span>
Expand Down Expand Up @@ -243,6 +244,9 @@ <h1>Source code for pygbif.occurrences.download</h1><div class="highlight"><pre>
<span class="sd"> &#39;decimalLatitude &lt;= -65&#39;], type=&#39;or&#39;)</span>
<span class="sd"> gg = occ.download([&#39;depth = 80&#39;, &#39;taxonKey = 2343454&#39;],</span>
<span class="sd"> type=&#39;or&#39;)</span>

<span class="sd"> # Repratriated data for Costa Rica</span>
<span class="sd"> occ.download([&#39;country = CR&#39;, &#39;repatriated = true&#39;])</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="n">user</span> <span class="o">=</span> <span class="n">_check_environ</span><span class="p">(</span><span class="s1">&#39;GBIF_USER&#39;</span><span class="p">,</span> <span class="n">user</span><span class="p">)</span>
Expand Down Expand Up @@ -484,16 +488,16 @@ <h1>Source code for pygbif.occurrences.download</h1><div class="highlight"><pre>
<span class="k">def</span> <span class="nf">download_get</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">path</span><span class="o">=</span><span class="s2">&quot;.&quot;</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get a download from GBIF.</span>
<span class="sd"> </span>

<span class="sd"> :param key: [str] A key generated from a request, like that from ``download``</span>
<span class="sd"> :param path: [str] Path to write zip file to. Default: ``&quot;.&quot;``, with a ``.zip`` appended to the end.</span>
<span class="sd"> :param **kwargs: Further named arguments passed on to ``requests.get``</span>
<span class="sd"> </span>
<span class="sd"> Downloads the zip file to a directory you specify on your machine. </span>
<span class="sd"> The speed of this function is of course proportional to the size of the </span>

<span class="sd"> Downloads the zip file to a directory you specify on your machine.</span>
<span class="sd"> The speed of this function is of course proportional to the size of the</span>
<span class="sd"> file to download, and affected by your internet connection speed.</span>
<span class="sd"> </span>
<span class="sd"> This function only downloads the file. To open and read it, see </span>

<span class="sd"> This function only downloads the file. To open and read it, see</span>
<span class="sd"> https://github.com/BelgianBiodiversityPlatform/python-dwca-reader</span>

<span class="sd"> Usage::</span>
Expand Down Expand Up @@ -547,7 +551,8 @@ <h1>Source code for pygbif.occurrences.download</h1><div class="highlight"><pre>
<span class="s1">&#39;collectionCode&#39;</span><span class="p">:</span> <span class="s1">&#39;COLLECTION_CODE&#39;</span><span class="p">,</span>
<span class="s1">&#39;issue&#39;</span><span class="p">:</span> <span class="s1">&#39;ISSUE&#39;</span><span class="p">,</span>
<span class="s1">&#39;mediatype&#39;</span><span class="p">:</span> <span class="s1">&#39;MEDIA_TYPE&#39;</span><span class="p">,</span>
<span class="s1">&#39;recordedBy&#39;</span><span class="p">:</span> <span class="s1">&#39;RECORDED_BY&#39;</span><span class="p">}</span>
<span class="s1">&#39;recordedBy&#39;</span><span class="p">:</span> <span class="s1">&#39;RECORDED_BY&#39;</span><span class="p">,</span>
<span class="s1">&#39;repatriated&#39;</span><span class="p">:</span> <span class="s1">&#39;REPATRIATED&#39;</span><span class="p">}</span>
</pre></div>

</div>
Expand Down Expand Up @@ -581,7 +586,7 @@ <h1>Source code for pygbif.occurrences.download</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.1.5.1',
VERSION:'0.1.5.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
8 changes: 4 additions & 4 deletions docs/_build/html/_modules/pygbif/occurrences/get.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

<title>pygbif.occurrences.get &mdash; pygbif 0.1.5.1 documentation</title>
<title>pygbif.occurrences.get &mdash; pygbif 0.1.5.3 documentation</title>



Expand All @@ -30,7 +30,7 @@



<link rel="top" title="pygbif 0.1.5.1 documentation" href="../../../index.html"/>
<link rel="top" title="pygbif 0.1.5.3 documentation" href="../../../index.html"/>
<link rel="up" title="Module code" href="../../index.html"/>


Expand Down Expand Up @@ -59,7 +59,7 @@


<div class="version">
0.1.5.1
0.1.5.3
</div>


Expand Down Expand Up @@ -218,7 +218,7 @@ <h1>Source code for pygbif.occurrences.get</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.1.5.1',
VERSION:'0.1.5.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
13 changes: 8 additions & 5 deletions docs/_build/html/_modules/pygbif/occurrences/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

<title>pygbif.occurrences.search &mdash; pygbif 0.1.5.1 documentation</title>
<title>pygbif.occurrences.search &mdash; pygbif 0.1.5.3 documentation</title>



Expand All @@ -30,7 +30,7 @@



<link rel="top" title="pygbif 0.1.5.1 documentation" href="../../../index.html"/>
<link rel="top" title="pygbif 0.1.5.3 documentation" href="../../../index.html"/>
<link rel="up" title="Module code" href="../../index.html"/>


Expand Down Expand Up @@ -59,7 +59,7 @@


<div class="version">
0.1.5.1
0.1.5.3
</div>


Expand Down Expand Up @@ -184,7 +184,7 @@ <h1>Source code for pygbif.occurrences.search</h1><div class="highlight"><pre>
<span class="sd"> whereas ``30,5`` wouldn&#39;t work)</span>
<span class="sd"> :param geometry: [str] Searches for occurrences inside a polygon described in Well Known</span>
<span class="sd"> Text (WKT) format. A WKT shape written as either POINT, LINESTRING, LINEARRING</span>
<span class="sd"> or POLYGON. Example of a polygon: ``((30.1 10.1, 20, 20 40, 40 40, 30.1 10.1))`` would be queried as http://bit.ly/1BzNwDq.</span>
<span class="sd"> POLYGON, or MULTIPOLYGON. Example of a polygon: ``((30.1 10.1, 20, 20 40, 40 40, 30.1 10.1))`` would be queried as http://bit.ly/1BzNwDq.</span>
<span class="sd"> :param hasGeospatialIssue: [bool] Includes/excludes occurrence records which contain spatial</span>
<span class="sd"> issues (as determined in our record interpretation), i.e. ``hasGeospatialIssue=TRUE``</span>
<span class="sd"> returns only those records with spatial issues while ``hasGeospatialIssue=FALSE`` includes</span>
Expand Down Expand Up @@ -271,6 +271,9 @@ <h1>Source code for pygbif.occurrences.search</h1><div class="highlight"><pre>
<span class="sd"> from pygbif import species</span>
<span class="sd"> key = species.name_suggest(q=&#39;Aesculus hippocastanum&#39;)[0][&#39;key&#39;]</span>
<span class="sd"> occurrences.search(taxonKey=key, geometry=&#39;POLYGON((30.1 10.1, 10 20, 20 40, 40 40, 30.1 10.1))&#39;, limit=20)</span>
<span class="sd"> ## multipolygon</span>
<span class="sd"> wkt = &#39;MULTIPOLYGON(((-123 38, -123 43, -116 43, -116 38, -123 38)),((-97 41, -97 45, -93 45, -93 41, -97 41)))&#39;</span>
<span class="sd"> occurrences.search(geometry = wkt, limit = 20)</span>

<span class="sd"> # Search on country</span>
<span class="sd"> occurrences.search(country=&#39;US&#39;, limit=20)</span>
Expand Down Expand Up @@ -414,7 +417,7 @@ <h1>Source code for pygbif.occurrences.search</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.1.5.1',
VERSION:'0.1.5.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
8 changes: 4 additions & 4 deletions docs/_build/html/_modules/pygbif/registry/datasets.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

<title>pygbif.registry.datasets &mdash; pygbif 0.1.5.1 documentation</title>
<title>pygbif.registry.datasets &mdash; pygbif 0.1.5.3 documentation</title>



Expand All @@ -30,7 +30,7 @@



<link rel="top" title="pygbif 0.1.5.1 documentation" href="../../../index.html"/>
<link rel="top" title="pygbif 0.1.5.3 documentation" href="../../../index.html"/>
<link rel="up" title="Module code" href="../../index.html"/>


Expand Down Expand Up @@ -59,7 +59,7 @@


<div class="version">
0.1.5.1
0.1.5.3
</div>


Expand Down Expand Up @@ -249,7 +249,7 @@ <h1>Source code for pygbif.registry.datasets</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.1.5.1',
VERSION:'0.1.5.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
8 changes: 4 additions & 4 deletions docs/_build/html/_modules/pygbif/registry/installations.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

<title>pygbif.registry.installations &mdash; pygbif 0.1.5.1 documentation</title>
<title>pygbif.registry.installations &mdash; pygbif 0.1.5.3 documentation</title>



Expand All @@ -30,7 +30,7 @@



<link rel="top" title="pygbif 0.1.5.1 documentation" href="../../../index.html"/>
<link rel="top" title="pygbif 0.1.5.3 documentation" href="../../../index.html"/>
<link rel="up" title="Module code" href="../../index.html"/>


Expand Down Expand Up @@ -59,7 +59,7 @@


<div class="version">
0.1.5.1
0.1.5.3
</div>


Expand Down Expand Up @@ -222,7 +222,7 @@ <h1>Source code for pygbif.registry.installations</h1><div class="highlight"><pr
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.1.5.1',
VERSION:'0.1.5.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
8 changes: 4 additions & 4 deletions docs/_build/html/_modules/pygbif/registry/networks.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

<title>pygbif.registry.networks &mdash; pygbif 0.1.5.1 documentation</title>
<title>pygbif.registry.networks &mdash; pygbif 0.1.5.3 documentation</title>



Expand All @@ -30,7 +30,7 @@



<link rel="top" title="pygbif 0.1.5.1 documentation" href="../../../index.html"/>
<link rel="top" title="pygbif 0.1.5.3 documentation" href="../../../index.html"/>
<link rel="up" title="Module code" href="../../index.html"/>


Expand Down Expand Up @@ -59,7 +59,7 @@


<div class="version">
0.1.5.1
0.1.5.3
</div>


Expand Down Expand Up @@ -212,7 +212,7 @@ <h1>Source code for pygbif.registry.networks</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.1.5.1',
VERSION:'0.1.5.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down

0 comments on commit a87468c

Please sign in to comment.