Dapla Toolbelt Whodat

PyPI Status Python Version License

Documentation Tests

pre-commit Black Ruff uv

Features

  • Search for Norwegian national identity numbers from Pandas or Polars DataFrames.

  • Chain search strategies from broad to precise and keep the first unique match for each row.

  • Configure FREG search modifiers such as phonetic matching, historical data, and inclusion of deceased persons or residential addresses.

  • Return matches as a list, a mapping keyed by the original DataFrame index, or detailed per-row results.

Requirements

  • Python 3.10 or newer.

  • Access to the Whodat service and a Dapla authentication token.

Installation

You can install Whodat via pip from PyPI:

pip install dapla-toolbelt-whodat

Usage

import polars as pl

from dapla_whodat import Whodat

df = pl.DataFrame(
    {
        "navn": ["Donald Duck", "Dolly Duck", "Onkel Skrue"],
        "adressenavn": ["Lundlia", "Smøyatunvegen", "Simmenesvegen"],
    }
)

result = (
    Whodat.from_polars(df)
    .search_fnr()
    .with_search_strategy(["navn"])
    .run()
)

Please see the [Reference Guide] for details.

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, Whodat is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from Statistics Norway’s SSB PyPI Template.