No project description provided
Project description
duva 🕊️
Reverse geocode Swedish coordinates to RegSO areas.
Install
pip install duva
Usage
from duva import duva, duva_many, duva_df, duva_from_kod
# Single coordinate (WGS84)
duva(x=17.88, y=59.35)
# {'regsonamn': 'Blackeberg', 'kommunnamn': 'Stockholm', 'lansnamn': 'Stockholms län', ...}
# As object
result = duva(x=17.88, y=59.35, as_object=True)
result.regsonamn # 'Blackeberg'
# List of coordinates
duva_many([(17.88, 59.35), (18.07, 59.28)])
# Enrich a Polars DataFrame
duva_df(df, x_col="lon", y_col="lat")
# Lookup by RegSO code
duva_from_kod("0180R009")
Notes
- Input coordinates must be WGS84 (standard GPS)
- Raises
ValueErrorfor invalid coordinates or coordinates outside Sweden - Returns
not_on_land=Truefor water areas,is_baltic=Truefor international water - Based on SCB's RegSO 2025 and municipality boundaries
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
duva-0.1.1.tar.gz
(19.3 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
duva-0.1.1-py3-none-any.whl
(19.4 MB
view details)
File details
Details for the file duva-0.1.1.tar.gz.
File metadata
- Download URL: duva-0.1.1.tar.gz
- Upload date:
- Size: 19.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69120d78383d13f1869aeb33fe90e36f893cf90146d6349e29284787cf5b8d8d
|
|
| MD5 |
6be6b9475d41db4a5281433bc8bb16fe
|
|
| BLAKE2b-256 |
41ef4ad058167f5f7e32bf2096f6e80eec488c99dc8047293b1ba0205f50ebb9
|
File details
Details for the file duva-0.1.1-py3-none-any.whl.
File metadata
- Download URL: duva-0.1.1-py3-none-any.whl
- Upload date:
- Size: 19.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c1400f70b123ba9d5585bfcd6cbb0a7c42c6db72cf49b8c959570a323e3777a
|
|
| MD5 |
3772e3835b47296793c2ba6a8dea9934
|
|
| BLAKE2b-256 |
9bd5181a8ccd41367dca7471c93fd405963dad71be3189feb0e76da42a4eb82e
|