For the complete documentation index, see llms.txt. This page is also available as Markdown.
Python
Placekey-py
The Placekey Python library makes it easy to work with Placekey. Detailed documentation for this package can be found here. This package runs on Python 3.
Installation
This package can be installed from PyPI by
pipinstallplacekey
Usage
The basic functionality of the Placekey library is conversion between Placekeys and latitude-longitude coordinates.
>>>import placekey as pk>>> lat,long=0.0,0.0>>> pk.geo_to_placekey(lat,long)'@dvt-smp-tvz'
The distance in meters between two Placekeys can be found with the following function.
An upper bound on the maximal distance in meters between two Placekeys based on the length of their shared prefix is provided by placekey.get_prefix_distance_dict().
Placekeys found in a dataset can be partially validated by
API Client
This package also includes a client for the Placekey API. The methods in the client are automatically rate limited.
The PlacekeyAPI.lookup_placekey method can be used to lookup the Placekey for a single place.
The PlacekeyAPI.lookup_placekeys method can be used to lookup Placekeys for multiple places.
Notebooks
Jupyter notebooks demonstrating various Placekey functionality are contained in the placekey-notebooks repository.
Additional Information
More information about this library can be found on Github where you can also submit pull requests, submit bugs, and feature suggestions.