Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get sveitarfélag information #10

Open
aodj-snjallgogn opened this issue Dec 4, 2024 · 5 comments
Open

Get sveitarfélag information #10

aodj-snjallgogn opened this issue Dec 4, 2024 · 5 comments

Comments

@aodj-snjallgogn
Copy link

Is there a way to get the sveitarfélag information for a given location? I can see a svfnr in the returned dictionary, which I guess corresponds, but it's unclear what I'm supposed to do with that value, if anything.

@sveinbjornt
Copy link
Owner

A bit of googling turned up this:

And Wikipedia:

Should probably integrate this into iceaddr results at some point.

@aodj-snjallgogn
Copy link
Author

Yea, I've got another source I'm using for it, but I wanted to make sure I wasn't missing something about this package and what data is included in it. Thanks for your help :)

@sveinbjornt
Copy link
Owner

What's your source, if I may ask?

@aodj-snjallgogn
Copy link
Author

aodj-snjallgogn commented Dec 4, 2024

What's your source, if I may ask?

No idea on the origin, it's a CSV associated with the project I'm working on. I needed to go from wgs84 coords to post code, locality, municipality, division, and region. For example, here's a spot in Búðardalur,

from iceaddr import nearest_addr

nearest_addr(65.1095089,-21.7710829)[0]

Which gives the following response

{
    "hnitnum": 10146432,
    "svfnr": 3811,
    "byggd": 4,
    "landnr": 233002,
    "postnr": 370,
    "heiti_nf": "Ægisbraut",
    "heiti_tgf": "Ægisbraut",
    "husnr": 4,
    "bokst": "B",
    "serheiti": "",
    "vidsk": "",
    "lat_wgs84": 65.1093915,
    "long_wgs84": -21.7720659,
    "stadur_nf": "Búðardalur",
    "stadur_tgf": "Búðardal",
    "svaedi_nf": "Vesturland og Vestfirðir",
    "svaedi_tgf": "Vesturlandi og Vestfjörðum",
    "tegund": "Stærra dreifbýli",
}

Ideally, I needed to get something like (format is irrelevant)

{
    "postal_code": "371",
    "locality": "Búðardalur",
    "municipality": "Dalabyggð",
    "division": "Vesturland og Vestfirðir",
    "region": "Vesturland",
}

... but neither the municipality/sveitarfélag nor region were available.

@sveinbjornt
Copy link
Owner

Will add this in the next release, re-opening this issue.

@sveinbjornt sveinbjornt reopened this Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants