X, Y, Z, Ti
Dimension are wrappers
(X, Y, Z, Ti)
diff --git a/.nojekyll b/.nojekyll index c8bfcb5..93221d7 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -a77169d8 \ No newline at end of file +5b97d39c \ No newline at end of file diff --git a/index.html b/index.html index 58f7b3e..3a66cc7 100644 --- a/index.html +++ b/index.html @@ -423,8 +423,9 @@
-
“Standard” dimensions (90% of spatial data):
-Arbitrary dimensions (everything else)
AbstracArray
s with lookup traits like Points
or Intervals
Sampled
and Categorical
are the most commonPoints
or Intervals
You can define them manually when you need to:
+using DimensionalData.Lookups
+l = Sampled(1:10; sampling=Intervals(Start()), order=ForwardOrdered(), span=Regular())
Sampled{Int64} ForwardOrdered Regular Intervals{Start}
+wrapping: 1:10
+
+
╭─────────────────────────────╮
│ 3-element DimArray{Int64,1} │
@@ -529,8 +550,8 @@ 1 dimensional
N dimensional
With standard dimensions in a Tuple
:
-
-
+
+
╭─────────────────────────╮
│ 3×4 DimArray{Float64,2} │
@@ -538,18 +559,18 @@ N dimensional
↓ X Categorical{Symbol} [:a, :b, :c] ForwardOrdered,
→ Y Sampled{Float64} 10.0:10.0:40.0 ForwardOrdered Regular Points
└───────────────────────────────────────────────────────────────────┘
- ↓ → 10.0 20.0 30.0 40.0
- :a 0.241505 0.0282003 0.462848 0.337448
- :b 0.370021 0.6171 0.588097 0.499839
- :c 0.842621 0.509002 0.762115 0.143347
+ ↓ → 10.0 20.0 30.0 40.0
+ :a 0.981993 0.513781 0.0573086 0.133294
+ :b 0.597572 0.938506 0.687245 0.831078
+ :c 0.243421 0.560166 0.854638 0.592527
With arbitrary Dim
dimensions, in a NamedTuple
:
-
-
+
+
╭─────────────────────────╮
│ 3×4 DimArray{Float64,2} │
@@ -557,18 +578,18 @@ N dimensional
↓ a Categorical{Symbol} [:a, :b, :c] ForwardOrdered,
→ b Sampled{Float64} 10.0:10.0:40.0 ForwardOrdered Regular Points
└───────────────────────────────────────────────────────────────────┘
- ↓ → 10.0 20.0 30.0 40.0
- :a 0.427305 0.633447 0.151995 0.998212
- :b 0.0411998 0.983792 0.546416 0.0624934
- :c 0.796127 0.0912018 0.415789 0.990061
+ ↓ → 10.0 20.0 30.0 40.0
+ :a 0.819396 0.894635 0.768049 0.093845
+ :b 0.427051 0.650875 0.0872013 0.500716
+ :c 0.215033 0.896086 0.922141 0.876665
Shorthands: rand
, fill
, zeros
, ones
-
-
+
+
╭─────────────────────────╮
│ 6×6 DimArray{Float64,2} │
@@ -576,28 +597,30 @@ N dimensional
↓ X,
→ Y Sampled{Int64} 10:2:20 ForwardOrdered Regular Points
└──────────────────────────────────────────────────────────┘
- 10 12 14 16 18 20
- 0.0775471 0.981323 0.324893 0.925181 0.229754 0.747415
- 0.847143 0.570464 0.434556 0.78922 0.578236 0.304476
- 0.36445 0.762368 0.120009 0.821311 0.73623 0.814217
- 0.752036 0.513882 0.143335 0.472154 0.400025 0.178112
- 0.129693 0.542092 0.0298521 0.260005 0.247613 0.35124
- 0.0366645 0.891387 0.384627 0.270451 0.0363059 0.310466
+ 10 12 14 16 18 20
+ 0.487087 0.972023 0.633484 0.662478 0.928678 0.976848
+ 0.0559741 0.543368 0.311436 0.716113 0.565865 0.938829
+ 0.150337 0.507311 0.451984 0.803921 0.647749 0.84485
+ 0.738515 0.444562 0.707928 0.339974 0.592118 0.284115
+ 0.688352 0.974059 0.928612 0.296633 0.221053 0.883975
+ 0.943116 0.752221 0.169269 0.0503815 0.758892 0.316402
-
-DimStack <: AbstractDimStack
-
+
+DimStack Constructors
+
+- DimStack <: AbstractDimStack
+
Layers with the same dimensions
-
-ds = X([:a, :b, :c]), Ti(10.0:10:40.0)
-S = DimStack((layer1=rand(Float32, 3, 4), layer2=zeros(Bool, 3, 4)), ds)
+
+ds = X([:a, :b, :c]), Ti(10.0:10:40.0)
+S = DimStack((layer1=rand(Float32, 3, 4), layer2=zeros(Bool, 3, 4)), ds)
╭──────────────╮
│ 3×4 DimStack │
@@ -615,9 +638,9 @@ Layers with the same dimensions
Layers with different dimensions:
-
-x, ti = X([:a, :b, :c]), Ti(10.0:10:40.0)
-DimStack((twodims=rand(Float32, x, ti), onedim=zeros(Bool, x)))
+
+x, ti = X([:a, :b, :c]), Ti(10.0:10:40.0)
+DimStack((twodims=rand(Float32, x, ti), onedim=zeros(Bool, x)))
╭──────────────╮
│ 3×4 DimStack │
@@ -634,30 +657,30 @@ Layers with different dimensions:
Named indexing
DimArray:
-
-using BenchmarkTools
-@btime $A[3, 4] # Base Julia Array syntax
-@btime $A[Y(4), X(3)] # Dimension wrappers
-@btime $A[Y=4, X=3] # Keyword syntax
+
+using BenchmarkTools
+@btime $A[3, 4] # Base Julia Array syntax
+@btime $A[Y(4), X(3)] # Dimension wrappers
+@btime $A[Y=4, X=3] # Keyword syntax
3.095 ns (0 allocations: 0 bytes)
3.095 ns (0 allocations: 0 bytes)
3.095 ns (0 allocations: 0 bytes)
-0.14334711233192854
+0.5925272105664855
DimStack:
-
-
+
+
- 3.406 ns (0 allocations: 0 bytes)
- 3.706 ns (0 allocations: 0 bytes)
+ 3.145 ns (0 allocations: 0 bytes)
+ 3.406 ns (0 allocations: 0 bytes)
-(layer1 = 0.15278113f0, layer2 = false)
+(layer1 = 0.33329403f0, layer2 = false)
@@ -674,15 +697,15 @@ At
Find exact or approximate matches
-
-
+
-
-
+
+
4
@@ -693,8 +716,8 @@ Near
Find the closest match
-
-
+
+
4
@@ -705,12 +728,12 @@ Contains
Find the interval that contains a value
-
-# Define a DimArray with Intervals lookup
-using DimensionalData.Lookups
-A = DimArray(100:100:9900, X(1.0:1.0:99.0; sampling=Intervals(Start())))
-# Index with Contains
-A[X(Contains(9.5))]
+
+# Define a DimArray with Intervals lookup
+using DimensionalData.Lookups
+A = DimArray(100:100:9900, X(1.0:1.0:99.0; sampling=Intervals(Start())))
+# Index with Contains
+A[X(Contains(9.5))]
900
@@ -721,8 +744,8 @@ .. (an IntervalSets.jl Interval)
Select data inside an interval
-
-
+
+
╭─────────────────────────────╮
│ 5-element DimArray{Int64,1} │
@@ -742,8 +765,8 @@ Where
Make dimensional queries
-
-
+
+
╭──────────────────────────────╮
│ 50-element DimArray{Int64,1} │
@@ -772,65 +795,67 @@ Plotting
Plots.jl
-
-
+
Makie.jl
-
-
+
-
+
Integrations
@@ -841,16 +866,18 @@ Integrations
Some packages building on DimensionalData.jl
+
-- Rasters.jl
-- YAXArrays.jl
-- ClimateBase.jl
-- AstroImages.jl
-- Arviz.jl
-- DynamicGrids.jl
-- PyramidScheme.jl
-- Jump.jl (extension)
+- Rasters.jl
+- YAXArrays.jl
+- ClimateBase.jl
+- AstroImages.jl
+- PyramidScheme.jl
+- Arviz.jl
+- JuMP.jl (extension)
+- DynamicGrids.jl
+
Thanks
diff --git a/index_files/figure-revealjs/cell-24-output-1.svg b/index_files/figure-revealjs/cell-26-output-1.svg
similarity index 68%
rename from index_files/figure-revealjs/cell-24-output-1.svg
rename to index_files/figure-revealjs/cell-26-output-1.svg
index 7504a61..27ca151 100644
--- a/index_files/figure-revealjs/cell-24-output-1.svg
+++ b/index_files/figure-revealjs/cell-26-output-1.svg
@@ -2,43 +2,43 @@