ClustJs is a simple Javascript sdk that builds statistical graphs for web applications.
Add plots to your web applications in one line of code! Type this in the browser console: statsjs = await import("https://episphere.github.io/statsJs/sdk.js")
PCA Plot
Type the following in the console or web application:
await import("https://lorenasandoval88.github.io/statsjs/sdk.mjs").pca_UI()
Optional parameters inlcude:
pca.loadUI({divid = "myDiv"})
Hierarchical Clustering
Type the following in the console or web application:
await import("https://lorenasandoval88.github.io/statsjs/sdk.mjs").hclust_plot()
Optional parameters inlcude:
plot({
divid: "", (if not provided, it will append a div to the body)
width:400,
height: 800,
matrix: matrix, (numbers only, no text columns)
rownames: rownames,
colnames: colnames,
clusterCols: true,
clusterRows: true,
clusteringDistanceRows: "euclidean",
clusteringDistanceCols: "euclidean",
clusteringMethodCols: "complete",
clusteringMethodRows: "complete",
marginTop: marginTop ,
marginLeft: marginLeft,
colPadding: colPadding ,
rowPadding: rowPadding,
colDendoColor: "blue",
rowDendoColor: "red",
dendogram_font: "10px",
heatmapColor: "green",
heatmapColorScale: [0, 8],
tooltip_decimal: 2,
tooltip_fontFamily: 'monospace',
tooltip_fontSize: '12px'
})
Heatmap
Type the following in the console or web application:
const sdk = await import("https://lorenasandoval88.github.io/statsjs/sdk.mjs").heatmap.plot()