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.3.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2aa7a24fba01f5d0f69f523020da0da128e86c6fcf22d9ccb7da0158d7bbf015 |
|
MD5 | d118dd73f21f9da75487051e565af043 |
|
BLAKE2b-256 | 6768ef1b43a4acbdb5ce3534648542f4948225b0453a16d53ad39af7eb9fb6c5 |
Close
Hashes for polars_reverse_geocode-0.3.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c52f54f8d9a964e269b52dcf847513382ebf24357b110335b4ec751a8ed273d9 |
|
MD5 | 60b69cbfd2c5cbd9f7c21bceb01c0658 |
|
BLAKE2b-256 | 2577a3b7c2a63e22967944768d27485933cacdf002ff4daa38f9154178517a65 |
Close
Hashes for polars_reverse_geocode-0.3.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45ca1f839ede314ffba85e12a425bab47ef4e2e72a188a679367f0331cca865c |
|
MD5 | 463702316105c1e2b600b2dab5917e96 |
|
BLAKE2b-256 | e73e1eb6ba1a07d2101bb6dc9709c44e6e213519a264ae676db1579860eff003 |
Close
Hashes for polars_reverse_geocode-0.3.3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 558e29c6be3fa836d9f23d766fba90d3fb0f24403504c36e8adc4b4b96b8db1b |
|
MD5 | 41272cc897b2202baaddea95a9f1d49c |
|
BLAKE2b-256 | d5ab88285e95d7364253e7acae1b72b5b91f5fd2970fb6c28931f2989a7d32fa |
Close
Hashes for polars_reverse_geocode-0.3.3-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00b8622ff1806702936c38b73d9a83d0137f56fdc58d0ad6a58fd732fedce670 |
|
MD5 | fb644972daf42377a299a81e455352fa |
|
BLAKE2b-256 | 4ab695d3c89d6e551677a298799fbbcfc0c08fed2b75e610d240f786b334f578 |