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

@zazuko/spex

v0.2.1

Published

SPEX is a tool designed to introspect data within SPARQL endpoints, leveraging the self-describing nature of RDF-based data to help users better understand its schema.

Downloads

324

Readme

SPEX - SPARQL Endpoint Explorer

SPEX is a tool designed to introspect data within SPARQL endpoints, leveraging the self-describing nature of RDF-based data to help users better understand its schema.

With the schema information available, you can use SPEX to browse instances of the data and follow links to other data points.

While SPEX is great for exploring and introspecting previously unknown datasets, it's not a generic graph-browser. Its primary goal is to provide insights into the schema and demonstrate basic data relationships. For more advanced graph exploration, consider using tools like Graph Explorer.

Usage

Try a live instance of SPEX to get started.

SPEX uses SPARQL to determine the available data. To begin, provide a SPARQL endpoint. Once configured, SPEX can introspect data from the default graph or a specific named graph. Use the named-graphs dropdown to narrow the scope if needed.

SPEX executes generic SPARQL queries to understand the data structure, grouping entities with the same class and querying distinct properties. It also examines property data types and their connections to other concepts.

SPEX screenshot

Depending on the dataset size, introspection can be resource-intensive. To mitigate this, SPEX checks for available SHACL shapes on the endpoint/graph and uses them if found, instead of running a SPARQL query.

You can download the auto-generated shape as a starting point if you want to provide shapes on the endpoint.

Limitations

Introspection and auto-generation of SHACL shapes might yield unexpected results in cases where:

  • more than one class is assigned to instances of data
  • multiple datasets have the same class but different properties

In such situations, providing pre-defined SHACL shapes is recommended. Inferring the correct structure automatically requires more effort than SPEX's generic queries.

The URL of the shape is a work in progress; see this issue for more information.

SPEX attempts to find an optimal layout for rendering tables, but there's always room for improvement. Use your browser's zoom controls if the layout doesn't fit the page.

Accessing an unencrypted (http) SPARQL endpoint

SPEX is a web application that runs in a browser window. This may cause issues if a SPARQL endpoint isn't available on https and SPEX is served on https only. Refer to Mixed Content restrictions for more information.

A common error in this scenario is TypeError: Network request failed when trying to access an http SPARQL endpoint. The only exception is your local machine, where you'll always be able to access an http-only SPARQL endpoint on localhost.

To fix this, either implement a SPARQL proxy or serve SPEX on an http resource.

SPEX as a local Application

SPEX can be installed as a so-called progressive web application (PWA). If you follow the guide at MDN, SPEX will be available on your desktop computer like any other application.

Extending SPEX

SPEX is developed by Zazuko and released as Open Source Software under the MIT license.

We use SPEX on a daily base to work with datasets. There are many ideas of what could and should be added to SPEX. Check out the GitHub issues to see what could be done next.

There are three ways to get new features implemented:

  1. Implement it on your own and submit a pull-request to this repository.
  2. Pay us for a specific feature. Get in contact with us by email to get a quote.
  3. Wait for 1 or 2 to happen.

Support

Zazuko provides commercial support for SPEX, get in contact with us for more information.

Development Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your unit tests

npm run test:unit

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.