code for generating timeseries of errors in home