Extractor#

class alfred3.cli.extract.Extractor(in_path: Optional[str] = None, out_path: Optional[str] = None, delimiter: str = ';')[source]#

Bases: object

Turns uncurated alfred data from json format into csv format.

Parameters
  • in_path (str) – Path to directory containing json files. If None (default), the current working directory will be used.

  • out_path (str) – Path to directory in which the output csv file will be place. If None (default), the current working directory will be used.

  • delimiter (str) – Delimiter to use in the resulting csv file. Defaults to “;”

Examples

The extractor is used by calling one of its four methods. The following python code can be used to turn all alfred json datasets in the current working directory into a nice csv file.

>>> from alfred3.export import Extractor
>>> ex = Extractor()
>>> ex.extract_exp_data()

Methods

extract_codebook

Extracts codebook data from json files in the Extractors in_path.

extract_exp_data

Extracts the main experiment data from json files in the Extractors in_path.

extract_move_history

Extracts movement data from json files in the Extractors in_path.

extract_unlinked_data

Extracts unlinked data from json files in the Extractors in_path.