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

aframe-babia-components

v1.2.9

Published

A data visualization set of components for A-Frame.

Downloads

434

Readme

Aframe-babia-components

Version License

Data visualization components for A-Frame.

example

For A-Frame.

Important: The repository is hosted on GitLab, if you are on GitHub, note that this is a mirror from the GitLab repository, if you want to open an issue, PR/MR or contribute to the project, please visit:

  • Repository: https://gitlab.com/babiaxr/aframe-babia-components
  • Release Notes: https://gitlab.com/babiaxr/aframe-babia-components/-/blob/master/docs/RELEASE_NOTES.md
  • Components webpage: https://babiaxr.gitlab.io/aframe-babia-components/
  • BabiaXR webpage: https://babiaxr.gitlab.io

Why

Babia components are a set of components for data visualization, there are components for visualize, query and filter data.

This pack of components has the aim of visualize data in several ways. There are separated components and each one has an independent aim:

  • babiaxr-* visualize the data prepared by a vismapper in several ways (this type of components must have in the same entity than a vismapper)
  • babiaxr-querier_* the aim of just query data and save it in the entity that it has
  • babiaxr-filterdata filter the data saved by one of the queriers
  • babiaxr-ui for dynamically changing the metrics that are visualized in one chart using a user interface.
  • And more!

For instance:

<a-entity babiaxr-3dbarchart='legend: true; x_axis: name; z_axis: age; height: size;
    data:"[{"key":"David","key2":"2019","size":9},{"key":"David","key2":"2018","size":8},{"key":"David","key2":"2017","size":7},{"key":"David","key2":"2016","size":6},{"key":"David","key2":"2015","size":5},{"key":"Pete","key2":"2011","size":8},{"key":"Pete","key2":"2014","size":7},{"key":"Josh","key2":"2016","size":6},{"key":"Josh","key2":"2015","size":5},{"key":"Jesus","key2":"2016","size":9},{"key":"Jesus","key2":"2011","size":8},{"key":"Jesus","key2":"2014","size":7},{"key":"Jesus","key2":"2016","size":6},{"key":"Jesus","key2":"2015","size":5},{"key":"Jesus","key2":"2016","size":9},{"key":"Steve","key2":"2016","size":9},{"key":"Steve","key2":"2017","size":8},{"key":"Steve","key2":"2014","size":7},{"key":"Steve","key2":"2013","size":6},{"key":"Moreno","key2":"2015","size":5},{"key":"Jesus","key2":"2019","size":10},{"key":"Pete","key2":"2019","size":10}]"' 
position="-10 0 0" rotation="0 0 0"></a-entity>

For using the querier/filters/mappers components (see HOW_TO_CHARTS_WITH_QUERIER.md)

<a-entity id="queriertest" babiaxr-querier_json="url: ./data.json;"></a-entity>
<a-entity babiaxr-3dbarchart='from: queriertest; x_axis: name; z_axis: age; height: size; legend: true' position="-10 0 0" rotation="0 0 0"></a-entity>

Usage

Browser Installation

Install and use by directly including the browser files:

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>A-Frame Babia components</title>
    <script src="https://aframe.io/releases/1.0.1/aframe.min.js"></script>
    <script src="https://unpkg.com/aframe-babia-components/dist/aframe-babia-components.min.js"></script>
</head>

<body>

    <a-scene background="color: #A8F3FF" id="AframeScene">
        
        <a-entity babiaxr-3dbarchart='legend: true; 
            data:"[{"key":"David","key2":"2019","size":9},{"key":"David","key2":"2018","size":8},{"key":"David","key2":"2017","size":7},{"key":"David","key2":"2016","size":6},{"key":"David","key2":"2015","size":5},{"key":"Pete","key2":"2011","size":8},{"key":"Pete","key2":"2014","size":7},{"key":"Josh","key2":"2016","size":6},{"key":"Josh","key2":"2015","size":5},{"key":"Jesus","key2":"2016","size":9},{"key":"Jesus","key2":"2011","size":8},{"key":"Jesus","key2":"2014","size":7},{"key":"Jesus","key2":"2016","size":6},{"key":"Jesus","key2":"2015","size":5},{"key":"Jesus","key2":"2016","size":9},{"key":"Steve","key2":"2016","size":9},{"key":"Steve","key2":"2017","size":8},{"key":"Steve","key2":"2014","size":7},{"key":"Steve","key2":"2013","size":6},{"key":"Moreno","key2":"2015","size":5},{"key":"Jesus","key2":"2019","size":10},{"key":"Pete","key2":"2019","size":10}]"' 
        position="-10 0 0" rotation="0 0 0"></a-entity>

        <a-entity id="queriertest" babiaxr-querier_json="url: ./data.json;"></a-entity>
        <a-entity babiaxr-3dbarchart='from: queriertest; x_axis: name; z_axis: age; height: size; radius: size; legend: true' position="-10 0 0" rotation="0 0 0"></a-entity>

        <a-entity camera position="0 0 0" look-controls></a-entity>
        
    </a-scene>
</body>

NPM Installation

Install via NPM:

npm i aframe-babia-components

Then require and use.

require('aframe');
require('aframe-babia-components');

// or

import 'aframe'
import 'aframe-babia-components'

How to use this components

The first step is to follow the Getting started guide, you can find it here.

Once finished, you can follow the other tutorials on the main page!

Building and Running BabiaXR, and/or Contributing Code

You might want to build BabiaXR locally to contribute some code, test out the latest features, or try out an open PR:

Querier components API

Queriers are the components that query data from different data sources.

Go here to see the queriers API.

Data management components API

Data management components includes components for filtering data, transform data into a tree formar and others.

Go here to see the queriers API.

Charts components API

Charts included:

  • Pie
  • Doughnut
  • 2D/3D bars
  • 2D/3D cylinders
  • Bubbles
  • Terrain

Go here to see the charts API.

Cities and Boats components API

API for the city and boats visualizers components.

Go here to see the cities and boats API.

Other components API

Other components:

  • UI (for changing metrics dynamically)
  • lookat component ...

Go here to see the other components API.

Data model

The dataset returned from the parsing of the babia-query* components must follow this model:

[
    {
        "metric": value0,
        "metric2": value13,
        "key": value,
        ...
    },
    {
        "metric": value2,
        "metric2": value4
        "key": value1,
        ...

    },
    ...
]

Examples available at the "examples folder" and here