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

beyond-the-bell

v0.1.0

Published

Access data from the Beyond the Bell dataset

Downloads

5

Readme

Beyond The Bell

This library allows read access to all of the Organizations, Locations, Services, and Categories collected and maintanied by Beyond the Bell.

Install

npm install --save beyond-the-bell

Usage

var BtB = require("beyond-the-bell");

// List all Organizations
BtB.Organizations.all().then(function(orgs) {
  orgs.forEach(function(org) {
    console.log(org.get("Name"));
  })
})

// List all Locations
BtB.Locations.all().then(function(locations) {
  locations.forEach(function(location) {
    console.log(location.get("Name"), location.get("Address"));
  })
})

// Search for a location
BtB.Locations.search("Library").then(function(results) {
  results.forEach(function(result) {
    console.log(result.location.get("Name"));
    console.log(result.relevance);
  })
})

Models

Organization

Fields

  • Name
  • Mission Statement
  • Description
  • Address
  • Phone Number
  • Website
  • Photo - An array of all photos provided by the Organization
  • Locations - An array of ids pointing to valid Location objects
  • Logo - An array of provided logos
  • Organization nicknames - Other names the organization goes by
  • Categories

Methods

  • get(id) - returns a promise which resolves to the organization with the provided string id, or null if there is no organization with that id.
  • all() - returns a promise which resolves to an array of all of the organizations.
  • search(query) - returns a promise which resolves to an array of results of the form {organization: OrganizationModel, relevance: float} where relevance is a decimal between 0 and 1 with 1 being the most relevant possible.
  • refresh() - forces a reload of all of the organizations, since the library caches the list aggressively.

Locations

Fields

  • Name
  • Organization - An array of the organizations this location is associated with (realistically should be a single item)
  • Address
  • Phone Number
  • Primary Contact Name
  • Primary Contact Email Address
  • Operating Hours
  • Service 1 Name
  • Service 1 Description
  • Service 1 Fee
  • Service 1 Registration - An array of strings representing the types of registration. Either "Drop in" or "Advance registration required"
  • Service 1 Grade Levels Served - An array of strings showing the different age groups served.
  • Service 1 Categories
  • Service 2 Name
  • Service 2 Description
  • Service 2 Fee
  • Service 2 Registration
  • Service 2 Grade Levels Served
  • Service 2 Categories
  • Service 3 Name
  • Service 3 Description
  • Service 3 Fee
  • Service 3 Registration
  • Service 3 Grade Levels Served
  • Service 3 Categories
  • Other Services
  • Latitude
  • Longitude

Methods

  • get(id) - returns a promise which resolves to the location with the provided string id, or null if there is no location with that id.
  • all() - returns a promise which resolves to an array of all of the locations.
  • search(query) - returns a promise which resolves to an array of results of the form {location: LocationModel, relevance: float} where relevance is a decimal between 0 and 1 with 1 being the most relevant possible.
  • refresh() - forces a reload of all of the locations, since the library caches the list aggressively.

Categories

Fields

  • Name
  • Display Name

Methods

  • all() - returns a promise which resolves to an array of all of the categories.