syinsyra

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package syinsyra provides first-class Insyra integration for Syralit. Import with alias syi:

import syi "github.com/HazelnutParadise/syralit/integrations/insyra"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreaChart

func AreaChart(dt *insyra.DataTable, xCol, yCol string)

AreaChart extracts a numeric column and renders an area chart.

func BarChart

func BarChart(dt *insyra.DataTable, xCol, yCol string)

BarChart extracts a numeric column and renders a bar chart.

func CCLBuilder added in v0.3.0

func CCLBuilder(dt *insyra.DataTable, opts ...sy.Option) *insyra.DataTable

CCLBuilder renders an interactive CCL (column-computation language) box that adds a computed column to a DataTable and returns the result, also rendering it. The source table is never mutated. The formula is applied only when the user presses Apply, and each evaluation is time-bounded — a formula that fails or runs away is reported in the UI and not applied, so it can never hang or crash the app.

Example formula (referencing columns by their index letter): A * B + 1

func ColumnSelect

func ColumnSelect(label string, dt *insyra.DataTable, opts ...sy.Option) string

ColumnSelect renders a SelectBox populated with the DataTable's column names.

func Correlation added in v0.3.0

func Correlation(dt *insyra.DataTable, colX, colY, method string)

Correlation renders the correlation coefficient and p-value between two numeric columns as Metric widgets.

func CorrelationMatrix added in v0.3.0

func CorrelationMatrix(dt *insyra.DataTable, method string, opts ...sy.Option)

CorrelationMatrix renders the pairwise correlation matrix of a DataTable's numeric columns. method is "pearson" (default), "spearman", or "kendall".

func Describe added in v0.3.0

func Describe(dt *insyra.DataTable, opts ...sy.Option)

Describe renders a full summary table (count, mean, std, min, quartiles, max, …) for every column of a DataTable, using Insyra's DataTable.Describe.

func EditableList

func EditableList(dl *insyra.DataList, opts ...sy.Option) []any

EditableList renders a DataList as an editable single-column table and returns the current values reflecting user edits.

func EditableTable

func EditableTable(dt *insyra.DataTable, opts ...sy.Option) [][]any

EditableTable renders an Insyra DataTable as an editable table. Returns the current rows reflecting user edits.

func FilterBuilder added in v0.3.0

func FilterBuilder(dt *insyra.DataTable, opts ...sy.Option) *insyra.DataTable

FilterBuilder renders an interactive row filter over a DataTable (column + operator + value) and returns the filtered DataTable, also rendering it. The source table is never mutated (it operates on a Clone). Use the returned table for downstream steps (charts, stats, …).

func Histogram

func Histogram(dl *insyra.DataList, bins int, opts ...sy.Option)

Histogram renders the distribution of a numeric DataList across the given number of bins. This is unique to lists — there is no DataTable equivalent.

func LineChart

func LineChart(dt *insyra.DataTable, xCol, yCol string)

LineChart extracts two columns from a DataTable and renders a line chart. xCol provides x-axis labels, yCol provides numeric y values.

func LinearRegression added in v0.3.0

func LinearRegression(dt *insyra.DataTable, yCol string, xCols ...string)

LinearRegression fits yCol against one or more xCols and renders the fit (R², adjusted R², coefficients with std error / t / p). For a single predictor it also shows the equation and a scatter of the data.

func List

func List(dl *insyra.DataList, opts ...sy.Option)

List renders an Insyra DataList as a single-column Syralit DataFrame. The column header is the list's name (or "Value" if unnamed).

func ListAreaChart

func ListAreaChart(dl *insyra.DataList, opts ...sy.Option)

ListAreaChart renders a DataList's numeric values as an area chart over index.

func ListBarChart

func ListBarChart(dl *insyra.DataList, opts ...sy.Option)

ListBarChart renders a DataList's numeric values as a bar chart over index.

func ListDescribe

func ListDescribe(dl *insyra.DataList, opts ...sy.Option)

ListDescribe renders a pandas-style summary table for a numeric DataList: count, mean, std, min, 25%, 50% (median), 75%, max.

func ListLineChart

func ListLineChart(dl *insyra.DataList, opts ...sy.Option)

ListLineChart renders a DataList's numeric values as a line chart over their index. The series is named after the list.

func ListMetrics

func ListMetrics(dl *insyra.DataList)

ListMetrics renders summary statistics for a numeric DataList (count, mean, min, max) as a row of Metric widgets.

func ListPreview

func ListPreview(dl *insyra.DataList, n int, opts ...sy.Option)

ListPreview renders the first n values of a DataList as a single-column table.

func Metrics

func Metrics(dt *insyra.DataTable, col string)

Metrics renders summary statistics for a numeric column as Metric widgets. It is shorthand for ListMetrics on the named column.

func ParseTable added in v0.3.0

func ParseTable(name string, data []byte) (*insyra.DataTable, error)

ParseTable parses raw file bytes into a DataTable by file-name extension. Exposed so callers can parse files from sources other than the uploader (embedded assets, downloads, …).

func PieChart

func PieChart(dt *insyra.DataTable, labelCol, valueCol string)

PieChart extracts a label column and a value column to render a pie chart.

func Preview

func Preview(dt *insyra.DataTable, n int, opts ...sy.Option)

Preview renders the first n rows of a DataTable as a DataFrame.

func ScatterChart

func ScatterChart(dt *insyra.DataTable, xCol, yCol string)

ScatterChart extracts x and y columns and renders a scatter chart.

func ScatterFromLists added in v0.3.0

func ScatterFromLists(xName, yName string, x, y *insyra.DataList)

ScatterFromLists renders a scatter chart from two equal-length DataLists.

func TTest added in v0.3.0

func TTest(dt *insyra.DataTable, col1, col2 string, equalVariance bool)

TTest renders an independent two-sample t-test between two numeric columns.

func Table

func Table(dt *insyra.DataTable, opts ...sy.Option)

Table renders an Insyra DataTable as a Syralit DataFrame (sortable table).

func UploadTable added in v0.3.0

func UploadTable(label string, opts ...sy.Option) *insyra.DataTable

UploadTable renders a file uploader and parses the uploaded file into an Insyra DataTable. The format is detected from the file extension: .csv, .xlsx/.xls, and .json are supported. Returns nil until a valid file is uploaded; parse errors are surfaced in the UI.

Parquet is intentionally not handled here — it would drag Apache Arrow into every app that uses this adapter. Read parquet directly with github.com/HazelnutParadise/insyra/parquet and pass the result to Table.

Types

This section is empty.

Directories

Path Synopsis
Package syiplot renders Insyra's go-echarts charts (insyra/plot) inline in a Syralit app, unlocking interactive chart types Syralit's built-in Chart.js layer doesn't have — Sankey, word cloud, K-line, gauge, funnel, theme-river, box plot, radar, and more.
Package syiplot renders Insyra's go-echarts charts (insyra/plot) inline in a Syralit app, unlocking interactive chart types Syralit's built-in Chart.js layer doesn't have — Sankey, word cloud, K-line, gauge, funnel, theme-river, box plot, radar, and more.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL