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

sgvizler2

v1.7.3

Published

Sgvizler2 is a javascript wrapper for easy visualisation of SPARQL result sets (and a jQuery plugin).

Downloads

110

Readme

Tests NPM version Standard Version

sgvizler2

Sgvizler2 is a javascript wrapper for easy visualisation of SPARQL result sets (and a jQuery plugin). See the demo (in the menu "tutorial", there are examples) and the typedoc.

This project is the reboot in Typescript of project Sgvizler of Martin G. Skjæveland.

Add visualisations directly into your webpages like this:

<div id="result"
     data-sgvizler-endpoint="https://query.wikidata.org/sparql"
     data-sgvizler-chart="bordercloud.visualization.DataTable"
     data-sgvizler-query="
     PREFIX rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt;
     SELECT  *
     WHERE {
             ?object ?property ?valueOrObject .
     }
     LIMIT 4
     "
     ></div>
 <script src="sgvizler2/sgvizler2.js"></script>
 <!--script src="node_modules/sgvizler2/build/browser/sgvizler2.js"></script-->
 <script>
    //Draw a chart
    //sgvizler2.containerDraw('result');
    //or
    //$("#result").containerchart();

    //Draw all Chart
    sgvizler2.containerDrawAll();
 </script>

Generate your chart with our SPARQL editor and to read their docs.

It is possible to execute a function when the graph is finished or failed.

sgvizler2.containerDraw('result',options)
    .done(
        function() {
            console.log("Success!");
        }
    )
    .fail(
        function() {
            console.log("There is a problem");
        }
    );

Download directly Sgvizler2

Download the last version

The path of Sgvizler2 will be :

<script src="sgvizler2/sgvizler2.js"></script>

Dependencies:

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" ></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>

Other dependencies, if you use the select control:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css">
<link rel="stylesheet" href="sgvizler2//lib/bootstrap-select/css/bootstrap-select.min.css">
<script src="sgvizler2/lib/bootstrap-select/js/bootstrap-select.min.js"></script>
<script src="sgvizler2/lib/bootstrap-select/js/i18n/defaults-fr_FR.min.js"></script>
<script src="sgvizler2/lib/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>

Install the package via yarn or npm

With yarn or npm

yarn add sgvizler2
# or
npm install sgvizler2

The path of Sgvizler2 will be :

 <script src="node_modules/sgvizler2/build/browser/sgvizler2.js"></script>

Get started

You can use the SPARQL editor to generate an example with your SPARQL query and see examples for each charts, maps and tables in this project.

Why reboot the project ?

The project could not be easily extensible and the docs was not automatically generate in the packages for composer, yarn, npm, etc. The project can exist without Google and new libs of charts exist. For example with D3JS,...

And why with Typescript ? The project is now too complex and there are hard problems to debug with several charts of Google. I search solutions... but finally, I have to reboot with the start project typescript. It's possible to generate a compatible lib in Javascript with unit test and coverage of code. So... There are only a problem with JSDoc that not support several token of Typescript. I try TypeDoc but it do not generate tutorials like JSDoc :( The JSDoc of project generates only tutorials for the moment.

If you want to participate at this project, read this doc.