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

@steelbreeze/landscape

v3.9.0

Published

Landscape map viewpoint visualisation

Downloads

15

Readme

landscape

Maintainability

Landscape map visualisation of data.

landscape map viewpoint

This library produces visualisations of data that conform to the Archimate Landscape Map Viewpoint.

The tool takes as an input a cube of data generated by @steelbreeze/pivot along with the axes used to create it. It generates the layout, first creating duplicate rows or columns where there is more than one value in a cell and then merging adjacent cells on the x and/or y axes.

The final render operation is left to the user, using the tools and techniques of your choice. The returned data structure is a jagged array with values for cols and rows denoting how many column and rows the cell spans.

These visualisations are an invaluable communication tool offering insight into the health of a portfolio.

If you like @steelbreeze/landscape, please star it.

Installation

NPM

To install from npm:

npm install @steelbreeze/landscape

Web

For web via a CDN:

import * as pivot from 'https://cdn.skypack.dev/@steelbreeze/[email protected]?min';

Dependencies

@steelbreeze/landscape is dependant on @steelbreeze/pivot, also installable via npm or skypack. The @steelbreeze/landscape API requires cubes and dimensions generated by @steelbreeze/pivot.

Example

This simple example is taken from the steelbreeze.net homepage:

// create pre-defined dimensions
const axes = {
	x: ["Rates", "FX", "MM", "Credit", "Equities"].map(landscape.criteria("Product")),
	y: ["Market gateway", "Order execution", "Order management", "Confirmations"].map(landscape.criteria("Capability"))
};

// pivot the data using the product and capability dimensions as the x and y axes respectively
const cube = pivot.cube(data, axes.y, axes.x);

// create a table of data from the pivot cube
const table = landscape.table(cube, axes, key, true);

// merge cells on both axes where possible
landscape.merge(table, true, true);

// render the table in the target element
document.getElementById('tablan').replaceWith(render.table(table, 'tablan', 'landscape'));

...

// create text and style to be used when rendering the table
function key(record) {
	return { text: record.Name, style: record.Status };
}

Note that while the key function must comply with the Key interface, specifing values for text and style, other properties can be added and these will be available at the time of rendering. When merging adjacent cells, in the merge function, only text and style are compared.

Usage

The full API documentation can be found here.

License

MIT License

Copyright (c) 2022 David Mesquita-Morris.