@eo4geo/find-in-bok-dataviz

2.2.12 • Public • Published

EO4GEO-bok-dataviz-v2

EO4GEO-bok-dataviz-v2 is an script to parse a json-ld file and visualize it in a circle packing d3 layout.

Installation

Using npm:

npm i @eo4geo/find-in-bok-dataviz

Usage

Place a div and give it an id. If you want to show also the textual information, place a div and give it an id.

<div id="bubbles"> </div>
<div id="textInfo"></div>

In Javascript call the function visualizeBOKData(svgId, url, textId, numVersion, oldVersion, textToAlert, yearCurrentVersion, yearVersion)

  • svgID : is the id you gave to the element in the HTML you want to display the graph
  • url : is the location BD
  • textID : is the id you gave to the div for the textual information
  • numVersion : the number of the current version from database
  • oldVersion : the number of an old version from database
  • textToAlert : 'orage' or 'red' for alert color
import * as bok from '@eo4geo/find-in-bok-dataviz';
[...]

bok.visualizeBOKData('#bubbles', 'https://eo4geo-uji.firebaseio.com/', '#textInfo', 1, , 1, 'orage', '2019', '2016') // will render the graphical view and the textual view from the version 1 in database

Other functions

import * as bok from '@eo4geo/find-in-bok-dataviz';
[...]

selectedNodes = bok.searchInBoK(searchText); // returns an array of concepts matching the searchText string

bok.browseToConcept(conceptShortName); // navigates to the concept specified

// Examples
selectedNodes = bok.searchInBoK('Analytics');
bok.browseToConcept('GIST'); // navigates to root concept
bok.browseToConcept('AM'); // navigates to Analytical Methods concept

Package Sidebar

Install

npm i @eo4geo/find-in-bok-dataviz

Weekly Downloads

1

Version

2.2.12

License

MIT

Unpacked Size

35.9 kB

Total Files

3

Last publish

Collaborators

  • cueto
  • amuriach
  • claumpp