Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

js-datasets-iris

chen004033MIT1.0.4

Package provides the iris dataset for javascript

statistical distributions, normal distribution, t distribution, f distribution, Chi-squared distribution, probability, probability distributions, random numbers, random variates, statistics, stats, distribution-functions

readme

js-datasets-iris

Package provides the "Iris dataset for javascript

Install

npm install js-datasets-iris

Usage

In nodejs

var iris = require('js-datasets-iris')

// == PRITN ROW COUNT == //
console.log(iris.rowCount);

// == PRINT ALL DATA in the format of [[sepalLength, sepalWidth, petalLength, petalWidth, specisies], ...] == //
console.log(iris.data);

// == PRINT the sepalLength == //
console.log(iris.sepalLength);

// == PRINT the sepalWidth == //
console.log(iris.sepalWidth);

// == PRINT the petalLength == //
console.log(iris.petalLength);

// == PRINT the petalWidth == //
console.log(iris.petalWidth);

// == shuffle the data rows in the iris dataset == //
iris.shuffle();

In HTML

Include the "node_modules/js-datasets-iris/build/jsiris.min.js" (or "node_modules/js-datasets-iris/src/jsiris.js") in your HTML <script> tag

The sample code can be found in the example.html