started report

This commit is contained in:
2022-02-14 00:35:54 -07:00
parent 7003f4acc6
commit 31725d6b49
8 changed files with 157 additions and 742 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -2,5 +2,4 @@
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DataFramesMeta = "1313f7d8-7da2-5740-9ea0-a2ca25f37964"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"

View File

@@ -2,13 +2,14 @@ using DataFrames
using LinearAlgebra
using CSV
using DataFramesMeta
using Plots
using StatsPlots
# using Plots
# using StatsPlots
using PlotlyJS
begin
df = CSV.read("compiled.csv", DataFrame)
df.bb_volume = df.bb_length .* df.bb_width .* df.bb_height
df.box = df.bb_length .* df.bb_width .* df.bb_height
@eachrow! df begin
@@ -33,7 +34,7 @@ begin
# Convert material to scalar
begin
kv = Dict(reverse.(enumerate(Set(df.material_name))))
mats = []
mats = [] |> Vector{Int}
for material in df.material_name
push!(mats, kv[material])
end
@@ -41,20 +42,28 @@ begin
end
# Remove columns not needed for analysis
df = df[!, [:mass, :volume, :density, :area, :bb_volume, :Ibar]]
# df = df[!, [:mass, :volume, :density, :area, :bb_volume, :Ibar, :material_index]]
# Remove outliers
df = df[df.bb_volume.<1e6, :]
df = df[df.box.<1e6, :]
df = df[df.mass.<1000, :]
end
@df df cornerplot(cols(1:4), compact = true)
# @df df cornerplot(cols(1:7), compact = true)
# plot(df.mass)
# histogram(df.mass)
scatter(df.mass, df.volume)
# scatter(df.mass, df.Ibar)
features = [:mass, :volume, :density, :area, :box, :Ibar]
plot(df, dimensions = features, kind = "splom", Layout(title = "Raw Data"))
corner(df)
CSV.write("prepped.csv", df)
CSV.write("prepped.csv", df)
df = dataset(DataFrame, "iris")
features = [:sepal_width, :sepal_length, :petal_width, :petal_length]
plot(df, dimensions = features, color = :species, kind = "splom")