Description
Sorry to tag you again @jkrumbiegel but we may need your insights on this as well, particularly question 3.
I have datasets that are structured over varied dimension values in a layered nature.
Here's some code that demonstrates the structure.
Basically each bearing θ
is for a different set of range r
values,
and each range r
has a different set of depth z
values.
using Base: range as linrange
using DimensionalData
function rands_sorted_dim(dim::Symbol; N::Int = rand(5:12))
return [0; rand(N)] |> sort! |> unique! |> Dim{dim}
end
"Set of depth-sound speed value pairs."
function rand_1D_profile()
z = rands_sorted_dim(:z)
return rebuild(
rand(z);
name = "1D Profile"
)
end
"One 1D profile per range."
function rand_2D_profile()
r = rands_sorted_dim(:r)
return DimArray(
[
rand_1D_profile()
for r_ in r
],
r;
name = "2D Profile"
)
end
"One 2D profile per bearing."
function rand_3D_profile()
θ = Dim{:θ}(linrange(0, step = 45, length = 8))
return DimArray(
[
rand_2D_profile()
for θ_ in θ
],
θ;
name = "3D Profile"
)
end
prof3D = rand_3D_profile()
I'm opening this issue to ask the following questions:
-
Inspection: Running
prof3D
in the REPL to take a look at its structure prints out a lot of information, is there a better way to view a nice summary of its structure? Eventypeof(prof3D)
still prints a lot. I currently dokeys(prof3D)
. Maybe anAbstractTrees.jl
interface? -
Structure: Some of my data (not demonstrated above) would be like
DimStack
but not share the same values over the same dimensions, e.g. sound speed could be for depths0 : 100 : 200
, but density could be for depths0 : 50 : 200
. What's the best way to store such? -
Visualisation: Do I have to use
AlgebraOfGraphics.pregrouped
for all this data? Or will there be supported syntax conveniences for such layers and stacks of data? I've foundDimArray
s andDimStack
s work nicely withAlgebraOfGraphics.data
so I don't have to usepregrouped
. So it's just the semantics for nestedDimArray
s andDimStack
s that I suppose I'm asking about. Especially for syntax likemapping(layout = :θ, color = :r)
.
I'm happy to try and contribute. Primarily asking to know if any thoughts on this already exist, and if so, what direction, and if I can help.
Activity