Skip to content

Commit

Permalink
Merge pull request #27 from stijnvanhoey/downloads
Browse files Browse the repository at this point in the history
Downloads
  • Loading branch information
sckott committed Jun 7, 2016
2 parents bfb9ca1 + eb2bd06 commit beb3a42
Show file tree
Hide file tree
Showing 44 changed files with 1,625 additions and 975 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@

.tox
.coverage

# test DwcA
*.zip

# pycharm project info
.idea/
8 changes: 5 additions & 3 deletions demos/pygbif-intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@
"collapsed": true
},
"outputs": [],
"source": []
"source": [
""
]
}
],
"metadata": {
Expand All @@ -296,7 +298,7 @@
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 2.0
},
"file_extension": ".py",
"mimetype": "text/x-python",
Expand All @@ -308,4 +310,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
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.
4 changes: 2 additions & 2 deletions docs/_build/html/_modules/pygbif/occurrences/count.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<div itemprop="articleBody">

<h1>Source code for pygbif.occurrences.count</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">..gbifutils</span> <span class="kn">import</span> <span class="o">*</span>
<span></span><span class="kn">from</span> <span class="nn">..gbifutils</span> <span class="kn">import</span> <span class="o">*</span>

<span class="k">def</span> <span class="nf">count</span><span class="p">(</span><span class="n">taxonKey</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">basisOfRecord</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">country</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">isGeoreferenced</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
<span class="n">datasetKey</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">publishingCountry</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">typeStatus</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
Expand Down Expand Up @@ -184,7 +184,7 @@ <h1>Source code for pygbif.occurrences.count</h1><div class="highlight"><pre>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Lists occurrence counts by year</span>

<span class="sd"> :param year: [int] year range, e.g., &quot;1990,2000&quot;. Does not support ranges like &quot;asterisk,2010&quot;</span>
<span class="sd"> :param year: [int] year range, e.g., ``1990,2000``. Does not support ranges like ``asterisk,2010``</span>

<span class="sd"> :return: dict</span>

Expand Down
615 changes: 381 additions & 234 deletions docs/_build/html/_modules/pygbif/occurrences/download.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_build/html/_modules/pygbif/occurrences/get.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<div itemprop="articleBody">

<h1>Source code for pygbif.occurrences.get</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">..gbifutils</span> <span class="kn">import</span> <span class="o">*</span>
<span></span><span class="kn">from</span> <span class="nn">..gbifutils</span> <span class="kn">import</span> <span class="o">*</span>

<span class="k">def</span> <span class="nf">get</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
Expand Down
68 changes: 34 additions & 34 deletions docs/_build/html/_modules/pygbif/occurrences/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<div itemprop="articleBody">

<h1>Source code for pygbif.occurrences.search</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">..gbifutils</span> <span class="kn">import</span> <span class="o">*</span>
<span></span><span class="kn">from</span> <span class="nn">..gbifutils</span> <span class="kn">import</span> <span class="o">*</span>

<span class="k">def</span> <span class="nf">search</span><span class="p">(</span><span class="n">taxonKey</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">scientificName</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">country</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
<span class="n">publishingCountry</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">hasCoordinate</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">typeStatus</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
Expand All @@ -151,65 +151,65 @@ <h1>Source code for pygbif.occurrences.search</h1><div class="highlight"><pre>
<span class="sd"> :param recordedBy: [str] The person who recorded the occurrence.</span>
<span class="sd"> :param collectionCode: [str] An identifier of any form assigned by the source to identify the physical collection or digital dataset uniquely within the text of an institution.</span>
<span class="sd"> :param institutionCode: [str] An identifier of any form assigned by the source to identify the institution the record belongs to. Not guaranteed to be que.</span>
<span class="sd"> :param country: [str] The 2-letter country code (as per ISO-3166-1) of the country in which the occurrence was recorded. See here http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2}</span>
<span class="sd"> :param country: [str] The 2-letter country code (as per ISO-3166-1) of the country in which the occurrence was recorded. See here http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2</span>
<span class="sd"> :param basisOfRecord: [str] Basis of record, as defined in our BasisOfRecord enum here http://gbif.github.io/gbif-api/apidocs/org/gbif/api/vocabulary/BasisOfRecord.html Acceptable values are:</span>

<span class="sd"> - FOSSIL_SPECIMEN An occurrence record describing a fossilized specimen.</span>
<span class="sd"> - HUMAN_OBSERVATION An occurrence record describing an observation made by one or more people.</span>
<span class="sd"> - LITERATURE An occurrence record based on literature alone.</span>
<span class="sd"> - LIVING_SPECIMEN An occurrence record describing a living specimen, e.g.</span>
<span class="sd"> - MACHINE_OBSERVATION An occurrence record describing an observation made by a machine.</span>
<span class="sd"> - OBSERVATION An occurrence record describing an observation.</span>
<span class="sd"> - PRESERVED_SPECIMEN An occurrence record describing a preserved specimen.</span>
<span class="sd"> - UNKNOWN Unknown basis for the record.</span>
<span class="sd"> - ``FOSSIL_SPECIMEN`` An occurrence record describing a fossilized specimen.</span>
<span class="sd"> - ``HUMAN_OBSERVATION`` An occurrence record describing an observation made by one or more people.</span>
<span class="sd"> - ``LITERATURE`` An occurrence record based on literature alone.</span>
<span class="sd"> - ``LIVING_SPECIMEN`` An occurrence record describing a living specimen, e.g.</span>
<span class="sd"> - ``MACHINE_OBSERVATION`` An occurrence record describing an observation made by a machine.</span>
<span class="sd"> - ``OBSERVATION`` An occurrence record describing an observation.</span>
<span class="sd"> - ``PRESERVED_SPECIMEN`` An occurrence record describing a preserved specimen.</span>
<span class="sd"> - ``UNKNOWN`` Unknown basis for the record.</span>

<span class="sd"> :param eventDate: [date] Occurrence date in ISO 8601 format: yyyy, yyyy-MM, yyyy-MM-dd, or</span>
<span class="sd"> MM-dd. Supports range queries, smaller,larger (e.g., &#39;1990,1991&#39;, whereas &#39;1991,1990&#39;</span>
<span class="sd"> MM-dd. Supports range queries, smaller,larger (e.g., ``1990,1991``, whereas ``1991,1990``</span>
<span class="sd"> wouldn&#39;t work)</span>
<span class="sd"> :param year: [int] The 4 digit year. A year of 98 will be interpreted as AD 98. Supports range queries,</span>
<span class="sd"> smaller,larger (e.g., &#39;1990,1991&#39;, whereas &#39;1991,1990&#39; wouldn&#39;t work)</span>
<span class="sd"> smaller,larger (e.g., ``1990,1991``, whereas ``1991,1990`` wouldn&#39;t work)</span>
<span class="sd"> :param month: [int] The month of the year, starting with 1 for January. Supports range queries,</span>
<span class="sd"> smaller,larger (e.g., &#39;1,2&#39;, whereas &#39;2,1&#39; wouldn&#39;t work)</span>
<span class="sd"> smaller,larger (e.g., ``1,2``, whereas ``2,1`` wouldn&#39;t work)</span>
<span class="sd"> :param q: [str] Query terms. The value for this parameter can be a simple word or a phrase.</span>
<span class="sd"> :param decimalLatitude: [float] Latitude in decimals between -90 and 90 based on WGS 84.</span>
<span class="sd"> Supports range queries, smaller,larger (e.g., &#39;25,30&#39;, whereas &#39;30,25&#39; wouldn&#39;t work)</span>
<span class="sd"> Supports range queries, smaller,larger (e.g., ``25,30``, whereas ``30,25`` wouldn&#39;t work)</span>
<span class="sd"> :param decimalLongitude: [float] Longitude in decimals between -180 and 180 based on WGS 84.</span>
<span class="sd"> Supports range queries (e.g., &#39;-0.4,-0.2&#39;, whereas &#39;-0.2,-0.4&#39; wouldn&#39;t work).</span>
<span class="sd"> Supports range queries (e.g., ``-0.4,-0.2``, whereas ``-0.2,-0.4`` wouldn&#39;t work).</span>
<span class="sd"> :param publishingCountry: [str] The 2-letter country code (as per ISO-3166-1) of the</span>
<span class="sd"> country in which the occurrence was recorded.</span>
<span class="sd"> :param elevation: [int/str] Elevation in meters above sea level. Supports range queries, smaller,larger</span>
<span class="sd"> (e.g., &#39;5,30&#39;, whereas &#39;30,5&#39; wouldn&#39;t work)</span>
<span class="sd"> (e.g., ``5,30``, whereas ``30,5`` wouldn&#39;t work)</span>
<span class="sd"> :param depth: [int/str] Depth in meters relative to elevation. For example 10 meters below a</span>
<span class="sd"> lake surface with given elevation. Supports range queries, smaller,larger (e.g., &#39;5,30&#39;,</span>
<span class="sd"> whereas &#39;30,5&#39; wouldn&#39;t work)</span>
<span class="sd"> lake surface with given elevation. Supports range queries, smaller,larger (e.g., ``5,30``,</span>
<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"> 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"> :param hasGeospatialIssue: [bool] Includes/excludes occurrence records which contain spatial</span>
<span class="sd"> issues (as determined in our record interpretation), i.e. \code{hasGeospatialIssue=TRUE}</span>
<span class="sd"> returns only those records with spatial issues while \code{hasGeospatialIssue=FALSE} includes</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>
<span class="sd"> only records without spatial issues. The absence of this parameter returns any</span>
<span class="sd"> record with or without spatial issues.</span>
<span class="sd"> :param issue: [str] One or more of many possible issues with each occurrence record. See</span>
<span class="sd"> Details. Issues passed to this parameter filter results by the issue.</span>
<span class="sd"> :param hasCoordinate: (logical) Return only occurence records with lat/long data (TRUE) or</span>
<span class="sd"> all records (FALSE, default).</span>
<span class="sd"> :param hasCoordinate: (logical) Return only occurence records with lat/long data (``TRUE``) or</span>
<span class="sd"> all records (``FALSE``, default).</span>
<span class="sd"> :param typeStatus: [str] Type status of the specimen. One of many options. See ?typestatus</span>
<span class="sd"> :param recordNumber: [int] Number recorded by collector of the data, different from GBIF record</span>
<span class="sd"> number. See http://rs.tdwg.org/dwc/terms/#recordNumber} for more info</span>
<span class="sd"> :param lastInterpreted: [date] Date the record was last modified in GBIF, in ISO 8601 format:</span>
<span class="sd"> yyyy, yyyy-MM, yyyy-MM-dd, or MM-dd. Supports range queries, smaller,larger (e.g.,</span>
<span class="sd"> &#39;1990,1991&#39;, whereas &#39;1991,1990&#39; wouldn&#39;t work)</span>
<span class="sd"> :param continent: [str] Continent. One of africa, antarctica, asia, europe, north_america</span>
<span class="sd"> (North America includes the Caribbean and reachies down and includes Panama), oceania,</span>
<span class="sd"> or south_america</span>
<span class="sd"> :param fields: [str] Default (&#39;all&#39;) returns all fields. &#39;minimal&#39; returns just taxon name,</span>
<span class="sd"> key, latitude, and longitute. Or specify each field you want returned by name, e.g.</span>
<span class="sd"> fields = c(&#39;name&#39;,&#39;latitude&#39;,&#39;elevation&#39;).</span>
<span class="sd"> :param mediatype: [str] Media type. Default is NULL, so no filtering on mediatype. Options:</span>
<span class="sd"> NULL, &#39;MovingImage&#39;, &#39;Sound&#39;, and &#39;StillImage&#39;</span>
<span class="sd"> :param limit: [int] Number of results to return. Default: 300</span>
<span class="sd"> :param offset: [int] Record to start at. Default: 0</span>
<span class="sd"> ``1990,1991``, whereas ``1991,1990`` wouldn&#39;t work)</span>
<span class="sd"> :param continent: [str] Continent. One of ``africa``, ``antarctica``, ``asia``, ``europe``, ``north_america``</span>
<span class="sd"> (North America includes the Caribbean and reachies down and includes Panama), ``oceania``,</span>
<span class="sd"> or ``south_america``</span>
<span class="sd"> :param fields: [str] Default (``all``) returns all fields. ``minimal`` returns just taxon name,</span>
<span class="sd"> key, latitude, and longitude. Or specify each field you want returned by name, e.g.</span>
<span class="sd"> ``fields = c(&#39;name&#39;,&#39;latitude&#39;,&#39;elevation&#39;)``.</span>
<span class="sd"> :param mediatype: [str] Media type. Default is ``NULL``, so no filtering on mediatype. Options:</span>
<span class="sd"> ``NULL``, ``MovingImage``, ``Sound``, and ``StillImage``</span>
<span class="sd"> :param limit: [int] Number of results to return. Default: ``300``</span>
<span class="sd"> :param offset: [int] Record to start at. Default: ``0``</span>

<span class="sd"> :return: A dictionary, of results</span>

Expand Down
10 changes: 5 additions & 5 deletions docs/_build/html/_modules/pygbif/registry/datasets.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<div itemprop="articleBody">

<h1>Source code for pygbif.registry.datasets</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">..gbifutils</span> <span class="kn">import</span> <span class="o">*</span>
<span></span><span class="kn">from</span> <span class="nn">..gbifutils</span> <span class="kn">import</span> <span class="o">*</span>
<span class="kn">from</span> <span class="nn">.registry_utils</span> <span class="kn">import</span> <span class="o">*</span>

<span class="k">def</span> <span class="nf">dataset_metrics</span><span class="p">(</span><span class="n">uuid</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
Expand Down Expand Up @@ -162,11 +162,11 @@ <h1>Source code for pygbif.registry.datasets</h1><div class="highlight"><pre>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Search for datasets and dataset metadata.</span>

<span class="sd"> :param data: [str] The type of data to get. Default: &#39;all&#39;</span>
<span class="sd"> :param type: [str] Type of dataset, options include &#39;OCCURRENCE&#39;, etc.</span>
<span class="sd"> :param data: [str] The type of data to get. Default: ``all``</span>
<span class="sd"> :param type: [str] Type of dataset, options include ``OCCURRENCE``, etc.</span>
<span class="sd"> :param uuid: [str] UUID of the data node provider. This must be specified if data</span>
<span class="sd"> is anything other than &#39;all&#39;.</span>
<span class="sd"> :param query: [str] Query term(s). Only used when `data = &#39;all&#39;`</span>
<span class="sd"> is anything other than ``all``.</span>
<span class="sd"> :param query: [str] Query term(s). Only used when ``data = &#39;all&#39;``</span>
<span class="sd"> :param id: [int] A metadata document id.</span>

<span class="sd"> References http://www.gbif.org/developer/registry#datasets</span>
Expand Down
10 changes: 5 additions & 5 deletions docs/_build/html/_modules/pygbif/registry/installations.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,19 @@
<div itemprop="articleBody">

<h1>Source code for pygbif.registry.installations</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">..gbifutils</span> <span class="kn">import</span> <span class="o">*</span>
<span></span><span class="kn">from</span> <span class="nn">..gbifutils</span> <span class="kn">import</span> <span class="o">*</span>
<span class="kn">from</span> <span class="nn">.registry_utils</span> <span class="kn">import</span> <span class="o">*</span>

<span class="k">def</span> <span class="nf">installations</span><span class="p">(</span><span class="n">data</span> <span class="o">=</span> <span class="s1">&#39;all&#39;</span><span class="p">,</span> <span class="n">uuid</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span> <span class="n">query</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span> <span class="n">identifier</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
<span class="n">identifierType</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span> <span class="n">limit</span> <span class="o">=</span> <span class="mi">100</span><span class="p">,</span> <span class="n">start</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Installations metadata.</span>

<span class="sd"> :param data: [str] The type of data to get. Default is all data. If not &#39;all&#39;, then one</span>
<span class="sd"> or more of &#39;contact&#39;, &#39;endpoint&#39;, &#39;dataset&#39;, &#39;comment&#39;, &#39;deleted&#39;, &#39;nonPublishing&#39;.</span>
<span class="sd"> :param data: [str] The type of data to get. Default is all data. If not ``all``, then one</span>
<span class="sd"> or more of ``contact``, ``endpoint``, ``dataset``, ``comment``, ``deleted``, ``nonPublishing``.</span>
<span class="sd"> :param uuid: [str] UUID of the data node provider. This must be specified if data</span>
<span class="sd"> is anything other than &#39;all&#39;.</span>
<span class="sd"> :param query: [str] Query nodes. Only used when `data=&#39;all&#39;`. Ignored otherwise.</span>
<span class="sd"> is anything other than ``all``.</span>
<span class="sd"> :param query: [str] Query nodes. Only used when ``data=&#39;all&#39;``. Ignored otherwise.</span>

<span class="sd"> References: http://www.gbif.org/developer/registry#installations</span>

Expand Down

0 comments on commit beb3a42

Please sign in to comment.