caoscrawler.converters.spss module

Converter for SAV files (stored by SPSS).

class caoscrawler.converters.spss.SPSSConverter(definition: dict, name: str, converter_registry: dict)

Bases: TableConverter

Converter for SAV files (stored by SPSS).

create_children(values: GeneralStore, element: StructureElement) list
caoscrawler.converters.spss.read_column_types(savfile: str | None = None, meta: Any | None = None) dict[str, str]

Read SAV file and return the column types.

Optionally, take data from a previours reading.

Parameters:
  • savfile (Optional[str]) – The SAV file to read.

  • meta (Optional) – The meta data result from pyreadstat.read_sav(…).

Returns:

out – The column names and types.

Return type:

dict[str, str]

caoscrawler.converters.spss.spss_to_yaml(savfile: str, yamlfile: str, cfood: str | None = None) None

Parse the *.sav and create basic datamodel in yamlfile.

Parameters:

cfood (str) – If given, also create a cfood skeleton.

caoscrawler.converters.spss.spss_to_datamodel_main()

The main function of this script.