PyOpenFisheries
PyOpenFisheries makes it even easier to access the OpenFisheries API in Python.
A good usecase of this library is to gather data to plot in a Jupyter Notebook, or to collect data to run time-series analysis on.
Learn more about OpenFisheries.org.
PyOpenFisheries(**kwargs)
Bases: object
Base class for accessing the OpenFisheries API. Useful for gathering data for plots or analysis.
Returns:
instance: base OpenFisheries API wrapper
Examples:
>>> open_fish_conn = PyOpenFisheries()
>>> skipjack_tuna = open_fish_conn.annual_landings(species="SKJ").filter_years(start_year=1970,end_year=1991)
>>> print(skipjack_tuna.landings)
[{'year': 1970, 'catch': 402166}...{'year': 1991, 'catch': 1575170}]
>>> print(skipjack_tuna.summarize())
Landings of SKJ globally from 1970 to 1991
Attributes:
landings: List of dictionaries containing the year and landing count. species: if present - three-letter ASFIS species code (i.e. “SKJ” - Skipjack Tuna). country: if present - ISO-3166 alpha 3 country code (i.e. “USA” - United States). start_year: if present - start year of filtered landings data. end_year : if present - end year of filtered landings data.
annual_landings(species=None, country=None)
Gathers annual fishery landings filtered by either species or country. If neither fish nor country are specified, then this will return global aggregate landings data.
Args:
species: three-letter ASFIS species code (i.e. “SKJ” - Skipjack Tuna) country: ISO-3166 alpha 3 country code (i.e. “USA” - United States)
Returns:
instance: PyOpenFisheries instance with landings populated
filter_years(start_year=1950, end_year=2018)
Filters annual fishing data to within a time-frame.
Args:
start_year: 4 digit integer year (i.e. 1980) end_year: 4 digit integer year (i.e. 2015)
Returns:
instance: PyOpenFisheries instance with years filtered.
summarize()
Summarizes what has been returned from OpenFisheries.
label()
Useful as a legend / for plots.
Metadata
Release files for pyopenfisheries 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| PyOpenFisheries-0.1.2.tar.gz | 7.4 kB | Without provenance | Details for PyOpenFisheries-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| PyOpenFisheries-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for PyOpenFisheries-0.1.2-py3-none-any.whl |
Total release size: 19.4 kB
Release files / PyOpenFisheries-0.1.2.tar.gz
| Download URL | PyOpenFisheries-0.1.2.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef45b3a7dc28dfea8de89728c8b4b4c1054e5ba9333d2d4891ee4972589cdd02
|
|
BLAKE2b-256 checksum How to use checksums |
1810b0018f6484ce89df1487deac08da83b59dc96e2552e41c001f70cc984e90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.5 Linux/5.8.0-44-generic
|
Release files / PyOpenFisheries-0.1.2-py3-none-any.whl
| Download URL | PyOpenFisheries-0.1.2-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b2b5b6776049ad2a10e003a7dcba8d91641ea07e5685e6ead943780ddeee5811
|
|
BLAKE2b-256 checksum How to use checksums |
fdde3a3ce794429ebad7321653cc47da561513aeae366437496c90e8a2b062de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.5 Linux/5.8.0-44-generic
|
Security for pyopenfisheries 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.