sparnatural
Sparnatural : visual knowledge graph explorer with SPARQL, in the browser, configurable with SHACL
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.2%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Sparnatural : visual knowledge graph explorer with SPARQL, in the browser, configurable with SHACL
Basic Info
- Host: GitHub
- Owner: sparna-git
- License: lgpl-3.0
- Language: TypeScript
- Default Branch: master
- Homepage: http://sparnatural.eu
- Size: 112 MB
Statistics
- Stars: 261
- Watchers: 10
- Forks: 48
- Open Issues: 99
- Releases: 0
Topics
Metadata Files
README.md
Sparnatural SPARQL query builder
Sparnatural is a visual client-side SPARQL query builder for exploring and navigating RDF Knowledge Graphs. It is written in Typescript.
It supports the creation of basic graph patterns with the selection of values with autocomplete search or dropdown lists, or other widgets. It can be configured through a SHACL configuration file that defines the classes and properties to be presented in the component.

You can play with online demos at http://sparnatural.eu#demos.
Getting Started
To get started :
- Read the following README;
- Have a look at the online DBPedia demo
- Read the documentation:
- follow the Hello sparnatural tutorial to setup your environment
- follow the SHACL configuration guide to understand how the configuration can be expressed in SHACL
- have a look at the technical integration documentation to understand how to integrate the webcomponent in your webpage
Features
Query Structure
Basic query pattern
Select the type of entity to search...

... then select the type of the related entity.

In this case there is only one possible type of relation that can connect the 2 entities, so it gets selected automatically. Then select a value for the related entity, in this case in a dropdown list :

Congratulations, your first SPARQL query criteria is complete !

Now you can fetch the generated SPARQL query :

"WHERE"
This enables to navigate the graph :

"AND"
Combine criterias :

"OR"
Select multiple values for a criteria :

(UNIONs are not supported)
Values selection
Sparnatural offers currently 9 ways of selecting a value for a criteria : - dropdown list widget - autocomplete search field - tree browsing widget - map selection widget - string search widget, searched as regex or as exact string - date range widget (year or date precision) - numeric values widget - boolean widget - no value selection (useful for 'intermediate' entities)
Dropdown list widget
screenshot :

screencast :

Autocomplete search widget
screenshot :

screencast :

Tree browsing widget
screenshot :

screencast :

Map selection widget
screenshot :

screencast :

String search widget (text search)
screenshot :

screencast :

Date range widget (year or date precision)
screenshot :

screencast :

Numeric values widget
screenshot :

screencast :

Boolean widget
screenshot :

No value selection
This is useful when a type a of entity is used only to navigate the graph, but without the ability to select an instance of these entities.
screenshot :

screencast :

Multilingual
Sparnatural is multilingual and supports displaying labels of classes and properties in multiple languages.
Support for OPTIONAL and FILTER NOT EXISTS
Sparnatural supports the OPTIONAL and FILTER NOT EXISTS {} keywords applied to a whole "branch" of the query.
See here how to search for French Museums and the name of Italian painters they display, if any :

Support for SERVICE keyword
There is currently an experimental support for the SERVICE keyword for federated querying.
Support for Aggregation queries
Since version 9.0.0, Sparnatural supports COUNT queries and other aggregation functions.
Querying multiple endpoints
Sparnatural can also act as a frontend for multiple SPARQL endpoints
Limitations
No UNION or BIND
Sparnatural does not support the creation of UNION, BIND
SPARQL endpoint needs to be CORS-enabled
To send SPARQL queries to a service that is not hosted on the same domain name as the web page in which Sparnatural is included, the SPARQL endpoint needs to allow Cross-Origin Resource Sharing (CORS). But we have a SPARQL proxy for those who are not, don't worry ;-)
Integration in a webpage
- Look at the hello-sparnatural folder that demonstrates a simple integration
- Read the javascript integration documentation.
- Look at a typical demo page on DBPedia
Configuration
Specification of entities and properties
Sparnatural is configured with a SHACL specification. Look at the supported SHACL features in the documentation. If you already have a SHACL spec, you can try passing it directly to Sparnatural and see the result ofr yourself - it should work :-). It is possible to pass multiple configuration files, so another config file can contain sparnatural annotations over an standard SHACL spec.
Configuration documentation
The documentation portal includes an extensive How-to documentation on how to configure Sparnatural in SHACL using an Excel file.
SHACL config example
To give you an idea, here is an annotated SHACL-based configuration snippet below. You don't need to write that file manually, but instead you will use the Excel template and follow The SHACL configuration guide.
```turtle https://data.mydomain.com/ontologies/sparnatural-config a owl:Ontology .
This is an entity declaration in Sparnatural
this:Artwork a sh:NodeShape; # order of display in the list sh:order "1"^^xsd:integer; # icon code volipi:iconName "fa-solid fa-paint-brush"; # corresponding target class in the underlying knowledge graph sh:targetClass dbpedia:Artwork; sh:nodeKind sh:IRI; # label and tooltips to be displayed in the UI rdfs:label "Artwork"@en, "Oeuvre"@fr; sh:description "A piece of art that can be displayed in a museum"@en, "Une Œuvre qui peut être exposée dans un musée"@fr; # link to the properties that apply on this entity sh:property this:Artworklabel, this:Artworkauthor, this:ArtworkcreationYear, this:ArtworkdisplayedAt, this:Artwork_thumbnail .
a property in the config applying to Artwork
this:Artwork_label # the corresponding predicate in the underlying knowledge graph sh:path rdfs:label; # label displayed in the UI sh:name "label"@en, "libellé"@fr; # cardinality sh:minCount "1"^^xsd:integer; sh:nodeKind sh:Literal; sh:datatype rdf:langString; # This is a reference to the target Entity that will be used as a range in the UI sh:node this:Text; # the widget to use for users to enter their search criteria dash:searchWidget core:SearchProperty; # indicates this is the main label property for Artworks dash:propertyRole dash:LabelRole; # indicates that no optional or negative options should be proposed for this property in the UI core:enableOptional "false"^^xsd:boolean; core:enableNegation "false"^^xsd:boolean .
this:Artworkauthor sh:path dbpedia:author; sh:name "author"@en, "auteur"@fr; sh:description "the artist, painter or sculptor who created the artwork"@en, "l'artiste, le peintre ou le sculpteur qui a créé l'œuvre"@fr; sh:nodeKind sh:IRI; # authors apply to Artworks and have Persons as values sh:class dbpedia:Person; # the Persons can be searched with an autocomplete search field dash:searchWidget core:AutocompleteProperty; # the autocomplete search field will use a SPARQL query using Virtuoso bif:contains searching on the rdfs:label proerty datasources:datasource datasources:searchrdfslabel_bifcontains; core:enableOptional "true"^^xsd:boolean; core:enableNegation "true"^^xsd:boolean .
this:Artwork_creationYear sh:path dbpedia:creationYear; sh:name "creationYear"@en, "année de création"@fr; sh:nodeKind sh:Literal; sh:datatype xsd:gYear; sh:node this:Date; # this will use a calendar selection widget dash:searchWidget core:TimeProperty-Year; core:enableOptional "true"^^xsd:boolean; core:enableNegation "true"^^xsd:boolean .
this:ArtworkdisplayedAt # This is special : the property "displayedAt" in the config is actually translated to dbpedia:museum|^dbpedia:displays # This illustrates how what is displayed to the user is different than the underlying knowledge graph sh:path [ sh:alternativePath (dbpedia:museum [sh:inversePath dbpedia:displays])]; sh:name "displayed at"@en, "exposée à"@fr; sh:nodeKind sh:IRI; sh:class dbpedia:Museum; dash:searchWidget core:AutocompleteProperty; datasources:datasource datasources:searchrdfslabel_bifcontains; core:enableOptional "true"^^xsd:boolean; core:enableNegation "true"^^xsd:boolean .
this:Artwork_thumbnail sh:path dbpedia:thumbnail; sh:name "thumbnail"@en, "vignette"@fr; sh:nodeKind sh:IRI; sh:node this:Image; # This cannot be searched (only selected as a column in the result set) dash:searchWidget core:NonSelectableProperty; core:enableOptional "true"^^xsd:boolean; core:enableNegation "true"^^xsd:boolean . ```
Companion components
Sparnatural works in combination with other components:
| Component | Description | Documentation | |-----------|-------------|---------------| |Query results display plugins|Display the SPARQL query results in table, charts, cards, timeline, maps|documentation| |Query history|Tracks the history of queries so that they can be reloaded easily|documentation| |Query form|A simple facet-like search component based on a Sparnatural configuration and a predefined query|documentation|
Owner
- Name: Sparna
- Login: sparna-git
- Kind: organization
- Location: Tours, France
- Website: http://sparna.fr
- Repositories: 64
- Profile: https://github.com/sparna-git
CodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"codeRepository": "git+https://github.com/sparna-git/Sparnatural.git",
"dateCreated": "2018-01-01",
"downloadUrl": "https://github.com/sparna-git/Sparnatural/releases",
"issueTracker": "https://github.com/sparna-git/Sparnatural/issues",
"name": "Sparnatural",
"description": "Sparnatural is a visual client-side SPARQL query builder. It is written in Typescript.\n\nIt supports the creation of basic graph patterns with the selection of values with autocomplete search or dropdown lists, or other widgets. It can be configured through an OWL configuration file (that can be edited in Protg) that defines the classes and properties to be presented in the component.",
"applicationCategory": "Semantic web",
"keywords": [
"SPARQL",
"RDF",
"OWL"
],
"programmingLanguage": [
"Typescript"
],
"relatedLink": [
"https://sparnatural.eu",
"https://docs.sparnatural.eu"
],
"author": [
{
"@type": "Person",
"givenName": "Thomas",
"familyName": "Francart",
"email": "thomas.francart@sparna.fr",
"affiliation": {
"@type": "Organization",
"name": "Sparna"
}
}
],
"contributor": [
{
"@type": "Person",
"givenName": "Pascal",
"familyName": "Steiner"
}
]
}
GitHub Events
Total
- Create event: 11
- Release event: 6
- Issues event: 184
- Watch event: 38
- Delete event: 2
- Issue comment event: 172
- Push event: 170
- Pull request event: 2
- Fork event: 5
Last Year
- Create event: 11
- Release event: 6
- Issues event: 184
- Watch event: 38
- Delete event: 2
- Issue comment event: 172
- Push event: 170
- Pull request event: 2
- Fork event: 5
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Thomas Francart | t****t@s****r | 1,099 |
| SteinerPascal | s****l@o****m | 420 |
| antoine37120 | a****e@g****m | 417 |
| FRANCART Thomas | t****t@e****u | 60 |
| BouzelatTarek | 1****k | 30 |
| Marie Muller | m****r@s****r | 10 |
| AQUINO SANCHEZ Jorge | j****z@e****u | 8 |
| Jorge AQUINO | j****q@g****m | 6 |
| Stéphane Gully | g****y@a****r | 4 |
| dependabot[bot] | 4****] | 3 |
| Elodie Thiéblin | e****n@l****r | 3 |
| Bart van Leeuwen | b****t@n****l | 1 |
| Bruno P. Kinoshita | k****w | 1 |
| Daniel Motz | h****o@d****e | 1 |
| Etienne Posthumus | e****s@g****m | 1 |
| bouviermullerp | 3****p | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 362
- Total pull requests: 11
- Average time to close issues: 4 months
- Average time to close pull requests: about 1 month
- Total issue authors: 28
- Total pull request authors: 4
- Average comments per issue: 1.54
- Average comments per pull request: 0.45
- Merged pull requests: 9
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 125
- Pull requests: 1
- Average time to close issues: 24 days
- Average time to close pull requests: less than a minute
- Issue authors: 10
- Pull request authors: 1
- Average comments per issue: 1.32
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- tfrancart (248)
- ch-sander (38)
- SteinerPascal (9)
- Marie-Sparna (8)
- lubianat (8)
- ethieblin (6)
- MrSpitfire06 (5)
- CFGrote (4)
- prashydee (4)
- PyHahiro (4)
- elasticjava (2)
- hashemirafsan (2)
- VladimirAlexiev (2)
- yahyafurkann (2)
- marimeireles (2)
Pull Request Authors
- SteinerPascal (6)
- ethieblin (2)
- tfrancart (2)
- epoz (1)
- HerrMotz (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- npm 755 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 24
- Total maintainers: 1
npmjs.org: sparnatural
Visual client-side SPARQL query builder and knowledge graph exploration tool
- Homepage: https://sparnatural.eu/
- License: GNU LGPL-3.0
-
Latest release: 11.1.2
published 6 months ago
Rankings
Maintainers (1)
Dependencies
- @babel/core ^7.5.5 development
- @babel/preset-env ^7.5.5 development
- @babel/preset-react ^7.0.0 development
- @types/jquery ^3.5.14 development
- @types/leaflet ^1.7.10 development
- @types/leaflet-draw ^1.0.5 development
- @types/n3 ^1.10.4 development
- @types/rdfjs__dataset ^2.0.0 development
- @types/select2 ^4.0.55 development
- @types/sortablejs ^1.13.0 development
- @types/sparqljs ^3.1.3 development
- @types/streamify-string ^1.0.0 development
- @webpack-cli/serve ^1.6.1 development
- babel-loader ^8.0.6 development
- babel-polyfill ^6.26.0 development
- buffer ^6.0.3 development
- copy-webpack-plugin ^11.0.0 development
- css-loader ^3.1.0 development
- file-loader ^6.2.0 development
- html-webpack-plugin ^5.5.0 development
- mini-css-extract-plugin ^2.6.0 development
- prettier ^2.6.2 development
- querystring-es3 ^0.2.1 development
- sass ^1.49.8 development
- sass-loader ^13.0.0 development
- stream-browserify ^3.0.0 development
- ts-loader ^9.3.0 development
- typescript ^4.6.3 development
- url ^0.11.0 development
- url-loader ^4.1.1 development
- util ^0.12.4 development
- webpack ^5.72.1 development
- webpack-bundle-analyzer ^4.5.0 development
- webpack-bundle-size-analyzer ^3.1.0 development
- webpack-cli ^4.9.2 development
- webpack-dashboard ^3.3.7 development
- webpack-dev-server ^4.9.1 development
- write-file-webpack-plugin ^4.5.1 development
- @chenfengyuan/datepicker ^1.0.10
- @geoman-io/leaflet-geoman-free ^2.13.0
- @rdfjs/data-model ^1.1.2
- bootstrap ^5.1.3
- easy-autocomplete ^1.3.5
- jquery ^3.6.0
- jquery-nice-select ^1.1.0
- jstree ^3.3.12
- leaflet ^1.8.0
- n3 ^1.3.5
- rdf-parse ^2.1.0
- rdf-store-stream ^1.3.0
- select2 ^4.0.13
- sortablejs ^1.14.0
- sparqljs ^3.6.2
- streamify-string ^1.0.1
- tippy.js ^6.3.5
- sdruskat/swh-save-action v1.0.1 composite