Skip to content

Commit

Permalink
Merge pull request #7 from statisticsnorway/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
lalelisealstad authored Nov 25, 2024
2 parents 6865ebb + cc58c69 commit 3edbf34
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 2 deletions.
88 changes: 87 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,93 @@

## Features

- TODO
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

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ssb-datafangst-person-fagfunksjoner"
version = "0.0.0"
version = "0.0.2"
description = "SSB Datafangst Person Fagfunksjoner"
authors = ["Elise ALstad <lal@ssb.no>"]
license = "MIT"
Expand Down

0 comments on commit 3edbf34

Please sign in to comment.