Getting Started
Datastripes ships as one npm package, @datastripes/anomaly. The root entry is the framework-agnostic core; each UI framework gets its own subpath entry point inside the same package:
| Import path | Purpose |
|---|---|
@datastripes/anomaly | Anomaly detection engine, auto-discovery, licensing client, types. No UI framework dependency. |
@datastripes/anomaly/react | React components (DatastripesAnomaly and friends) + useAnomalyDetection hook. |
@datastripes/anomaly/vue | Vue 3 components (DatastripesAnomaly and friends) + useAnomalyDetection composable. |
@datastripes/anomaly/angular | Standalone Angular components (DatastripesAnomalyComponent and friends), built in Angular Package Format. |
@datastripes/anomaly/elements | A <datastripes-anomaly-studio> Custom Element (plus companion elements) for any stack. |
Every framework entry re-exports the core, so one import covers components, hooks, and types.
Install
bash
npm install @datastripes/anomalyReact, Vue, and Angular are optional peer dependencies: installing the package never pulls in a UI framework. Install the one your app uses (most apps already have it):
bash
npm install react react-dom # for @datastripes/anomaly/react
npm install vue # for @datastripes/anomaly/vue
npm install @angular/core @angular/common # for @datastripes/anomaly/angular
# @datastripes/anomaly/elements needs no frameworkMinimal example (core only)
ts
import { executeAnomalyDetection } from '@datastripes/anomaly';
const result = await executeAnomalyDetection({
data: [{ date: '2024-01-01', value: 120 }, /* ... */],
algorithm: 'ensemble'
});
console.log(result.points, result.metrics, result.licenseStatus);Six detection algorithms are available — zscore, rolling_zscore, iqr, mad, stl_residual, and ensemble (a majority vote across the other five). Your data doesn't have to be a time series either: for unordered (x, y) point clouds, see Scatter anomaly detection.
See the framework-specific installation pages in this guide, Chart options for line vs. bar rendering, and Licensing for how the trial/paid tiers work.