linkeddatacenter / LODMAP2D

Data exploration done right.
Other
0 stars 0 forks source link

ldc

LODMAP2D

LODMAP2D is a data driven web application to explore detailed information without loosing the big picture see overview.

LODMAP2D uses the SOLID specifications and the Semantic Web standards to ensure an high level of security and privacy. Data can be centralized in a Knowledge Graph or distributed as Linked Data. LODMAP2D can be easily customized to match a specific data domain. See for an example the Italian Budget produced by the g0v.it team.

ldc

Quick start with Docker

The platform is shipped with a Docker setup that makes it easy to get a containerized environment up and running. If you do not already have Docker on your computer, it's the right time to install it.

To run build & run LODMAP2D container:

docker run -d --name lodmap2d -p 8080:80 linkeddatacenter/lodmap2d

Try it pointing your browser to http://localhost:8080

Free docker resources with:

docker rm -f lodmap2d

Connecting to a custom data source

LODMAP2D renders any linked data resource exposing a Bubble Graph Ontology.

By default, LODMAP2D loads the data.ttl file from the public directory. You can connect to any other web data source assigning the environment variable LODMAP2D_DATA to its URL:

docker run -d -e LODMAP2D_DATA=http://localhost:8080/data.ttl  --name lodmap2d -p 8080:80 linkeddatacenter/lodmap2d

or even using a LODMAP2D-api compatible endpoint:

docker run -d -e LODMAP2D_DATA="https://data.budget.g0v.it/ldp/"  --name lodmap2d -p 8080:80 linkeddatacenter/lodmap2d

If the http(s) resource pointed by the LODMAP2D_DATA variable ends with a /, it is supposed to be a LODMAP2D-api compatible endpoint; else it is supposed to be a plain RDF resource (see Customization section for more options)

WARNING: if you connect LODMAP2D to a cross-origin data source, CORS restrictions applies (see the security section above)

Using LODMAP2D

LODMAP2D functions are available from any recent browser by some routes managed directly by the application (i.e. without accessing the network), and in particular:

route template expected behavior
/ redirects to /partition/overview
/partition/overview{?s} renders a bgo:Overview subject
/table{?s} renders a bgo:TableView subject
/credits renders a bgo:CreditsView subject
/terms renders a bgo:TermsView subject
/account/{account_id} renders a bgo:ProfiledAccount subject
/partition/{partition_id}{?s} renders any bgo:Partition subject

The optional parameter s allows filtering the displayed objects whose title, description or id contains, even partially, match the parameter value.

Project Overview

From a conceptual point of view, LODMAP2D is an implementation of a Bubble Graph Ontology(BGO) reasoner.

LODMAP2D implements following additional axioms:

LODMAP2D reasoner is tolerant towards cardinality errors: i.e. provides default for missing informations and ignores unexpected multiplicity.

From a technical point of view, LODMAP2D is a single page web application (SPA) developed with the Vue framework according to the SOLID specifications and based on the Data Driven Document (d3) library.

The data model adopts the Resource Description Framework (RDF) and the Semantic Web standards. LODMAP2D recognizes the Bubble Graph Ontology.

The data can be fully distributed. They are fetched by dereferencing the application routes through the rewriting rules managed by the the src/models/bgolib.js library, that is based on rdflib.js by Timm Berners Lee & LinkedData friends.

Build and run with node

Be sure to have node v 12.8+ installed, open a console and type:

npm install
npm run serve

The application will be ready on port 8080

Security

LODMAP2D is very respectful of users' privacy; it does not use tracking codes and does not use any cookies.

TODO: LODMAP2D supports self signed certificates and authenticate users with WebID protocol according SOLID specs.

Login is required only to access private data. Unlogged users can always access public data.

About CORS:

LODMAP2D (through rdflib.js) uses a very stringent security pattern to access cross origin data resources. Be sure that your data provider is configured to:

Any SOLID POD matches these requirements.

Customization

Customize app title, description and add tracking snippets

Besides LODMAP2D_DATA, the Docker loadmap2d image manages some other environment variables for SEO:

By default, no tracking code is enabled.

limitations:

Resource customization

You can override the following files in the public directory :

config.js file format:

The config.js file contains the rules that oversee the dereferencing of routes and it is inspired by Apache mod_rewrite:

the window.__dereferencingRules global array allows to map routes onto a set of web resources in any way you like.

A rewrite rule is composed of three attributes:

The directory docs/config-examples contains some example of config.js files

Using docker to customize LOADMAP2D

Using docker greatly simplify customization activities:

docker build -t mylodmap2d .
docker run -d -p 8080:80 mylodmap2d

For an example of LOADMAP2D customisation see the web-budget project by G0V italian team

Thanks

License

Please see License File for more information.