izuku
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

Izuku

Izuku is a simple, fast, and powerful tabular data representation and manipulation library written in TypeScript. It is designed to be used to view, manipulate and debug 2D data in NodeJS applications.

The core of Izuku is the Frame class that represents a 2D array of data. It is designed to be used as a data structure for tabular data. Izuku is heavily inspired by Pandas.

Note: Izuku is not a replacement for Pandas and should not be used for data analysis. It is designed to be used for data visualization and debugging. It can, however, handle large datasets and help you understand your data better but comes at some cost in performance. Since, Pandas is based on NumPy, and NumPy is written in C, Pandas would be much faster than Izuku.

Installation

Izuku is available on npm. To install Izuku, run the following command:

npm install izuku

Basic Usage

As defined above, the basic usage of Izuku is to create a Frame object and manipulate it. You can use either an 2D array, a JSON Object, or a CSV File to create a Frame. The following example creates a Frame from a 2D array:

import { Frame } from 'izuku';
// alternatively, const { Frame } = require('izuku');

// define some column names as an array
const header = ['Name', 'Age', 'Gender', 'Country'];

// define some data as a 2D array
const data = [
  ['Arthur', 21, 'Male', 'USA'],
  ['Betty', 20, 'Female', 'Canada'],
  ['Victor', 25, 'Male'],
  ['Dodger', 30, 'Male', 'Canada'],
  ['Rayan', 21, 'Male', 'Russia'],
  ['Skitley', 29, 'Female', 'Germany'],
  ['Victoria', 89, 'Female', 'UK'],
  ['Tiger', 23, 'Male', 'India'],
  ['Killjoy', null, 'Female', 'Riot']
];

// create a frame, header is optional
const frame = new Frame(data, header);

// print the frame
frame.show();

The above code creates a frame and prints it to the console. It looks like this:

╔═══════╤══════════╤══════╤════════╤═════════╗
║ Index │ Name     │ Age  │ Gender │ Country ║
╟───────┼──────────┼──────┼────────┼─────────╢
║ 0     │ Arthur   │ 21   │ Male   │ USA     ║
╟───────┼──────────┼──────┼────────┼─────────╢
║ 1     │ Betty    │ 20   │ Female │ Canada  ║
╟───────┼──────────┼──────┼────────┼─────────╢
║ 2     │ Victor   │ 25   │ Male   │         ║
╟───────┼──────────┼──────┼────────┼─────────╢
║ ...   │ ...      │ ...  │ ...    │ ...     ║
╟───────┼──────────┼──────┼────────┼─────────╢
║ 6     │ Victoria │ 89   │ Female │ UK      ║
╟───────┼──────────┼──────┼────────┼─────────╢
║ 7     │ Tiger    │ 23   │ Male   │ India   ║
╟───────┼──────────┼──────┼────────┼─────────╢
║ 8     │ Killjoy  │ null │ Female │ Riot    ║
╚═══════╧══════════╧══════╧════════╧═════════╝

Futher Documentation

For more documentation, please take a look at the Documentation.

Cloning and Building this Repository

Clone the repository:

git clone https://github.com/luciferreeves/izuku.js.git

Run the build script:

cd izuku.js && npm install && npm run build

Run tests:

cd izuku.js && npm test

Contributing

To learn how to contribute to Izuku, please take a look at the Contributing Guide. Make sure to also read the Code of Conduct before submitting a pull request.

Readme

Keywords

Package Sidebar

Install

npm i izuku

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

104 kB

Total Files

61

Last publish

Collaborators

  • reeves