Coder Social home page Coder Social logo

cu-clear / schema-interface Goto Github PK

View Code? Open in Web Editor NEW

This project forked from piyush-k-mishra/schema-interface

3.0 3.0 5.0 2.85 MB

License: MIT License

Python 27.93% Shell 0.75% HTML 0.34% JavaScript 69.05% SCSS 1.61% PowerShell 0.18% CSS 0.15%

schema-interface's Introduction

schema-interface

Introduction

This is a web tool to visualize KAIROS Schema Format generated schemas using Cytoscape.js and React.js. The tool also allows editing of these schemas for curation purpose. Current supported SDF version is 3.0.

This project is currently a work in progress and is in alpha testing. Feedbacks and suggestions are welcome.

Getting Started

To run the project locally one needs to have following libraries installed:

  • npm 6.13.4 (or latest)
  • Python 3.7.3 (or latest)
  • pip 20.1.1 (or latest)

First run:

  • cd path/to/project/schema-interface
  • sh first_run.sh
  • If rendering fails: sh run_local.sh

Subsequent runs:

  • cd path/to/project/schema-interface
  • sh run_local.sh

Once the server has started, run the localhost with the port mentioned in the terminal in the browser. The tool will render.

Libraries

The tool mainly uses 3 resources:

  • Flask : A Python micro web framework used for writing the backend functionality of the tool. Schema extraction and edit handling has been done in Flask.
  • React.js: A frontend JavaScript library responible for rendering the UI. All the interactions between the visualization and the backend framwork is handled by React.
  • Cytoscape.js: A data visualization library that uses the extracted schema, provided by React from backend, to provide a graphical structure in a sequential order.
    • Edits on the JSON are handled using the jsoneditor[1] library or through the sidebar next to the canvas.

Usage

Manual

Viewer

  • Upload Schema to upload a JSON file from your local file system, and download it when you are done with curation.
  • Canvas shows a graphical representation of the uploaded JSON file. The canvas allows for zoom and node drag-and-drop. Nodes can be clicked to show subtrees of children nodes and participants.
    • Reloading the canvas is supported with a reload icon on the top right corner of the canvas.
    • Resizing the canvas according to the graph is supported with a fit icon under the reload icon.
  • A Sidebar is available on the left side of the canvas giving information about the selected node. This window opens only when a node is right-clicked. It gives the details about the node, such as its name, id, description, comments, explanation from TA1, importance, etc. All information is directly taken from the JSON. The sidebar details can be edited to bypass the JSON editor.
  • JSON Editor[1] showing the uploaded JSON. Editing the JSON will update the graph in the canvas. Functionalities include:
    • Expand and Collapse All lists and dictionaries of the JSON.
    • Sort contents
    • History for accidents.
    • Search Bar to locate events more easily.
    • Drag to move fields and their values between lists and dictionaries.
    • Templates of events, children, participants, etc. for easier curation.
    • Duplication
    • Deletion

[1] A web-based tool to view, edit, format, and validate JSON by Jos de Jong

schema-interface's People

Contributors

iris-liu0312 avatar reecesu avatar piyush-k-mishra avatar kevenwyld avatar mary-martin avatar cnedwards avatar kalfaka avatar dependabot[bot] avatar

Stargazers

 avatar Genglin Liu avatar Qi Zeng avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.