# @jerrythomas/dataframe

> Dataframe supporting join, aggregation, sorting operations.

Latest version **1.0.0-next.1** (published 2024-03-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jerrythomas/dataframe
pnpm add @jerrythomas/dataframe
yarn add @jerrythomas/dataframe
bun add @jerrythomas/dataframe
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-next.1 |
| Published | 2024-03-08 |
| First published | 2024-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 377.8 KB |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jerry Thomas |
| Maintainers | jerrythomas |

## Links

- npm: https://www.npmjs.com/package/@jerrythomas/dataframe
- npm.io page: https://npm.io/package/@jerrythomas/dataframe

## Dependencies (5)

- [ramda](https://npm.io/package/ramda.md) ^0.29.1
- [svelte](https://npm.io/package/svelte.md) ^4.2.12
- [d3-array](https://npm.io/package/d3-array.md) ^3.2.4
- [@lukeed/uuid](https://npm.io/package/@lukeed/uuid.md) ^2.0.1
- [d3-collection](https://npm.io/package/d3-collection.md) ^1.0.7

## Recent versions

- 1.0.0-next.1 (latest) — 2024-03-08
- 1.0.0-next.8 (next) — 2024-04-08
- 1.0.0-next.7 — 2024-04-01
- 1.0.0-next.6 — 2024-03-21
- 1.0.0-next.5 — 2024-03-21
- 1.0.0-next.4 — 2024-03-19
- 1.0.0-next.3 — 2024-03-18
- 1.0.0-next.2 — 2024-03-14

## README

# Dataframe

The DataFrame UI Library is a JavaScript library that provides a set of tools for managing and manipulating data in user interfaces. It is framework agnostic and can be used with any ui framework.

- Use the `createView` function to make a data view that lets you change and watch the data.
- With this view, you can sort, filter, and group data, and keep an eye on which rows are selected or hidden.
- The original data stays unchanged, and the view offers different ways to show the data.
- Actions like select, edit, and delete can be linked to data rows with action columns in the view.
- Pick a primary key column to uniquely identify each row.
- The view helps you manage data with parent-child links, even when your data is in a flat array.
- Combine data from different views with join and merge features.
- Create connected data views with joins to map out how data relates, especially for tracking parent-child bonds.

## Example

Here's how to use the `createView` function from the DataFrame UI Library in a function-based approach:

```javascript
import { createView } from '@jerrythomas/dataframe'

// Sample data
const data = [
  { id: 1, name: 'Alice', age: 25 },
  { id: 2, name: 'Bob', age: 30 }
  // more data...
]

// Create a new view of the data
const view = createView(data)

// Sort the data by the 'name' field
view.sortBy('name')

// Filter data to only include top-level items
view.filter((row) => row.age > 25)
```

The `createView` function initializes a manageable data state with methods that allow for manipulation and observation of data changes, integrating smoothly with UI updates.

---
_Source: https://npm.io/package/@jerrythomas/dataframe · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
