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.0.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.0-py3-none-any.whl
(19.4 MB
view details)
File details
Details for the file duva-0.2.0.tar.gz.
File metadata
- Download URL: duva-0.2.0.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 |
8eca8e3567229745f51370e5b18226ffe42b996641b9a813fa64d6bf315e6b96
|
|
| MD5 |
4d533069864557279c1ee4c79c38d1b5
|
|
| BLAKE2b-256 |
631c00022d74c238df54756b9fe56d4441c94d077dd0bd7eb26f3bedbd8df5dc
|
File details
Details for the file duva-0.2.0-py3-none-any.whl.
File metadata
- Download URL: duva-0.2.0-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 |
8a78c67515d92557c3f6e980bbc961694ee77c49cfbec1ef7a9bdc14d0b1ea05
|
|
| MD5 |
5dea95662e18e6652bd6594912172a5b
|
|
| BLAKE2b-256 |
e000dc8ff1eea29ea30e1b803426ff6f6671e0587c40082ccf7ecb13775dfbe5
|