{ "info": { "author": "Simon Willison", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# datasette-haversine\n\n[![PyPI](https://img.shields.io/pypi/v/datasette-haversine.svg)](https://pypi.org/project/datasette-haversine/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/datasette-haversine?include_prereleases&label=changelog)](https://github.com/simonw/datasette-haversine/releases)\n[![Tests](https://github.com/simonw/datasette-haversine/workflows/Test/badge.svg)](https://github.com/simonw/datasette-haversine/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-haversine/blob/main/LICENSE)\n\nDatasette plugin that adds a custom SQL function for haversine distances\n\nInstall this plugin in the same environment as Datasette to enable the `haversine()` SQL function.\n\n $ pip install datasette-haversine\n\nThe plugin is built on top of the [haversine](https://github.com/mapado/haversine) library.\n\n## haversine() to calculate distances\n\n```sql\nselect haversine(lat1, lon1, lat2, lon2);\n```\n\nThis will return the distance in kilometers between the point defined by `(lat1, lon1)` and the point defined by `(lat2, lon2)`.\n\n## Custom units\n\nBy default `haversine()` returns results in km. You can pass an optional third argument to get results in a different unit:\n\n- `ft` for feet\n- `m` for meters\n- `in` for inches\n- `mi` for miles\n- `nmi` for nautical miles\n- `km` for kilometers (the default)\n\n```sql\nselect haversine(lat1, lon1, lat2, lon2, 'mi');\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/simonw/datasette-haversine", "keywords": "", "license": "Apache License, Version 2.0", "maintainer": "", "maintainer_email": "", "name": "datasette-haversine", "package_url": "https://pypi.org/project/datasette-haversine/", "platform": "", "project_url": "https://pypi.org/project/datasette-haversine/", "project_urls": { "Homepage": "https://github.com/simonw/datasette-haversine" }, "release_url": "https://pypi.org/project/datasette-haversine/0.2/", "requires_dist": [ "datasette", "haversine", "pytest ; extra == 'test'" ], "requires_python": "", "summary": "Datasette plugin that adds a custom SQL function for haversine distances", "version": "0.2", "yanked": false, "yanked_reason": null }, "last_serial": 11031119, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "87420a5929cf6a368905c15b78e4fed0", "sha256": "2496d53a3c99b15a75fdb5df3d6cd32c692c2e61b9fd58a26c4e4ca4c921ac44" }, "downloads": -1, "filename": "datasette_haversine-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "87420a5929cf6a368905c15b78e4fed0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6481, "upload_time": "2019-10-24T05:19:29", "upload_time_iso_8601": "2019-10-24T05:19:29.572647Z", "url": "https://files.pythonhosted.org/packages/1a/5c/0dd7c88dc0e6cbaa1a1bfe6bfbc878e5b311d1402ec1bea43ad673d5b741/datasette_haversine-0.1-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.2": [ { "comment_text": "", "digests": { "md5": "12ddca14b40150bf510d5c15b7f33875", "sha256": "b2185a14d87e353d6afaf02450dfb87df27cd2b0d24e3aa25686a6571e16aa4c" }, "downloads": -1, "filename": "datasette_haversine-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "12ddca14b40150bf510d5c15b7f33875", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6551, "upload_time": "2021-07-28T20:15:25", "upload_time_iso_8601": "2021-07-28T20:15:25.808336Z", "url": "https://files.pythonhosted.org/packages/7b/cf/1a80bf2b79011b6c97ab7dd2da949eb946060fea63b90006c4022f5d6875/datasette_haversine-0.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "0261747cd0ee349fc6982605558b692c", "sha256": "e46be1dbf2210dabc8647bd3f633db6f9bc0f967c3a4e3f0cf78bbc449e2c1f6" }, "downloads": -1, "filename": "datasette-haversine-0.2.tar.gz", "has_sig": false, "md5_digest": "0261747cd0ee349fc6982605558b692c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6118, "upload_time": "2021-07-28T20:15:27", "upload_time_iso_8601": "2021-07-28T20:15:27.048855Z", "url": "https://files.pythonhosted.org/packages/62/c3/6231dafdffaa6ccddc8a4810bc0f41c5d7e05cd0c7748077df701fc17729/datasette-haversine-0.2.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "12ddca14b40150bf510d5c15b7f33875", "sha256": "b2185a14d87e353d6afaf02450dfb87df27cd2b0d24e3aa25686a6571e16aa4c" }, "downloads": -1, "filename": "datasette_haversine-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "12ddca14b40150bf510d5c15b7f33875", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6551, "upload_time": "2021-07-28T20:15:25", "upload_time_iso_8601": "2021-07-28T20:15:25.808336Z", "url": "https://files.pythonhosted.org/packages/7b/cf/1a80bf2b79011b6c97ab7dd2da949eb946060fea63b90006c4022f5d6875/datasette_haversine-0.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "0261747cd0ee349fc6982605558b692c", "sha256": "e46be1dbf2210dabc8647bd3f633db6f9bc0f967c3a4e3f0cf78bbc449e2c1f6" }, "downloads": -1, "filename": "datasette-haversine-0.2.tar.gz", "has_sig": false, "md5_digest": "0261747cd0ee349fc6982605558b692c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6118, "upload_time": "2021-07-28T20:15:27", "upload_time_iso_8601": "2021-07-28T20:15:27.048855Z", "url": "https://files.pythonhosted.org/packages/62/c3/6231dafdffaa6ccddc8a4810bc0f41c5d7e05cd0c7748077df701fc17729/datasette-haversine-0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }