From e4b418a7cbfd314847f8f48bd29f5d111abb79e3 Mon Sep 17 00:00:00 2001
From: "ruben.haag" <ruben.haag@stud.uni-goettingen.de>
Date: Tue, 30 Nov 2021 09:32:31 +0100
Subject: [PATCH] For putting the gathered Data in one file an Plotting it

---
 put_together.jl | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)

diff --git a/put_together.jl b/put_together.jl
index 885c0ab..c62f76c 100644
--- a/put_together.jl
+++ b/put_together.jl
@@ -1,11 +1,40 @@
+using Plots
+using CSV
 
+path = ARGS[1]
+len = eval(Meta.parse(ARGS[2]))
+archive_path = ARGS[3]
+xname = "frequency"
+yname = "dt_earliest_pickup"
 
+df = Dataframe(path*"1.csv")
 
-for index in indxes
+
+for i in 2:len
     #TODO put all the generated CSV Files together into one big file which is then saved to the correct location
+    temp = DataFrame(path*"$i.csv")
+    append!(df, temp)
 end
+println("Saving Combined Dataframe to $archive_path")
+CSV.write(archive_path*"$name.csv", df)
+
+x, y = df[xname], df[yname]
+
+ks = names[df]
+deleteat!(ks, xname)
+deleteat!(ks, yname)
 
 
+for name in ks
+    data = df[name]
+    map = heatmap(1:size(data,1),
+    1:size(data,2), data,
+    #c=cgrad([:blue, :white,:red, :yellow]),
+    xlabel="Frequency", ylabel="dt_earliest_pickup",
+    title="$name")
+    savefig(path*"$name.png")
+end
+
 #TODO put all the generated models in an archive file and save it to the archiving location
 
-#TODO make Plots from the CSV file
+#TODO make Plots from the CSV files
-- 
GitLab