Skip to content

Commit

Permalink
improved docs, added expected data types for all variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Jun 4, 2016
1 parent a5c8240 commit 7bb0e53
Show file tree
Hide file tree
Showing 26 changed files with 183 additions and 188 deletions.
3 changes: 2 additions & 1 deletion Changelog.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Changelog
=======

0.1.4 (2016-06-01)
0.1.4 (2016-06-02)
--------------------
- Changed default `limit` value to 300 for `occurrences.search` method
- Added more registry methods (#11)
- Fixed wheel to be universal for 2 and 3 (#10)
- Improved documentation a lot, autodoc methods now
Expand Down
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/occurrences.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/registry.doctree
Binary file not shown.
14 changes: 7 additions & 7 deletions docs/_build/html/_modules/pygbif/occurrences/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ <h1>Source code for pygbif.occurrences.download</h1><div class="highlight"><pre>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Retrieves the occurrence download metadata by its unique key.</span>

<span class="sd"> :param key: A key generated from a request, like that from `download`</span>
<span class="sd"> :param key: [str] A key generated from a request, like that from `download`</span>
<span class="sd"> :param **kwargs: Further named arguments passed on to `requests.get`</span>

<span class="sd"> Usage::</span>
Expand All @@ -264,10 +264,10 @@ <h1>Source code for pygbif.occurrences.download</h1><div class="highlight"><pre>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Lists the downloads created by a user.</span>

<span class="sd"> :param user: A user name, look at env var &quot;GBIF_USER&quot; first</span>
<span class="sd"> :param pwd: Your password, look at env var &quot;GBIF_PWD&quot; first</span>
<span class="sd"> :param limit: Number of records to return. Default: 20</span>
<span class="sd"> :param start: Record number to start at. Default: 0</span>
<span class="sd"> :param user: [str] A user name, look at env var &quot;GBIF_USER&quot; first</span>
<span class="sd"> :param pwd: [str] Your password, look at env var &quot;GBIF_PWD&quot; first</span>
<span class="sd"> :param limit: [int] Number of records to return. Default: 20</span>
<span class="sd"> :param start: [int] Record number to start at. Default: 0</span>
<span class="sd"> :param **kwargs: Further named arguments passed on to `requests.get`</span>

<span class="sd"> Usage::</span>
Expand Down Expand Up @@ -298,8 +298,8 @@ <h1>Source code for pygbif.occurrences.download</h1><div class="highlight"><pre>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Get a download from GBIF.</span>

<span class="sd"> :param key: A key generated from a request, like that from `download`</span>
<span class="sd"> :param path: Path to write zip file to. Default: `&quot;.&quot;`, with a `.zip`</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`</span>
<span class="sd"> appended to the end.</span>
<span class="sd"> :param **kwargs: Further named arguments passed on to `requests.get`</span>

Expand Down
6 changes: 3 additions & 3 deletions docs/_build/html/_modules/pygbif/occurrences/get.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ <h1>Source code for pygbif.occurrences.get</h1><div class="highlight"><pre>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Gets details for a single, interpreted occurrence</span>

<span class="sd"> :param key: [Fixnum] A GBIF occurrence key</span>
<span class="sd"> :param key: [int] A GBIF occurrence key</span>

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

Expand All @@ -153,7 +153,7 @@ <h1>Source code for pygbif.occurrences.get</h1><div class="highlight"><pre>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Gets a verbatim occurrence record without any interpretation</span>

<span class="sd"> :param key: [Fixnum] A GBIF occurrence key</span>
<span class="sd"> :param key: [int] A GBIF occurrence key</span>

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

Expand All @@ -170,7 +170,7 @@ <h1>Source code for pygbif.occurrences.get</h1><div class="highlight"><pre>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Get a single occurrence fragment in its raw form (xml or json)</span>

<span class="sd"> :param key: [Fixnum] A GBIF occurrence key</span>
<span class="sd"> :param key: [int] A GBIF occurrence key</span>

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

Expand Down
65 changes: 31 additions & 34 deletions docs/_build/html/_modules/pygbif/occurrences/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,19 @@ <h1>Source code for pygbif.occurrences.search</h1><div class="highlight"><pre>
<span class="n">decimalLatitude</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">decimalLongitude</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">elevation</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
<span class="n">depth</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">institutionCode</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">collectionCode</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
<span class="n">hasGeospatialIssue</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">issue</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">q</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">mediatype</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">500</span><span class="p">,</span> <span class="n">offset</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="n">limit</span><span class="o">=</span><span class="mi">300</span><span class="p">,</span> <span class="n">offset</span><span class="o">=</span><span class="mi">0</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"> Search GBIF occurrences</span>

<span class="sd"> :param taxonKey: [Fixnum] A GBIF occurrence identifier</span>
<span class="sd"> :param scientificName: A scientific name from the GBIF backbone. All included and synonym taxa are included in the search.</span>
<span class="sd"> :param datasetKey: The occurrence dataset key (a uuid)</span>
<span class="sd"> :param catalogNumber: An identifier of any form assigned by the source within a physical collection or digital dataset for the record which may not unique, but should be fairly unique in combination with the institution and collection code.</span>
<span class="sd"> :param recordedBy: The person who recorded the occurrence.</span>
<span class="sd"> :param collectionCode: 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: 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: 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: 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"> :param taxonKey: [int] A GBIF occurrence identifier</span>
<span class="sd"> :param scientificName: [str] A scientific name from the GBIF backbone. All included and synonym taxa are included in the search.</span>
<span class="sd"> :param datasetKey: [str] The occurrence dataset key (a uuid)</span>
<span class="sd"> :param catalogNumber: [str] An identifier of any form assigned by the source within a physical collection or digital dataset for the record which may not unique, but should be fairly unique in combination with the institution and collection code.</span>
<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 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>
Expand All @@ -163,56 +163,53 @@ <h1>Source code for pygbif.occurrences.search</h1><div class="highlight"><pre>
<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: Occurrence date in ISO 8601 format: yyyy, yyyy-MM, yyyy-MM-dd, or</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"> wouldn&#39;t work)</span>
<span class="sd"> :param year: The 4 digit year. A year of 98 will be interpreted as AD 98. Supports range queries,</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"> :param month: The month of the year, starting with 1 for January. Supports range queries,</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"> :param q: Query terms. The value for this parameter can be a simple word or a phrase.</span>
<span class="sd"> :param decimalLatitude: Latitude in decimals between -90 and 90 based on WGS 84.</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"> :param decimalLongitude: Longitude in decimals between -180 and 180 based on WGS 84.</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"> :param publishingCountry: The 2-letter country code (as per ISO-3166-1) of the</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: Elevation in meters above sea level. Supports range queries, smaller,larger</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"> :param depth: Depth in meters relative to elevation. For example 10 meters below a</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"> :param geometry: Searches for occurrences inside a polygon described in Well Known</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"> :param hasGeospatialIssue: (logical) Includes/excludes occurrence records which contain spatial</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"> 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: (character) One or more of many possible issues with each occurrence record. See</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 typeStatus: Type status of the specimen. One of many options. See ?typestatus</span>
<span class="sd"> :param recordNumber: Number recorded by collector of the data, different from GBIF record</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 the record was last modified in GBIF, in ISO 8601 format:</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: Continent. One of africa, antarctica, asia, europe, north_america</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: (character) Default (&#39;all&#39;) returns all fields. &#39;minimal&#39; returns just taxon name,</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 return: One of data, hier, meta, or all. If data, a data.frame with the</span>
<span class="sd"> data. hier returns the classifications in a list for each record. meta</span>
<span class="sd"> returns the metadata for the entire call. all gives all data back in a list.</span>
<span class="sd"> :param mediatype: 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: [Fixnum] Number of results to return.</span>
<span class="sd"> :param offset: [Fixnum] Start at record X</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"> :return: A dictionary, of results</span>

Expand Down
12 changes: 6 additions & 6 deletions docs/_build/html/_modules/pygbif/registry/datasets.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h1>Source code for pygbif.registry.datasets</h1><div class="highlight"><pre>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Get details on a GBIF dataset.</span>

<span class="sd"> :param uuid: (character) One or more dataset UUIDs. See examples.</span>
<span class="sd"> :param uuid: [str] One or more dataset UUIDs. See examples.</span>

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

Expand All @@ -162,12 +162,12 @@ <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: The type of data to get. Default is all data.</span>
<span class="sd"> :param type: Type of dataset, options include OCCURRENCE, etc.</span>
<span class="sd"> :param uuid: UUID of the data node provider. This must be specified if data</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 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: Query term(s). Only used when data=&#39;all&#39;</span>
<span class="sd"> :param id: A metadata document id.</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
6 changes: 3 additions & 3 deletions docs/_build/html/_modules/pygbif/registry/installations.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ <h1>Source code for pygbif.registry.installations</h1><div class="highlight"><pr
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Installations metadata.</span>

<span class="sd"> :param data: The type of data to get. Default is all data. If not &#39;all&#39;, then one</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 uuid: UUID of the data node provider. This must be specified if data</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: Query nodes. Only used when data=&#39;all&#39;. Ignored otherwise.</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 7bb0e53

Please sign in to comment.