Skip to content

Commit

Permalink
bug 3
Browse files Browse the repository at this point in the history
  • Loading branch information
vladdez committed Dec 4, 2024
1 parent 9dc935b commit 40b15cc
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions docs/example_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,23 @@ Datasets:
**Return Value:** `DataFrame`.
"""
function example_data(example = "pattern_detection_values"; mode = 1)
if mode == 1
datapath = dirname(dirname(Base.current_project())) * "/data/evts_d.csv"
else
datapath = dirname(Base.current_project()) * "/data/evts_d.csv"
end
if example == "pattern_detection_values"
if mode == 1
datapath = dirname(dirname(Base.current_project())) * "/data/evts_d.csv"
else
datapath = dirname(Base.current_project()) * "/data/evts_d.csv"
end
evts_d = CSV.read(datapath, DataFrame)
pattern_detection_values = stack(evts_d)
rename!(pattern_detection_values, :variable => :condition, :value => :estimate)
evts_d = nothing
return pattern_detection_values
elseif example == "pattern_detection_values_32"
evts_d = CSV.read(datapath, DataFrame)
pattern_detection_values = stack(evts_d[1:32, :])
rename!(pattern_detection_values, :variable => :condition, :value => :estimate)
evts_d = nothing
return pattern_detection_values
else
error("unknown example data")
end
Expand Down

0 comments on commit 40b15cc

Please sign in to comment.