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.2.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.2.1-py3-none-any.whl
(19.4 MB
view details)
File details
Details for the file duva-0.2.1.tar.gz.
File metadata
- Download URL: duva-0.2.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 |
12eb4ebd09bae395058fc918e3b072e625e301bef6bd77af9d044e9d895161a0
|
|
| MD5 |
eb45fa95b746dd405305ac69a3366f4c
|
|
| BLAKE2b-256 |
9c1e24e9a69e559d0768135bd5cd49ac5444bd5241756b15db25754abba06428
|
File details
Details for the file duva-0.2.1-py3-none-any.whl.
File metadata
- Download URL: duva-0.2.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 |
2f923dcfa9fe155218e0385aa77ebcb942c2db91e2823bbff864510b7670f61c
|
|
| MD5 |
fef06142b3ec4fb2b218cde9872531ea
|
|
| BLAKE2b-256 |
ba26886b82e38f34fe86151ab54733526801d47140b4c7e05ceee2fb287a9b6a
|