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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Close
Hashes for polars_reverse_geocode-0.1.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f38fa80cbe66bdb0de5f1ccb1bace032c91c3c05f9160fc13c0808250735edaa |
|
MD5 | 0d4b7548c66929c18428b0faa7e4951e |
|
BLAKE2b-256 | a3a29dac522e7fbda7db1036fd0de1219504248af5d73a72be6ece7d2148463e |
Close
Hashes for polars_reverse_geocode-0.1.9-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cae8a3d1a638c2e52097f7c26c76da1afcf763bebfb95cb534b7348d0039fb72 |
|
MD5 | 522d28620ca26fd73e0190bde9dfcffc |
|
BLAKE2b-256 | bafc9c9ab29158ad2c8d15bfb6dfc20b85622837969befef4a27f9fd7a367ccc |
Close
Hashes for polars_reverse_geocode-0.1.9-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8280d20f2615e0752d79dece0da8f0ba1b407a333be6e5b2398ba7f5b6723ce0 |
|
MD5 | 224313a46e631482368e144ef73af65e |
|
BLAKE2b-256 | bebb5ff862edeb8c94e3a10967238c8074cb6c6e85708a8a598b1c2ea3a2f6d1 |
Close
Hashes for polars_reverse_geocode-0.1.9-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6c72eb4893ab091361377bab2afd0d2975ed43bc7bfcfd6d090e9ab98c46cf6 |
|
MD5 | 22e0d55f76eaa0c8161d392797b8102c |
|
BLAKE2b-256 | df5b1b575bb28b9f0c4c032e1ca09a5e487488037d18c02918ad22b46452e608 |
Close
Hashes for polars_reverse_geocode-0.1.9-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a682d002ce99eb2d94b9836400aeed04174266dd360bec2c2fb6cf0e317fe70 |
|
MD5 | 4f650510e93f047ba60a1b41a915e4cb |
|
BLAKE2b-256 | c22a88fe579d3153ebe5468f75c44071e9d146702ac605dd08a49b5ec6dcc85a |
Close
Hashes for polars_reverse_geocode-0.1.9-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c81388259384d4c57e1c8d114e0cf1d5d10da500e287e6e169c2a2922e7098f |
|
MD5 | fe2b389d2e2c155a6532a8c05b2eff84 |
|
BLAKE2b-256 | 3186db85f92ef50a768b78ffec705dd1a794e43f6264f3c3694f76b87d863e9a |