Skip to main content

Determine the sea-name of any arbitrary point or shapely geometry.

Project description

Pipeline status

sea-names

Determine the sea-name of any arbitrary point or shapely geometry.

Copyright 2023-2024 Axiom Data Science, LLC

See LICENSE for details.

Installation

This project relies on conda for installation and managing of the project dependencies.

  1. Download and install miniconda for your operating system https://docs.conda.io/en/latest/miniconda.html.

  2. Clone this project with git.

  3. Once conda is available build the environment for this project with:

    conda env create -f environment.yml

    The above command creates a new conda environment titled sea-names with the necessary project dependencies.

  4. An Additional environment file is present for testing and development environments. The additional developer dependencies can be installed with:

    conda env update -f test-environment.yml
  5. To install the project to the new environment:

    conda activate sea-names
    pip install -e .

Shapefiles and Dataset Usage

Currently we’ve been asked to remove the repository of shapefiles used by this library for licensing reasons. The library will remain publicly accessible but the dataset underlying the library is no longer available for public distribution.

We are trying to adopt the library to use either an open-source dataset or find alternatives for our users, we apologize for the inconvenience.

Running Tests

To run the project’s tests:

pytest -sv --integration

Usage

The package can provide the region name for any given coordinate pair (Longitude, and Latitude).

import sea_names

lon = -81.65
lat = 41.98

name = sea_names.get_sea_name((lon, lat))
assert name == "Lake Erie"

The package also has the ability to provide a set of sea names for a series of points. This capability is still somewhat experimental and can use a lot of memory.

from sea_names.geo import get_sea_names_for_trajectory
lons = [
   -176.54,
   -164.70,
   -143.13,
   -126.09,
   -107.18,
   -91.36,
]
lats = [
   55.64,
   48.74,
   56.57,
   45.58,
   21.39,
   25.15,
]
region_names = get_sea_names_for_trajectory(lons, lats, chunk_size=len(lons))
assert region_names == ['Bering Sea', 'Gulf of Mexico', 'North Pacific Ocean']

Configuration

Building with Docker

To build the docker container:

docker build -t sea-names .

Running with Docker

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.3.0 (2024-08-08)

  • Updated README with usage examples

  • Updated README to include data license notice

  • Updates to the hash of the dataset

  • Spelling corrections

0.2.0 (2024-06-21)

  • Support for determining sea names for an entire trajectory.

  • Added numpy to strict dependencies

0.1.0 (2023-06-16)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sea_names-0.3.0.tar.gz (69.2 kB view details)

Uploaded Source

Built Distribution

sea_names-0.3.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file sea_names-0.3.0.tar.gz.

File metadata

  • Download URL: sea_names-0.3.0.tar.gz
  • Upload date:
  • Size: 69.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for sea_names-0.3.0.tar.gz
Algorithm Hash digest
SHA256 15759f90a65fe851e14fb826b40f7b3973768b18ce52ec482b9d5b13d2eb3763
MD5 6112bb674d80511c406602218cea70f5
BLAKE2b-256 ec595b3443943015d6d8013f74a061c106f8fd959520eaf1980d84a59bdfdcc9

See more details on using hashes here.

File details

Details for the file sea_names-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: sea_names-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for sea_names-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 effaec0f14f2b3e1e4fb20f04dfa86a7a9ce0878fa6468704054f2fa4527d192
MD5 d95208d64a8bf9d00c6b2db1dc1cce05
BLAKE2b-256 5d544d985408e74f88b22985baf90f566f214f4662d1e95709873b6f1a75669e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page