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

@kit-data-manager/visualization-component

v0.0.8

Published

The visualization-component is a dynamic, interactive graph component built using D3.js. It is designed to render graphs based on provided JSON data, making it ideal for visualizing complex relationships and networks in an intuitive manner.

Downloads

10

Readme

Visualization Component

The visualization-component is a dynamic, interactive graph component built using D3.js library. It is designed to render graphs based on provided JSON data, making it ideal for visualizing complex relationships and networks in an intuitive manner. The component supports various interactive features like hover effects, node dragging, and click events to reveal connections between entities. There are features that allows users to customize color, description, label dynamically. This makes it an excellent tool for exploring and understanding intricate data relationships.

Data Format and Connection Representation

The visualization-component requires data in a specific JSON format to accurately represent and visualize relationships between entities. Here's an overview of the data format and how connections are established:

JSON Data Structure

The component accepts an array of objects, where each object represents an entity with a unique identifier and a set of properties. The structure is as follows:

[
  {
    "id": "Unique Identifier",
    "properties": {
      "propertyName": "propertyValue",

    }
  },
]

Key Elements

  • id: This unique identifier is crucial for linking entities.

  • properties: A collection of key-value pairs representing various attributes of the entity. Certain properties can be used to establish connections to other entities.

Example : Research Paper and Dataset

Consider a scenario where you have two entities: a research paper and a dataset. The research paper references the dataset. Below is an example of how these entities and their relationship can be represented in JSON format for the visualization-component.

Entities

-Research Paper: An academic paper that cites a specific dataset.

-Dataset: The dataset that is cited by the research paper.

JSON Data Representation

[
  {
    "id": "paper-12345",
    "properties": {
      "title": "Analysis of Data Patterns",
      "author": "Dr. Jane Smith",
      "citesDataset": "dataset-98765",
      "publishedDate": "2021-06-15",
      "topic": "Data Science"
    }
  },
  {
    "id": "dataset-98765",
    "properties": {
      "title": "Global Data Set on Patterns",
      "creator": "Data Institute",
      "relatedPaper": "paper-12345",
      "releaseDate": "2021-01-10",
      "subject": "Data Patterns"
    }
  }
]

Understanding the Relationships

In this example,

  • The research paper (with id "paper-12345") cites the dataset (with id "dataset-98765").
  • The property citesDataset in the paper's properties links to the id of the dataset, establishing a connection.
  • Conversely, the dataset includes a relatedPaper property that references back to the paper's id. We call it primary link.
  • When visualized, these properties can create a one-way/two-way link between the paper and the dataset, illustrating their relationship

Customization Options

Users can easily customize the web component by setting various properties:

  • data: Input your JSON data for graph visualization.
  • size: Adjust the size of the graph (default is '1350px,650px').
  • showAttributes: Choose to show or hide attributes(in above case properties any entity) in the graph. Defaults to true.
  • showPrimaryLinks: Choose to show primary links(relation between two entities). If true it will show all the links between primary nodes. Defaults to true.
  • excludeProperties: Specify any properties to exclude from the visualization.
  • showDetailsOnHover: Enable or disable hover effects on graph nodes.
  • showLegend: Allow user to chose to see legend.
  • configurations: Allow user to customize properties dynamically. eg: color, label, description etc

These properties allow for flexible configuration, catering to different data sets and visualization requirements, making the Visualization Component a versatile tool for data analysis and presentation.

Currently, in its [development/beta/stable] phase, is an evolving project, open to contributions and feedback from the community. Dive into the world of seamless data visualization with

How to run - For developers

To start using the component clone this repo to a new directory:

git clone https://github.com/kit-data-manager/visualization-graph-web-component.git

and run:(Before running below command make sure node.js is installed in your system. You can check if it is there is your system or not by command: node -v or node --version (dependending on the operating system you are using) in your command prompt.

npm install

To run storybook in dev mode

npm run build
npm run storybook

Attention: Do NOT run npm run start. It will cause the storybook to not work properly. If you did run npm run start, delete the following folders and run npm install again:

  • node_modules
  • www
  • dist
  • loader
  • .stencil

How to release.

Step 1: Increase the version in package.json file

Step 2: Run below command to update version in other files(package-lock.json)

npm install

Step 3: Draft a new release