Skip to content

DyadData

Documentation for DyadData.

DyadData.DyadDatapoint Method
julia
DyadDatapoint(
username::AbstractString,
name::AbstractString;
variable_names::Vector{<:AbstractString},
kwargs...)

Represent a datapoint dataset that is backed by a JuliaHub dataset.

Keyword arguments

  • variable_names: a vector of the names of the columns for the variables

When reading files (local file option or a downloaded JuliaHub dataset), CSV.jl is used. Additional keyword arguments passed to this function will be passed on to CSV.read. This can help with changing settings such as the delimiter used in the file. See https://csv.juliadata.org/stable/reading.html for more details.

source
DyadData.DyadDatapoint Method
julia
DyadDatapoint(
filepath::AbstractString = "";
variable_names::Vector{<:AbstractString},
kwargs...)

Represent a datapoint that is backed by a local file.

Keyword arguments

  • variable_names: a vector of the names of the columns for the variables

When reading files (local file option or a downloaded JuliaHub dataset), CSV.jl is used. Additional keyword arguments passed to this function will be passed on to CSV.read. This can help with changing settings such as the delimiter used in the file. See https://csv.juliadata.org/stable/reading.html for more details.

source
DyadData.DyadDatapoint Method
julia
DyadDatapoint(
data::AbstractVector;
variable_names::Vector{<:AbstractString},
kwargs...)

Represent a datapoint dataset that is backed by raw data (e.g. a vector).

Keyword arguments

  • variable_names: a vector of the names of the columns for the variables
source
DyadData.DyadDataset Method
julia
DyadDataset(
filepath::AbstractString = "";
independent_var::AbstractString,
dependent_vars::Vector{<:AbstractString},
kwargs...)

Represent a timeseries-like dataset that is backed by a local file.

Keyword arguments

  • independent_var: the name of the column that represents the independent variable (usually the time)

  • dependent_vars: a vector of the names of the columns for the dependent variables

When reading files (local file option or a downloaded JuliaHub dataset), CSV.jl is used. Additional keyword arguments passed to this function will be passed on to CSV.read. This can help with changing settings such as the delimiter used in the file. See https://csv.juliadata.org/stable/reading.html for more details.

source
DyadData.DyadDataset Method
julia
DyadDataset(
data;
independent_var::AbstractString,
dependent_vars::Vector{<:AbstractString},
kwargs...)

Represent a timeseries-like dataset that is backed by raw data.

Keyword arguments

  • independent_var: the name of the column that represents the independent variable (usually the time)

  • dependent_vars: a vector of the names of the columns for the dependent variables

source
DyadData.build_dataframe Method
julia
build_dataframe(d::DyadDataset)

Build a DataFrame out of the specified timeseries dataset. The column names will correspond to the names of the independent variable & the ones for the dependent variables. Note that the order of the columns is dictated by the order in the file, not by the order inside the dependent_vars argument for DyadDataset. The dependent_vars argument only specifies the available columns to use, not their order.

source
DyadData.resolve_dyad_uri Method
julia
resolve_dyad_uri(uri::AbstractString)

Resolve a dyad:// URI to a local file path.

The expected scheme is dyad://<package_name>/<local_path>, where <local_path> is relative to the assets folder of the package.

Examples

julia
julia> using BlockComponents, DyadData

julia> DyadData.resolve_dyad_uri("dyad://BlockComponents/data/block_components.csv")
"/Users/someuser/.julia/dev/BlockComponents/assets/data/block_components.csv"
source