Skip to main content

No project description provided

Project description

Polars-Reverse-Geocode

Polars plugin based on https://github.com/gx0r/rrgeo.

rrgeo takes a latitude and longitude as input and returns the closest city, country, latitude, and longitude, using a k-d tree to efficiently find the nearest neighbour based on a known list of locations. This can be useful if you need to reverse geocode a large number of coordinates quickly, or just need the rough location of coordinates but don't want the expense or complication of an online reverse geocoder.

Installation

pip install polars-reverse-geocode

Usage example

import polars as pl

from polars_reverse_geocode import reverse_geocode

df = pl.DataFrame({
    'lat': [37.7749, 51.01, 52.5],
    'lon': [-122.4194, -3.9, -.91]
})
print(df.with_columns(city=reverse_geocode('lat', 'lon')))
shape: (3, 3)
┌─────────┬───────────┬───────────────────┐
│ lat     ┆ lon       ┆ city              │
│ ---     ┆ ---       ┆ ---               │
│ f64     ┆ f64       ┆ str               │
╞═════════╪═══════════╪═══════════════════╡
│ 37.7749 ┆ -122.4194 ┆ San Francisco     │
│ 51.01   ┆ -3.9      ┆ South Molton      │
│ 52.5    ┆ -0.91     ┆ Market Harborough │
└─────────┴───────────┴───────────────────┘

Project details


Download files

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

Source Distribution

polars_reverse_geocode-0.1.0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distributions

polars_reverse_geocode-0.1.0-cp38-abi3-win_amd64.whl (4.9 MB view details)

Uploaded CPython 3.8+ Windows x86-64

polars_reverse_geocode-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ x86-64

polars_reverse_geocode-0.1.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (7.8 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ ARM64

polars_reverse_geocode-0.1.0-cp38-abi3-macosx_11_0_arm64.whl (4.9 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

polars_reverse_geocode-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.8+ macOS 10.12+ x86-64

File details

Details for the file polars_reverse_geocode-0.1.0.tar.gz.

File metadata

File hashes

Hashes for polars_reverse_geocode-0.1.0.tar.gz
Algorithm Hash digest
SHA256 738816cfc7a77a7629768536a9e37eafdff554a8383c177bb886ec0825f46b74
MD5 d3feb5d8e6a0f1a5dd83b0ca5970e546
BLAKE2b-256 aa077829fc843f32987c3261e827a63e898dd525ea3548170c36c22e428f9240

See more details on using hashes here.

File details

Details for the file polars_reverse_geocode-0.1.0-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for polars_reverse_geocode-0.1.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d8443130c867b2ff240188c1760c7fa1f46c3bec4b9900d86ad7b562172b31f7
MD5 8ddb56db109069245c3179bfc9f8ccae
BLAKE2b-256 dfb98c05180520216c35de9ebc4c3ebfc4c07faf30a2fb1d16b59217ab163d79

See more details on using hashes here.

File details

Details for the file polars_reverse_geocode-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for polars_reverse_geocode-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6db1f916da673e6e50d359315d0dde3ccaf3b08fa84fc6077a2ea53489778394
MD5 d6580727704e5641684c2ee0c8dc140c
BLAKE2b-256 39348fffb43ff4f6aa69432d69219bd7a5cf003cf243b3fe36b21a1be02d2e65

See more details on using hashes here.

File details

Details for the file polars_reverse_geocode-0.1.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for polars_reverse_geocode-0.1.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f4586e28f8226d279a0ac6f138351bd76b53a715bf99aa2b716e7520fa36c99c
MD5 a811fc8440ddf31f88b81868773b2f9f
BLAKE2b-256 df038d6ab319d4fa3cc320549fa1434042214ca0cd578cf336e35fc6f78dae24

See more details on using hashes here.

File details

Details for the file polars_reverse_geocode-0.1.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for polars_reverse_geocode-0.1.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2d21c33c2189e0204770b4cb33699cba6c4f87ec92772f6b76db57deea2cb0f1
MD5 4607ae575a5eb51d59737bbac64a4c8f
BLAKE2b-256 d7bf927b03eb8381e23c69e15e70e5510356bbf9493a53d3f20195482c3267bf

See more details on using hashes here.

File details

Details for the file polars_reverse_geocode-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for polars_reverse_geocode-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 84a0c0a3c827235699e84cefa81c204fe98d14b6fcd49d090691351e33876246
MD5 899a2f739e2267b54810ec032290aa9c
BLAKE2b-256 eb42b7a88eac6030c9e82f391cc93e1848247dc8167c8ecbaf953c34f625ed73

See more details on using hashes here.

Supported by

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