No project description provided
Project description
duva 🕊️
Reverse geocode Swedish coordinates to RegSO areas.
Install
pip install duva
Usage
from duva import locate, locate_many, enrich_df, from_code
# Single coordinate (WGS84)
locate(x=17.88, y=59.35)
# {'regsonamn': 'Blackeberg', 'kommunnamn': 'Stockholm', 'lansnamn': 'Stockholms län', ...}
# As object
result = locate(x=17.88, y=59.35, as_object=True)
result.regsonamn # 'Blackeberg'
# List of coordinates
locate_many([(17.88, 59.35), (18.07, 59.28)])
# Enrich a Polars DataFrame
enrich_df(df, x_col="lon", y_col="lat")
# Lookup by RegSO code
from_code("0180R009")
Notes
- Input coordinates must be WGS84 (standard GPS)
- Raises
ValueErrorfor invalid coordinates or coordinates outside Sweden - Returns
not_on_land=Truefor water areas,offshore=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
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
File details
Details for the file duva-0.3.2.tar.gz.
File metadata
- Download URL: duva-0.3.2.tar.gz
- Upload date:
- Size: 19.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af06faee240755d192d08fd9ffc7d357b5e7e625329412a745d17c3a05bdb981
|
|
| MD5 |
7ac52d6a95a03d4f3591b61a32cad480
|
|
| BLAKE2b-256 |
572c260786595f053f6d1ea18f7be317fa17e7f8ffce77ceafe959d0bc38c8bd
|
Provenance
The following attestation bundles were made for duva-0.3.2.tar.gz:
Publisher:
python-publish.yml on Koutakis/duva
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
duva-0.3.2.tar.gz -
Subject digest:
af06faee240755d192d08fd9ffc7d357b5e7e625329412a745d17c3a05bdb981 - Sigstore transparency entry: 1789705304
- Sigstore integration time:
-
Permalink:
Koutakis/duva@aa78cd065d3b1fce72e3221b6a3b8f93105a3d9a -
Branch / Tag:
refs/tags/0.3 - Owner: https://github.com/Koutakis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@aa78cd065d3b1fce72e3221b6a3b8f93105a3d9a -
Trigger Event:
release
-
Statement type:
File details
Details for the file duva-0.3.2-py3-none-any.whl.
File metadata
- Download URL: duva-0.3.2-py3-none-any.whl
- Upload date:
- Size: 19.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8639cb5190791196d7e6a42f567c921380f20520eb80366d1106e81b87b7e3e0
|
|
| MD5 |
119d233c77729fcb82cd97186432b688
|
|
| BLAKE2b-256 |
568fbbd535262effac2b231326d623527752cb867058fc5378594ceddb831f6b
|
Provenance
The following attestation bundles were made for duva-0.3.2-py3-none-any.whl:
Publisher:
python-publish.yml on Koutakis/duva
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
duva-0.3.2-py3-none-any.whl -
Subject digest:
8639cb5190791196d7e6a42f567c921380f20520eb80366d1106e81b87b7e3e0 - Sigstore transparency entry: 1789705318
- Sigstore integration time:
-
Permalink:
Koutakis/duva@aa78cd065d3b1fce72e3221b6a3b8f93105a3d9a -
Branch / Tag:
refs/tags/0.3 - Owner: https://github.com/Koutakis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@aa78cd065d3b1fce72e3221b6a3b8f93105a3d9a -
Trigger Event:
release
-
Statement type: