-- Main function. Parses command line arguments and calls drawResampled for Time Series processing
main :: IO ()
main = do
    ps <- execParser opts
    ts <- TS.loadCSV TS.HasHeader parseISODateTime (fileName ps)
    drawResampled ts (convertTime (resolution ps))
    where
        opts = info (helper <*> params) ( fullDesc <> progDesc "Resampling time series" )


-- Convert Time series to format expected by Chart library
main :: IO ()
main = do
    ps <- execParser opts
    ts <- TS.loadCSV TS.HasHeader parseISODateTime (fileName ps)
    drawResampled ts (convertTime (resolution ps))
    where
        opts = info (helper <*> params) ( fullDesc <> progDesc "Resampling time series" )


-- Convert Time series to format expected by Chart library
main = do
    ps <- execParser opts
    ts <- TS.loadCSV TS.HasHeader parseISODateTime (fileName ps)
    drawResampled ts (convertTime (resolution ps))
    where
        opts = info (helper <*> params) ( fullDesc <> progDesc "Resampling time series" )


-- Convert Time series to format expected by Chart library