Sample data files organized as Marc Pierson expects communities to build graphical models of their concerns.
...
CLICK SOURCE assets CODE marc SOLO
This code finds Marc's custom drawings in the assets he provided. A more descriptive aspect folder naming would offer flexibility in the future.
export async function marc () { let assets = this.assets[0].result[""] let site = Object.keys(assets)[0] let files = assets[site] let drawings = await Promise.all(files.map(file => fetch(`${site}/${file}`).then(res => res.json()))) this.json = {site,files,drawings} let source = this.context.page.title let result = drawings.map(aspect) this.aspect = [{source,result}] let n = result.reduce((s,e) => s+e.graph.size(), 0) return `${files.length} files, ${n} nodes+edges` }
This code converts Marc's drawings into aspects (a name and graph) in the format expected by Mech's SOLO. This appears more a schema for future data than real data that would show the breadth of application.
import {Graph} from 'https://wardcunningham.github.io/graph/graph.js' function aspect (drawing) { let name = drawing.modelName let graph = new Graph() let nid = id => graph.nodes.findIndex(node => node.props.id == id) drawing.nodes.forEach(node => { graph.addNode(node.label || 'Node', {id: node.id, name: node.props.name || node.props.type}) }) drawing.edges.forEach(edge => { graph.addRel('',nid(edge.src),nid(edge.tgt),{}) }) return {name, graph} }