repos: 217216787
This data as json
id | node_id | name | full_name | private | owner | html_url | description | fork | created_at | updated_at | pushed_at | homepage | size | stargazers_count | watchers_count | language | has_issues | has_projects | has_downloads | has_wiki | has_pages | forks_count | archived | disabled | open_issues_count | license | topics | forks | open_issues | watchers | default_branch | permissions | temp_clone_token | organization | network_count | subscribers_count | readme | readme_html | allow_forking | visibility | is_template | template_repository | web_commit_signoff_required | has_discussions |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
217216787 | MDEwOlJlcG9zaXRvcnkyMTcyMTY3ODc= | datasette-haversine | simonw/datasette-haversine | 0 | 9599 | https://github.com/simonw/datasette-haversine | Datasette plugin that adds a custom SQL function for haversine distances | 0 | 2019-10-24T05:16:14Z | 2021-07-28T20:13:38Z | 2021-07-28T20:14:24Z | 8 | 1 | 1 | Python | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | apache-2.0 | ["datasette", "datasette-plugin", "datasette-io"] | 0 | 0 | 1 | main | {"admin": false, "push": false, "pull": false} | 0 | 1 | # datasette-haversine [](https://pypi.org/project/datasette-haversine/) [](https://github.com/simonw/datasette-haversine/releases) [](https://github.com/simonw/datasette-haversine/actions?query=workflow%3ATest) [](https://github.com/simonw/datasette-haversine/blob/main/LICENSE) Datasette plugin that adds a custom SQL function for haversine distances Install this plugin in the same environment as Datasette to enable the `haversine()` SQL function. $ pip install datasette-haversine The plugin is built on top of the [haversine](https://github.com/mapado/haversine) library. ## haversine() to calculate distances ```sql select haversine(lat1, lon1, lat2, lon2); ``` This will return the distance in kilometers between the point defined by `(lat1, lon1)` and the point defined by `(lat2, lon2)`. ## Custom units By default `haversine()` returns results in km. You can pass an optional third argument to get results in a different unit: - `ft` for feet - `m` for meters - `in` for inches - `mi` for miles - `nmi` for nautical miles - `km` for kilometers (the default) ```sql select haversine(lat1, lon1, lat2, lon2, 'mi'); ``` | <div id="readme" class="md" data-path="README.md"><article class="markdown-body entry-content container-lg" itemprop="text"><h1><a id="user-content-datasette-haversine" class="anchor" aria-hidden="true" href="#user-content-datasette-haversine"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>datasette-haversine</h1> <p><a href="https://pypi.org/project/datasette-haversine/" rel="nofollow"><img src="https://camo.githubusercontent.com/c15ca12319585eb769d51678b9d275b82c3dd407362c2922244fb4b2e93a9f1e/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f6461746173657474652d686176657273696e652e737667" alt="PyPI" data-canonical-src="https://img.shields.io/pypi/v/datasette-haversine.svg" style="max-width:100%;"></a> <a href="https://github.com/simonw/datasette-haversine/releases"><img src="https://camo.githubusercontent.com/2a194d8f840f0491df7941d978f40f1fda33b2edbb9b9896269ff963f72d3bfb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f73696d6f6e772f6461746173657474652d686176657273696e653f696e636c7564655f70726572656c6561736573266c6162656c3d6368616e67656c6f67" alt="Changelog" data-canonical-src="https://img.shields.io/github/v/release/simonw/datasette-haversine?include_prereleases&label=changelog" style="max-width:100%;"></a> <a href="https://github.com/simonw/datasette-haversine/actions?query=workflow%3ATest"><img src="https://github.com/simonw/datasette-haversine/workflows/Test/badge.svg" alt="Tests" style="max-width:100%;"></a> <a href="https://github.com/simonw/datasette-haversine/blob/main/LICENSE"><img src="https://camo.githubusercontent.com/1698104e976c681143eb0841f9675c6f802bb7aa832afc0c7a4e719b1f3cf955/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d417061636865253230322e302d626c75652e737667" alt="License" data-canonical-src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" style="max-width:100%;"></a></p> <p>Datasette plugin that adds a custom SQL function for haversine distances</p> <p>Install this plugin in the same environment as Datasette to enable the <code>haversine()</code> SQL function.</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="$ pip install datasette-haversine "><pre><code>$ pip install datasette-haversine </code></pre></div> <p>The plugin is built on top of the <a href="https://github.com/mapado/haversine">haversine</a> library.</p> <h2><a id="user-content-haversine-to-calculate-distances" class="anchor" aria-hidden="true" href="#user-content-haversine-to-calculate-distances"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>haversine() to calculate distances</h2> <div class="highlight highlight-source-sql position-relative" data-snippet-clipboard-copy-content="select haversine(lat1, lon1, lat2, lon2); "><pre><span class="pl-k">select</span> haversine(lat1, lon1, lat2, lon2);</pre></div> <p>This will return the distance in kilometers between the point defined by <code>(lat1, lon1)</code> and the point defined by <code>(lat2, lon2)</code>.</p> <h2><a id="user-content-custom-units" class="anchor" aria-hidden="true" href="#user-content-custom-units"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Custom units</h2> <p>By default <code>haversine()</code> returns results in km. You can pass an optional third argument to get results in a different unit:</p> <ul> <li><code>ft</code> for feet</li> <li><code>m</code> for meters</li> <li><code>in</code> for inches</li> <li><code>mi</code> for miles</li> <li><code>nmi</code> for nautical miles</li> <li><code>km</code> for kilometers (the default)</li> </ul> <div class="highlight highlight-source-sql position-relative" data-snippet-clipboard-copy-content="select haversine(lat1, lon1, lat2, lon2, 'mi'); "><pre><span class="pl-k">select</span> haversine(lat1, lon1, lat2, lon2, <span class="pl-s"><span class="pl-pds">'</span>mi<span class="pl-pds">'</span></span>);</pre></div> </article></div> |
Links from other tables
- 1 row from repo in releases