Preprocessing¶
HIFIS-Surveyval comes with the possibility to run a preprocessing script before all analysis scripts. Where it is located and how it is named is set in the settings.
Preprocessing is skipped in case no preprocessing script exists.
You can create an empty preprocessing script with the following command:
hifis-surveyval init -p
Within the preprocessing script, you need to have a function called preprocessing, which receives a DataContainer Object as argument and is expected to return a DataContainer Object.
The data you receive is the parsed raw data from csv. You can do whatever The data you receive is the parsed raw data from your survey’s CSV, enriched with the metadata you provided. You can do whatever you like within the script and modify the data as you wish. Common use-cases would be to filter the data, like dropping incomplete questionnaires. If you are concerned about reproducibility it is highly recommended to also publish the preprocessing script along with you raw data and metadata.
All analysis scripts run afterwards will receive a copy of the DataContainer returned by the preprocessing script.