code creates a clean dataframe and calculate main parameters