sea-names


Namesea-names JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttp://github.com/axiom-data-science/sea-names/
SummaryDetermine the sea-name of any arbitrary point or shapely geometry.
upload_time2024-08-08 19:11:26
maintainerNone
docs_urlNone
authorLuke Campbell
requires_pythonNone
licenseMIT license
keywords sea-names
VCS
bugtrack_url
requirements appdirs numpy requests shapely
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
.. image:: http://git.axiom/axiom/sea-names/badges/main/pipeline.svg
   :alt: 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).

.. code-block:: python

   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.

.. code-block:: python

   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.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
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.

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/axiom-data-science/sea-names/",
    "name": "sea-names",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "sea-names",
    "author": "Luke Campbell",
    "author_email": "luke@axds.co",
    "download_url": "https://files.pythonhosted.org/packages/ec/59/5b3443943015d6d8013f74a061c106f8fd959520eaf1980d84a59bdfdcc9/sea_names-0.3.0.tar.gz",
    "platform": null,
    "description": "\n.. image:: http://git.axiom/axiom/sea-names/badges/main/pipeline.svg\n   :alt: Pipeline status\n\nsea-names\n===============================\n\nDetermine the sea-name of any arbitrary point or shapely geometry.\n\nCopyright 2023-2024 Axiom Data Science, LLC\n\nSee LICENSE for details.\n\nInstallation\n------------\n\nThis project relies on conda for installation and managing of the project dependencies.\n\n1. Download and install miniconda for your operating system https://docs.conda.io/en/latest/miniconda.html.\n\n2. Clone this project with ``git``.\n\n3.  Once conda is available build the environment for this project with::\n\n      conda env create -f environment.yml\n\n    The above command creates a new conda environment titled ``sea-names`` with the necessary project\n    dependencies.\n\n4. An Additional environment file is present for testing and development environments. The additional developer dependencies can be installed with::\n\n      conda env update -f test-environment.yml\n\n5. To install the project to the new environment::\n\n      conda activate sea-names\n      pip install -e .\n\n\nShapefiles and Dataset Usage\n----------------------------\n\nCurrently we've been asked to remove the repository of shapefiles used by this library for licensing\nreasons. The library will remain publicly accessible but the dataset underlying the library is no\nlonger available for public distribution.\n\nWe are trying to adopt the library to use either an open-source dataset or find alternatives for our\nusers, we apologize for the inconvenience.\n\n\nRunning Tests\n-------------\n\nTo run the project's tests::\n\n   pytest -sv --integration\n\nUsage\n-----\n\nThe package can provide the region name for any given coordinate pair (Longitude, and Latitude).\n\n.. code-block:: python\n\n   import sea_names\n\n   lon = -81.65\n   lat = 41.98\n\n   name = sea_names.get_sea_name((lon, lat))\n   assert name == \"Lake Erie\"\n\n\nThe package also has the ability to provide a set of sea names for a series of points. This\ncapability is still somewhat experimental and can use a lot of memory.\n\n.. code-block:: python\n\n   from sea_names.geo import get_sea_names_for_trajectory\n   lons = [\n      -176.54,\n      -164.70,\n      -143.13,\n      -126.09,\n      -107.18,\n      -91.36,\n   ]\n   lats = [\n      55.64,\n      48.74,\n      56.57,\n      45.58,\n      21.39,\n      25.15,\n   ]\n   region_names = get_sea_names_for_trajectory(lons, lats, chunk_size=len(lons))\n   assert region_names == ['Bering Sea', 'Gulf of Mexico', 'North Pacific Ocean']\n\n\n\nConfiguration\n-------------\n\n\n\nBuilding with Docker\n--------------------\n\nTo build the docker container::\n\n   docker build -t sea-names .\n\nRunning with Docker\n-------------------\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.3.0 (2024-08-08)\n------------------\n* Updated README with usage examples\n* Updated README to include data license notice\n* Updates to the hash of the dataset\n* Spelling corrections\n\n0.2.0 (2024-06-21)\n------------------\n\n* Support for determining sea names for an entire trajectory.\n* Added numpy to strict dependencies\n\n0.1.0 (2023-06-16)\n------------------\n\n* First release on PyPI.\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Determine the sea-name of any arbitrary point or shapely geometry.",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "http://github.com/axiom-data-science/sea-names/"
    },
    "split_keywords": [
        "sea-names"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d544d985408e74f88b22985baf90f566f214f4662d1e95709873b6f1a75669e",
                "md5": "d95208d64a8bf9d00c6b2db1dc1cce05",
                "sha256": "effaec0f14f2b3e1e4fb20f04dfa86a7a9ce0878fa6468704054f2fa4527d192"
            },
            "downloads": -1,
            "filename": "sea_names-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d95208d64a8bf9d00c6b2db1dc1cce05",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9752,
            "upload_time": "2024-08-08T19:11:24",
            "upload_time_iso_8601": "2024-08-08T19:11:24.300939Z",
            "url": "https://files.pythonhosted.org/packages/5d/54/4d985408e74f88b22985baf90f566f214f4662d1e95709873b6f1a75669e/sea_names-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec595b3443943015d6d8013f74a061c106f8fd959520eaf1980d84a59bdfdcc9",
                "md5": "6112bb674d80511c406602218cea70f5",
                "sha256": "15759f90a65fe851e14fb826b40f7b3973768b18ce52ec482b9d5b13d2eb3763"
            },
            "downloads": -1,
            "filename": "sea_names-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6112bb674d80511c406602218cea70f5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 69195,
            "upload_time": "2024-08-08T19:11:26",
            "upload_time_iso_8601": "2024-08-08T19:11:26.775723Z",
            "url": "https://files.pythonhosted.org/packages/ec/59/5b3443943015d6d8013f74a061c106f8fd959520eaf1980d84a59bdfdcc9/sea_names-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-08 19:11:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "axiom-data-science",
    "github_project": "sea-names",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "appdirs",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "shapely",
            "specs": []
        }
    ],
    "lcname": "sea-names"
}
        
Elapsed time: 0.29825s