npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bottlenose

v0.7.1

Published

🐬 RxJS offers a great toolkit for reactive functional programming. But if you use RxJS in a larger software application, you may often find yourself handcrafting your own functions to handle common workflows and wrap them in RxJS observables (like strea

Downloads

12

Readme

CircleCI CircleCI License: MIT

Description

🐬 RxJS offers a great toolkit for reactive functional programming. But if you use RxJS in a larger software application, you may often find yourself handcrafting your own functions to handle common workflows and wrap them in RxJS observables (like streaming file data or connecting to a WebSocket). Bottlenose is a collection of npm packages that provide industrial-strength RxJS operators and utilities for handling common data streams (filesystems, CSV, AWS S3, Websockets, socket.io), analyzing data (statistics, NLP) and implementing machine learning models (like SVM).

Features:

  • Embraces reactive functional programming. (All packages are built as wrappers on top of the RxJS.)
  • Built for software makers by software makers. (Use cases include startups, software enterprises, dev shops, full stack developers and other product creators.)
  • Industrial strength: packages are reliable, lightweight, secure and performant
  • Full stack: most modules are universal (browser, server, mobile, desktop)
  • Expressive, concise, readable and declarative syntax (built on RxJS pipeable operators).
  • Stream-based and real-time: Allows most data analysis tasks to be accomplished with stream-processing instead of memory-intensive batch processing.

You can use Bottlenose to...

  • Integrate data sources (as streams) into applications
  • Perform exploratory data analysis and data munging
  • Build data-intensive products and performant data pipelines
  • Write applications that are expressive, readable, easy to reason about and easy to test
  • Train machine learning models (static or in real-time applications)

Bottlenose is a young project started in late 2019 so it has a limited but fast-growing feature set. It is maintained by an opensource community. It is also actively used and improved by a healthcare AI startup called Buccaneer, which is adding new modules frequently as their team develops them for enterprise SaaS data pipelines.

Documentation & Guides

Documentation

Installation

Each Bottlenose module is namespaced under @bottlenose and installed separately. See the docs for a list of all currently available modules. For example, this would install Bottlenose's statistics module:

npm i --save @bottlenose/rxstats

Or

yarn add @bottlenose/rxstats

Basic Usage

For a full list of operators and modules, see the documentation.

Easily generate input streams

Bottlenose has modules for handling common data input sources like CSV, AWS S3, local file system and websockets. For example, this would parse CSV input:

import { from } from 'rxjs';
import { map  } from 'rxjs/operators';
import { parse } from '@bottlenose/rxcsv';

// Create a stream of raw CSV data
const csvString$ = from([
  'name,systolicBp,dialostilicBp,message\n', 
  'Blackbeard,140,91,Yarr\nCrunch,120,', 
  ',180,Arr\nSparrow,110,70,Savvy\n',
]);

// Stream the CSV data into an RxJS Subject
const row$ = csvString$.pipe(parse());
row$.subscribe();
// {name: "Blackbeard", systolicBp: 140, diastolicBp: 91, isAngry: true},
// {name: "Crunch", systolicBp: 120, diastolicBp: 80, isAngry: false},
// {name: "Sparrow", systolicBp: 110, diastolicBp: 70, isAngry: false},

Analyze data reactively

Bottlenose also has modules for common data analysis tasks (like descriptive statistics and NLP). For example, this would calculate the mean on the csv stream from the previous example:

import { map } from 'rxjs/operators';
import { mean } from '@bottlenose/rxstats';

// using the row$ csv from the prior example
const mean$ = row$.pipe(
  map(row => row.systolicBp), 
  mean() // calculate the mean on one of the columns
);
mean$.subscribe(console.log);
// 140
// 130
// 123.33333333333333

Train machine learning models reactively

Bottlenose is also adding modules for common machine learning algorithms (like SGD). For example, this would train an SGD classifier:

import {classifier} from '@bottlenose/rxsgd';

// train an SGD model on the example above
const sgd$ = row$.pipe(
  map(row => [[row.systolicBp, row.diastolicBp], row.isAngry]),
  classifier()
);
// train the classifier and emit it its new trained parameters each time 
// a new item is ingested
sgd$.subscribe();

Community

If you share the goal of creating amazing data science tools for the Javascript community, then here are some ways to help: