DyadData provides an interface (DyadDataset
) for timeseries-like datasets in dyad. The datasets can be represented by local files, JuliaHub.jl datasets or raw data.
For local files
DyadDataset(
filepath::AbstractString;
independent_var::AbstractString,
dependent_vars::Vector{<:AbstractString},
kwargs...,
)
For JuliaHub datasets
DyadDataset(
username::AbstractString,
name::AbstractString;
independent_var::AbstractString,
dependent_vars::Vector{<:AbstractString},
kwargs...,
)
For raw data
DyadDataset(
data;
independent_var::AbstractString,
dependent_vars::Vector{<:AbstractString},
)
To work with the data, the build_dataframe(::DyadDataset)
can be used to get a DataFrame
, as the name implies.
In the case of file based datasets, this will open the file with CSV.jl and in the case of JuliaHub datastes,
this will download the dataset and then open it.
To pass read options for CSV.jl, additional keyword arguments can be passed to DyadDataset
and they will be
forwarded to CSV.read
.