dataframe-builder

Mechatronics, Software Engineering, Woodworking, and "Making" in General

This page is to document the efforts for the dataframe-builder open source project. I wanted to learn more about open sourcing JavaScript packages, so I created “dataframe-builder” (on npm: dataframe-builder – npm (npmjs.com)). Maybe an underlying API is not reliably available while implementing UIs? Or maybe components are being developed in a component library, decoupled from specific use-case logic?

The motivation behind dataframe-builder is to provider sample dataframes that can be used for development and testing purposes.

What does dataframe-builder do?

dataframe-builder receives a {columnTypes:[]} array of objects as an input. Given each column’s specification and another input, {numRows} a dataframe is returned.

const sampleColTypes = [ { name: “column1”, type: “string”, subType: “name” }, { name: “column2”, type: “number”, min: 0, max: 100, precision: 2 }, { name: “columnA”, type: “boolean” }, { name: “columnB”, type: “integer”, min: 0, max: 100 }, // New column for integers ];

This dataframe can then be used to test or build UIs (tables, charts, etc).

What data types are supported?

  • Numbers
    • Integers
    • floats
  • Strings
    • “name” module that can produce combinations of first and last names
    • “Lorem Ipsom” style text
  • Boolean
  • Datetime

Random vs Described data

There are two main modes:

  1. Random Independent Values: Each row’s value is created independent from other rows
  2. Described Series: characteristics of a curve or statistical set can be provided (linear, quadratic, histogram, etc)

The purpose of these different modes is to create various use cases specifically for data visualization.

Technical Overview

  • TypeScript
  • Playwright tests
  • eslint

Open Source

One of the core motivations for this project is to learn more about the open source community. While I’ve created this project as a sole contributor, it’d be great to get open source involvement for bug reporting/fixing, feature discussions