Frontmatter

If you are publishing this notebook on the web, you can set the parameters below to provide HTML metadata. This is useful for search engines and social media.

using DataFrames, CSV, Plots, StatsPlots, PlutoUI, DataFrames
27.1 s

Chose modality here

md"""### Chose modality here"""
520 μs
@bind modality Select(["T1w", "T2w", "bold"])
281 ms

Code to load data

begin
folder = pwd() * "/mriqcdata/"
sites = ["UIUC", "WHASC", "NWU", "WASHU"]
dfs = Dict(site => CSV.read(folder*"$site/group_$modality.tsv", DataFrame) for site in sites)
md"""`Code to load data`"""
end
29.4 s

Code to add run & session info to DataFrame

begin
for (site,df) in dfs
sessions = [split(row[:bids_name],"_")[2] for row in eachrow(df)]
runs = [split(row[:bids_name],"_")[end-1] for row in eachrow(df)]
dfs[site][!,:session] .= sessions
dfs[site][!,:run] .= runs
end
md"""`Code to add run & session info to DataFrame`"""
end
1.9 s

Choose which DF to visualize

md"""#### Choose which DF to visualize"""
390 μs

Setting up drop down boxes

begin
viewdfui = @bind viewdf Select(sites);
sesfilterui = @bind sesfilter Select(
[(x -> (x.session=="ses-A" || x.session=="ses-01") ? true : false) => "ses-A",
(x -> (x.session=="ses-B" || x.session=="ses-02") ? true : false) => "ses-B",
(x -> true) => "both"],
default=(x -> true) => "both"
)
md"""`Setting up drop down boxes`"""
end
243 ms

Site: Session:

PlutoUI.combine() do Child
md"""
Site: $(Child(viewdfui)) Session: $(Child(sesfilterui))
"""
end
935 ms

MethodError: no method matching getindex(::DataFrames.Index, ::Main.var"workspace#3".var"#10#14")

Closest candidates are:

getindex(::DataFrames.AbstractIndex, !Matched::InvertedIndices.InvertedIndex) at ~/.julia/packages/DataFrames/Lrd7K/src/other/index.jl:224

getindex(::DataFrames.AbstractIndex, !Matched::DataAPI.All) at ~/.julia/packages/DataFrames/Lrd7K/src/other/index.jl:227

getindex(::DataFrames.AbstractIndex, !Matched::DataAPI.Between) at ~/.julia/packages/DataFrames/Lrd7K/src/other/index.jl:226

...

  1. #filter#89@abstractdataframe.jl:1156[inlined]
  2. filter@abstractdataframe.jl:1155[inlined]
  3. top-level scope@Local: 1[inlined]
filter(sesfilter, dfs[viewdf])
---

Basic plots

md"""### Basic plots"""
212 μs

MethodError: no method matching getindex(::DataFrames.Index, ::Main.var"workspace#3".var"#10#14")

Closest candidates are:

getindex(::DataFrames.AbstractIndex, !Matched::InvertedIndices.InvertedIndex) at ~/.julia/packages/DataFrames/Lrd7K/src/other/index.jl:224

getindex(::DataFrames.AbstractIndex, !Matched::DataAPI.All) at ~/.julia/packages/DataFrames/Lrd7K/src/other/index.jl:227

getindex(::DataFrames.AbstractIndex, !Matched::DataAPI.Between) at ~/.julia/packages/DataFrames/Lrd7K/src/other/index.jl:226

...

  1. #filter#89@abstractdataframe.jl:1156[inlined]
  2. filter@abstractdataframe.jl:1155[inlined]
  3. top-level scope@Local: 1[inlined]
@df filter(sesfilter, dfs[viewdf]) corrplot(cols(2:5), grid=false,
fillcolor=cgrad(),size=(700,500))
---