Skip to content

statisticsnorway/ssb-datafangst-person-fagfunksjoner

Repository files navigation

SSB Datafangst Person Fagfunksjoner

PyPI Status Python Version License

Documentation Tests Coverage Quality Gate Status

pre-commit Black Ruff Poetry

Features

Functions:

hent_status_pd Retrieves status data for a specific InstrumentId and date range from datafangst-person GCS bucket, returning it as a Pandas DataFrame.

hent_status_pd(
    instrument_id: str,
    start_dato: Optional[date] = None,
    slutt_dato: Optional[date] = None,
) -> pd.DataFrame

hent_status_pl Retrieves status data for a specific InstrumentId and date range from datafangst-person GCS bucket, returning it as a Polars DataFrame.

hent_status_pl(
    instrument_id: str,
    start_dato: Optional[date] = None,
    slutt_dato: Optional[date] = None,
) -> pl.DataFrame

hent_utvalg_pd Retrieves utvalg data for a specific InstrumentId from datafangst-person GCS bucket, returning it as a Pandas DataFrame.

hent_utvalg_pd(
    instrument_id: str,
) -> pd.DataFrame

hent_utvalg_pl Retrieves utvalg data for a specific InstrumentId from datafangst-person GCS bucket, returning it as a Polars DataFrame.

hent_utvalg_pl(
    instrument_id: str,
) -> pl.DataFrame

question_sorting Processes a Paradata DataFrame returning a list of FieldNames in the order they were asked in the survey.

question_sorting(
    x: pd.DataFrame,
) -> list[str]

make_bolk Extracts and returns a nested section (bolk) name from a string, such as FieldName.

make_bolk(
    row: str,
) -> str

fill_all_para_pl Prepares a Polars DataFrame with paradata for analysis by filling missing values, creating new columns, and transforming the data for analysis.

fill_all_para_pl(
    table_df: pl.DataFrame,
) -> pl.DataFrame

fill_para_pl Prepares a Polars DataFrame with paradata for analysis, transforming data as necessary if the data has a min TimeStamp after we started doing fill_para automatically in out iac repo.

fill_para_pl(
    table_df: pl.DataFrame,
) -> pl.DataFrame

fill_para_pd Prepares a Pandas DataFrame with paradata for analysis, transforming data as necessary if the data has a min TimeStamp after we started doing fill_para automatically in out iac repo.

fill_para_pd(
    table_df: pd.DataFrame,
) -> pd.DataFrame

Requirements

  • TODO

Installation

You can install SSB Datafangst Person Fagfunksjoner via pip from PyPI:

pip install ssb-datafangst-person-fagfunksjoner

Usage

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, SSB Datafangst Person Fagfunksjoner 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.

About

Fagfunksjoner for Datainnsamling Person (s851)

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages