diff --git a/examples/skew_histogram.jl b/examples/skew_histogram.jl index 81376ef..a5ef8f4 100644 --- a/examples/skew_histogram.jl +++ b/examples/skew_histogram.jl @@ -87,17 +87,17 @@ md""" skews_for_each_board = combine(groupby(single_run_result, :psboard_id)) do sdf if all(ismissing, sdf.lvds_tx_skew) if any(>(Date(now()) - Day(1)), sdf.run_timestamp) - return (; lvds_tx_skew = missing) + return (; lvds_tx_skew = missing, position = missing) end @info "all skew is missing" sdf sdf.result_note end - skew = if nrow(sdf) == 1 - sdf[1, :lvds_tx_skew] + row = if nrow(sdf) == 1 + sdf[1, :] else - sdf[argmax(sdf.run_timestamp), :lvds_tx_skew] + sdf[argmax(sdf.run_timestamp), :] end # @info "" sdf Tables.schema(sdf) names(sdf) - (; lvds_tx_skew = skew) + (; lvds_tx_skew = row.lvds_tx_skew, position = row.position) end # ╔═╡ b23f3f63-4c6f-476f-aab8-22069940325e @@ -172,6 +172,30 @@ This passes the single run because the first and last line satisfy criteria. But of course this should not be passed. """ +# ╔═╡ 8c9e18cb-236f-4b57-97ea-323ac4f962d9 +md""" +# Dependency on positions +""" + +# ╔═╡ d4f56ef7-9aa4-4d33-bce4-ae29910607c4 +pos_id_map = map(enumerate("B-$i-$j" for i in 0:1 for j in 1:9)) do (i, s) + s => i +end |> Dict + +# ╔═╡ d2430bd9-bd01-43dc-83f4-82c905f5a410 +let + df = dropmissing(skews_for_each_board) + rainclouds( + df.position .|> passmissing(p -> pos_id_map[p]), + df.lvds_tx_skew, + axis = (; + title = "skew position dependency", + xticks = (values(pos_id_map) |> collect, keys(pos_id_map) |> collect), + xticklabelrotation = π / 2, + ) + ) +end + # ╔═╡ 00000000-0000-0000-0000-000000000001 PLUTO_PROJECT_TOML_CONTENTS = """ [deps] @@ -1763,5 +1787,8 @@ version = "3.6.0+0" # ╠═6a791331-a896-462e-90c3-1eea3d72e0db # ╠═2e47c2b0-4568-4ac2-9926-239de48b0ca3 # ╟─099fae93-0fe6-40f1-bdc5-d23738f3f854 +# ╠═8c9e18cb-236f-4b57-97ea-323ac4f962d9 +# ╠═d4f56ef7-9aa4-4d33-bce4-ae29910607c4 +# ╠═d2430bd9-bd01-43dc-83f4-82c905f5a410 # ╟─00000000-0000-0000-0000-000000000001 # ╟─00000000-0000-0000-0000-000000000002