Skip to content
This repository has been archived by the owner on Oct 20, 2019. It is now read-only.

data-forge/data-forge-js-bower

Repository files navigation

Data-Forge

The JavaScript data transformation and analysis toolkit inspired by Pandas and LINQ.

Implemented in TypeScript, used in JavaScript ES5+ or TypeScript.

Why not do your data wrangling, analysis and visualization entirely in JavaScript? To support my effort please buy or help promote my book Data Wrangling with JavaScript.

Or check out my blog: The Data Wrangler.

GitHub license GitHub issues

Install

npm install --save data-forge

Quick start

Data-Forge can load CSV, JSON or arbitrary data sets.

Parse the data, filter it, transform it, aggregate it, sort it and much more.

Use the data however you want or export it to CSV or JSON.

Here's an example:

const dataForge = require('data-forge');
dataForge.readFile('./input-data-file.csv') // Read CSV file (or JSON!)
    .parseCSV()
    .parseDates(["Column B"]) // Parse date columns.
    .parseInts(["Column B", "Column C"]) // Parse integer columsn.
    .parseFloats(["Column D", "Column E"]) // Parse float columns.
    .dropSeries(["Column F"]) // Drop certain columns.
    .where(row => predicate(row)) // Filter rows.
    .select(row => transform(row)) // Transform the data.
    .asCSV() 
    .writeFile("./output-data-file.csv") // Write to output CSV file (or JSON!)
    .then(() => {
        console.log("Done!");
    })
    .catch(err => {
        console.log("An error occurred!");
    });

Features

  • Import and export CSV and JSON data and text files.
  • Also work with arbitrary JavaScript data.
  • Many options for working with your data:
    • Filtering
    • Transformation
    • Extracting subsets
    • Grouping, aggregation and summarization
    • Sorting
    • And much more
  • Great for slicing and dicing tabular data:
    • Add, remove, transform and generate named columns (series) of data.
  • Great for working with time series data.
  • Your data is indexed so you have the ability to merge and aggregate.
  • Your data is immutable! Transformations and modifications produce a new dataset.
  • Build data pipeline that are evaluated lazily.
  • Inspired by Pandas and LINQ, so it might feel familiar!

Documentation

Resources

About

The bower package for data-forge-js.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published