Skip to content
Snippets Groups Projects
put_together.jl 988 B
using Plots
using CSV
using DataFrames
using DelimitedFiles


path = ARGS[1]
archive_path = ARGS[2]
xname = "frequency"
yname = "dt_latest_dropoff"

paths = Dict(:data => path*"/data/",
            :model => path*"/model/")


csv_filenames = readdir(paths[:data], join=true)

df = DataFrame(CSV.File(csv_filenames[1]))


for name in csv_filenames
#TODO put all the generated CSV Files together into one big file which is then saved to the correct location
    temp = DataFrame(CSV.File(name))
    append!(df, temp)
end
println("Saving Combined Dataframe to $archive_path")
CSV.write(archive_path*"results.csv", df)


model_filenames = readdir(paths[:model], join=false)
println("Moving $(length(model_filenames)) Models to $archive_path")
try
    mkdir("$archive_path/models/")
catch e
    println(e)
end
for name in model_filenames
    mv(paths[:model]*name, "$archive_path/models/"*name)
end


#TODO put all the generated models in an archive file and save it to the archiving location