Skip to main content

SQL functions for working with placekeys

Project description

datasette-placekey

PyPI Changelog Tests License

SQL functions for working with placekeys.

Installation

Install this plugin in the same environment as Datasette.

$ datasette install datasette-placekey

Usage

The following SQL functions are exposed - documentation here.

select
  geo_to_placekey(33.0896104,129.7900839),
  placekey_to_geo('@6nh-nhh-kvf'),
  placekey_to_geo_latitude('@6nh-nhh-kvf'),
  placekey_to_geo_longitude('@6nh-nhh-kvf'),
  placekey_to_h3('@6nh-nhh-kvf'),
  h3_to_placekey('8a30d94e4c87fff'),
  placekey_to_geojson('@6nh-nhh-kvf'),
  placekey_to_wkt('@6nh-nhh-kvf'),
  placekey_format_is_valid('@6nh-nhh-kvf');

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-placekey
python3 -mvenv venv
source venv/bin/activate

Or if you are using pipenv:

pipenv shell

Now install the dependencies and tests:

pip install -e '.[test]'

To run the tests:

pytest

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

datasette-placekey-0.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datasette_placekey-0.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file datasette-placekey-0.1.tar.gz.

File metadata

  • Download URL: datasette-placekey-0.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for datasette-placekey-0.1.tar.gz
Algorithm Hash digest
SHA256 d21a846bf99e9ba2cdcf43466722c9963e9a32329f37e95142e2a974fe16649b
MD5 ddfb08cef8ee5addf798402a1dafe9da
BLAKE2b-256 3dc312b594c1dfbe2d07db65d8953347424e9f704a8757b3ae0dbf539cc815d3

See more details on using hashes here.

File details

Details for the file datasette_placekey-0.1-py3-none-any.whl.

File metadata

  • Download URL: datasette_placekey-0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for datasette_placekey-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a50adeb6b6e95b8e290d3273a3b47102d2007b7f18401f263d54ef37c88d4017
MD5 65d003a3f9d4b29907aa2eaeac3df584
BLAKE2b-256 277b836225c2be3fffcaad3aa4b9cca337817b4373658f9d17969224d55fbb8e

See more details on using hashes here.

Supported by

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