ssb_utdanning.katalog.kataloger package

ssb_utdanning.katalog.kataloger.nuskat module

get_nuskat(path='')

Retrieves nuskat.

Retrieves a UtdKatalog object representing the Nuskat catalog, which is maintained by 360 and connects additional data to each nus2000 code. This catalog is typically stored in a SAS7BDAT file format and provides detailed classifications.

Parameters:

path (str) – The path to the Nuskat catalog file. If not specified, a default path is used which points to the latest known version of the Nuskat catalog.

Returns:

An instance of UtdKatalog loaded with data from the specified Nuskat catalog file.

The instance is specifically configured to use ‘nus2000’ as the key column.

Return type:

UtdKatalog

Notes

The function assumes that the file at the specified path is in SAS7BDAT format and that the key column named ‘nus2000’ exists within that file. If the file or the column does not exist, an error might be raised when attempting to load the data.

ssb_utdanning.katalog.kataloger.skoleregister module

get_skoleregister(from_date='')

Get the skoleregister as an UtdKatalog from a specific date.

Parameters:

from_date (str) – The date to get the skoleregister from. Defaults to “”.

Returns:

The skoleregister as an UtdKatalog.

Return type:

UtdKatalog

skoleregister_dates()

Retrieves a dictionary of skolereg versions according to date.

Retrieves a dictionary mapping each year extracted from the filenames in the skoleregister directory to the corresponding file path. The filenames are expected to contain year information as four digits following an underscore.

Returns:

A dictionary where each key is a four-digit year string extracted from the filename,

and each value is the Path object pointing to the corresponding file.

Return type:

dict[str, Path]

Raises:

NotImplementedError – If the function is called within the DAPLA environment, where it is not yet implemented.