├── .github └── workflows │ └── run-tests.yml ├── .gitignore ├── CNAME ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── TESTING.md ├── docker-compose.yml ├── examples ├── car_graphs.json ├── empty_test.json ├── hyper-directed.json ├── hyper-undirected.json ├── les_miserables.json ├── test.network.json └── usual_suspects.json ├── json-graph-schema_v1.json ├── json-graph-schema_v2.json ├── package.json ├── requirements.txt └── test ├── __init__.py └── test-examples.py /.github/workflows/run-tests.yml: -------------------------------------------------------------------------------- 1 | name: Run tests 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | run-tests: 7 | name: Run tests 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - name: Checkout code 12 | uses: actions/checkout@v2 13 | 14 | - name: Setup Python 15 | uses: actions/setup-python@v2 16 | with: 17 | python-version: '3.9.0' 18 | 19 | - run: | 20 | pip install -r requirements.txt 21 | python -m unittest test.test-examples 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .bundle 2 | .gems 3 | Gemfile.lock 4 | venv/ 5 | __pycache__/ 6 | *.py[cod] 7 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | json-graph-format.info 2 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. When such action is taken, an explanatory statement should be added by the maintainer for both, the sake of informing the contributor about their wrongdoing and as an educational point for the community. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project Team Contacts: 40 | * william dot s dot hayes at gmail dot com 41 | * adifabio at biodati dot com 42 | * abargnesi at gmail dot com 43 | 44 | ## Attribution 45 | 46 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version] 47 | 48 | [homepage]: https://contributor-covenant.org 49 | [version]: https://contributor-covenant.org/version/1/4/ 50 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to json-graph-specification 2 | 3 | First off, thanks for taking the time to contribute! 4 | 5 | The following is a set of guidelines for contributing to json-graph-specification, which are hosted in the [JSON Graph Organization](https://github.com/jsongraph) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. 6 | 7 | #### Table Of Contents 8 | 9 | [Code of Conduct](#code-of-conduct) 10 | 11 | [I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question) 12 | 13 | [What should I know before I get started?](#what-should-i-know-before-i-get-started) 14 | 15 | [How Can I Contribute?](#how-can-i-contribute) 16 | * [Reporting Bugs](#reporting-bugs) 17 | * [Suggesting Enhancements](#suggesting-enhancements) 18 | * [Pull Requests](#pull-requests) 19 | 20 | ## Code of Conduct 21 | 22 | This project and everyone participating in it is governed by the [JSON Graph Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior. 23 | 24 | ## I don't want to read this whole thing I just have a question!!! 25 | 26 | Feel free to [open an issue](https://github.com/jsongraph/json-graph-specification/issues/new) at any time. 27 | 28 | ## What should I know before I get started? 29 | 30 | Before opening issues about topics that are already solved, please read the [readme file](https://github.com/jsongraph/json-graph-specification#readme) that is describing what this project is about and how it works. Also, have a look at the [project page](http://jsongraphformat.info/). 31 | 32 | ## How Can I Contribute? 33 | 34 | ### Reporting Bugs 35 | 36 | This section guides you through submitting a bug report. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports. 37 | 38 | Before creating bug reports, please check [the open issues](https://github.com/jsongraph/json-graph-specification/issues) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). 39 | 40 | > **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one. 41 | 42 | #### How Do I Submit A (Good) Bug Report? 43 | 44 | Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). If at all possible, please provide a [Short, Self Contained, Correct (Compilable), Example](http://sscce.org/). 45 | 46 | Explain the problem and include additional details to help maintainers reproduce the problem: 47 | 48 | * **Use a clear and descriptive title** for the issue to identify the problem. 49 | * **Describe the exact steps which reproduce the problem** in as many details as possible. When listing steps, **don't just say what you did, but explain how you did it**. 50 | * **Provide specific examples to demonstrate the steps**. 51 | 52 | Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines). 53 | * **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior. 54 | * **Explain which behavior you expected to see instead and why.** 55 | 56 | ### Suggesting Enhancements 57 | 58 | This section guides you through submitting an enhancement suggestion for json-graph-specification, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions. 59 | 60 | When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). 61 | 62 | #### How Do I Submit A (Good) Enhancement Suggestion? 63 | 64 | Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue and provide the following information: 65 | 66 | * **Use a clear and descriptive title** for the issue to identify the suggestion. 67 | * **Provide a step-by-step description of the suggested enhancement** in as many details as possible. 68 | * **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets which you use in those examples, as [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines). 69 | * **Describe the current behavior** and **explain which behavior you expected to see instead** and why. 70 | 71 | ### Pull Requests 72 | 73 | This is the main way how you can contribute to the specification. Feel free to open a pull request for your proposed changes at any time. It is advised to open a Github issue in the project first to get feedback from other users/maintainers before opening a pull request. You can then reference that issue in the Pull Request. 74 | 75 | The requirements described here have several goals: 76 | 77 | - Maintain the quality of json-graph-specification 78 | - Fix problems that are important to users 79 | - Engage the community in working toward the best possible json-graph-specification 80 | 81 | Please adhere to these requirements to have your contribution considered by the maintainers: 82 | 83 | 1. Write meaningful commit messages 84 | 2. Explain in your pull request what you are trying to achieve, and why 85 | 3. Be open minded about suggestions or other perspectives from the maintainers and other contributors 86 | 87 | While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted. 88 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014 Anthony Bargnesi, Anselmo DiFabio, William Hayes 2 | https://github.com/jsongraph/jsongraph.rb 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # json-graph-specification 2 | 3 | A proposal for representing graph structures in JSON. 4 | 5 | ![Run tests](https://github.com/jsongraph/json-graph-specification/workflows/Run%20tests/badge.svg?branch=master) 6 | 7 | ## Changes 8 | 9 | Jan 2020 - Updated to Version 2 by [Travis Giggy](https://github.com/tgig) 10 | - Major change - nodes changed from a Array/List to a Map/Dictionary 11 | - Minor changes - updated JSONSchema reference, added the top-level id attribute back 12 | - Cleaned up the JSONSchema definitions taking advantage of updates to JSONSchema 13 | 14 | Jan 2021 - Updated with hypergraph support by [mohawk2](https://github.com/mohawk2) 15 | - Added hyperedges to specification 16 | 17 | ## Design principles 18 | 19 | - Document graph structure 20 | - Use meaningful property names that reflect the semantic type of the value. 21 | - Property names should not be excessively long. 22 | - Property names should be plural when value is an array. 23 | - Properties that allow a `null` value can be omitted. 24 | - Define a 25 | [JSON graph schema](https://github.com/jsongraph/json-graph-specification/blob/master/json-graph-schema_v2.json) 26 | for content validation purposes. 27 | 28 | ## Structure Overview (Version 2) 29 | 30 | ### nodes object 31 | 32 | A nodes object/Map represents nodes in a graph. Each key in the nodes object is the unique identifier for the node. The 33 | node object is the value the Map key. 34 | 35 | ### node object properties 36 | 37 | - *label* property provides a text display for an object. Its value is defined as a _JSON string_. 38 | - *metadata* property allows for custom data on an object. Its values is defined as a JSON object. 39 | 40 | ### edge array 41 | 42 | Edges are an array of objects, each of which represents an edge in the graph. 43 | 44 | ### edge properties 45 | 46 | - *source* property references the key value of the source [node object](#node object). Its value is 47 | defined as a _JSON string_. 48 | - *relation* property provides the interaction between source and target nodes. Its value is defined 49 | as a _JSON string_. 50 | - *target* property references the key value of the target node object. Its value is defined as a 51 | _JSON string_. 52 | - *directed* property provides the edge mode (e.g. directed or undirected). Its value is _JSON true_ 53 | for directed and _JSON false_ for undirected. The edge direction is determined by _graph.directed_ 54 | property if not present. 55 | - *metadata* property allows for custom data on an object. Its values is defined as a JSON object. 56 | 57 | ### hyperedge array 58 | 59 | Hyperedges are either undirected - i.e. a set of nodes - or directed with a set of source nodes, and a set of target nodes 60 | 61 | ### hyperedge properties 62 | 63 | - *nodes* property is an array of key values of nodes from the nodes array 64 | - *source* property is an array of the key values of the source nodes. 65 | - *relation* property provides the interaction between source and target nodes. Its value is defined 66 | as a _JSON string_. 67 | - *target* property is an array of the key values of the target nodes. 68 | - *metadata* property allows for custom data on an object. Its values is defined as a JSON object. 69 | 70 | ### graph object 71 | 72 | A graph object represents a single conceptual graph. 73 | 74 | ### graph properties 75 | 76 | - *id* (optional) property provides an identifier for this graph object 77 | - *type* property provides a classification for an object. Its value is defined as a _JSON string_. 78 | - *label* property provides a text display for an object. Its value is defined as a _JSON string_. 79 | - *directed* property provides the graph mode (e.g. directed or undirected). Its value is _JSON 80 | true_ for directed and _JSON false_ for undirected. This property default to _JSON true_ 81 | indicating a directed graph. 82 | - *nodes* property provides the nodes in the graph. Its value is an Map/Dictionary of node objects - the Map key being the node identifier. 83 | - *edges* property provides the edges in the graph. Its value is an array of edge objects. 84 | - *hyperedges* property provides the hyperedges in the graph. Its value is an array of hyperedge objects. 85 | - *metadata* property allows for custom data on an object. Its values is defined as a JSON object. 86 | 87 | Current restriction on having *one of* edges, undirected hyperedges or directed hyperedges. If this is not a useful restriction, 88 | please post a use case in the Issues. 89 | 90 | ### graphs object 91 | 92 | A graphs object groups zero or more graph objects into one JSON document. 93 | 94 | - The graphs object is defined as a _JSON array_. 95 | 96 | ## Examples 97 | 98 | [Additional examples](https://github.com/jsongraph/json-graph-specification/tree/master/examples) 99 | ### empty single graph 100 | 101 | ```json 102 | { 103 | "graph": {} 104 | } 105 | ``` 106 | 107 | ### empty multi graph 108 | 109 | ```json 110 | { 111 | "graphs": [] 112 | } 113 | ``` 114 | 115 | ### nodes-only single graph 116 | 117 | ```json 118 | { 119 | "graph": { 120 | "nodes": { 121 | "A": {}, 122 | "B": {} 123 | } 124 | } 125 | } 126 | ``` 127 | 128 | ### nodes/edges single graph 129 | 130 | ```json 131 | { 132 | "graph": { 133 | "nodes": { 134 | "A": {}, 135 | "B": {} 136 | }, 137 | "edges": [ 138 | { 139 | "source": "A", 140 | "target": "B" 141 | } 142 | ] 143 | } 144 | } 145 | ``` 146 | 147 | ### hyperedges single graph 148 | 149 | ```json 150 | { 151 | "graph": { 152 | "nodes": { 153 | "A": {}, 154 | "B": {} 155 | }, 156 | "hyperedges": [ 157 | { 158 | "nodes": ["A", "B"], 159 | "relation": "associated", 160 | "metadata": {} 161 | } 162 | ] 163 | } 164 | } 165 | ``` 166 | 167 | ### complete single graph 168 | 169 | ```json 170 | { 171 | "graph": { 172 | "directed": false, 173 | "type": "graph type", 174 | "label": "graph label", 175 | "metadata": { 176 | "user-defined": "values" 177 | }, 178 | "nodes": { 179 | "0": { 180 | "label": "node label(0)", 181 | "metadata": { 182 | "type": "node type", 183 | "user-defined": "values" 184 | } 185 | }, 186 | "1": { 187 | "label": "node label(1)", 188 | "metadata": { 189 | "type": "node type", 190 | "user-defined": "values" 191 | } 192 | } 193 | }, 194 | "edges": [ 195 | { 196 | "source": "0", 197 | "relation": "edge relationship", 198 | "target": "1", 199 | "directed": false, 200 | "label": "edge label", 201 | "metadata": { 202 | "user-defined": "values" 203 | } 204 | } 205 | ] 206 | } 207 | } 208 | ``` 209 | 210 | ### complete multi graph 211 | 212 | ```json 213 | { 214 | "graphs": [ 215 | { 216 | "directed": true, 217 | "type": "graph type", 218 | "label": "graph label", 219 | "metadata": { 220 | "user-defined": "values" 221 | }, 222 | "nodes": { 223 | "0": { 224 | "label": "node label(0)", 225 | "metadata": { 226 | "type": "node type", 227 | "user-defined": "values" 228 | } 229 | }, 230 | "1": { 231 | "label": "node label(1)", 232 | "metadata": { 233 | "type": "node type", 234 | "user-defined": "values" 235 | } 236 | } 237 | }, 238 | "edges": [ 239 | { 240 | "source": "0", 241 | "relation": "edge relationship", 242 | "target": "1", 243 | "directed": true, 244 | "label": "edge label", 245 | "metadata": { 246 | "user-defined": "values" 247 | } 248 | } 249 | ] 250 | }, 251 | { 252 | "directed": true, 253 | "type": "graph type", 254 | "label": "graph label", 255 | "metadata": { 256 | "user-defined": "values" 257 | }, 258 | "nodes": { 259 | "0": { 260 | "label": "node label(0)", 261 | "metadata": { 262 | "user-defined": "values" 263 | } 264 | }, 265 | "1": { 266 | "label": "node label(1)", 267 | "metadata": { 268 | "user-defined": "values" 269 | } 270 | } 271 | }, 272 | "edges": [ 273 | { 274 | "source": "1", 275 | "relation": "edge relationship", 276 | "target": "0", 277 | "directed": true, 278 | "label": "edge label", 279 | "metadata": { 280 | "user-defined": "values" 281 | } 282 | } 283 | ] 284 | } 285 | ] 286 | } 287 | ``` 288 | 289 | ## Schema 290 | 291 | The 292 | [JSON graph schema](https://github.com/jsongraph/json-graph-specification/blob/master/json-graph-schema_v2.json)(version 2) 293 | is provided for the json graph format. 294 | 295 | ## Media Type 296 | 297 | The media type to describe JSON Graph Format is _application/vnd.jgf+json_. The approach to use a 298 | media type suffix like _+json_ is described by [RFC 6839](https://tools.ietf.org/html/rfc6839). 299 | 300 | In addition to the media type a _profile_ media type parameter MUST be set to a URL that 301 | dereferences to the JSON schema for JSON Graph Format. The expected usage of the _profile_ media 302 | type parameter is defined by [RFC 6906](https://tools.ietf.org/html/rfc6906). For example to 303 | communicate plain JSON Graph Format content the _Content-Type_ header could be set as: 304 | 305 | ```http 306 | Content-Type: application/vnd.jgf+json 307 | ``` 308 | 309 | A child schema of JSON Graph Format can communicate its JSON schema using additional _profile_ media 310 | type parameters. Each _profile_ media type parameter MUST dereference a JSON schema. For example the 311 | BEL JSON Graph Format could be communicated as: 312 | 313 | ```http 314 | Content-Type: application/vnd.jgf+json; 315 | profile=http://jsongraphformat.info/schema.json; 316 | profile=http://jsongraphformat.info/child-schemas/bel-json-graph.schema.json 317 | ``` 318 | 319 | ## NPM support 320 | 321 | You can import the schema into your JS projects by installing it via NPM and requiring it. 322 | 323 | ```shell 324 | npm install --save json-graph-specification 325 | ``` 326 | 327 | ```javascript 328 | var JSONGraph = require('json-graph-specification') 329 | ``` 330 | 331 | ## Clients 332 | 333 | 1. [jay-gee-eff](https://www.npmjs.com/package/jay-gee-eff) - An npm package for manipulating JGF 334 | files in nodejs. 335 | 2. [jay-gee-eff-for-web](https://www.npmjs.com/package/jay-gee-eff-for-web) - An npm package for 336 | using JGF graphs with OOP in the web, i.e. web browsers, without capabilities of file handling, 337 | but a fully fledged JGF feature set. 338 | 339 | ## Project Tests 340 | 341 | See [TESTING](https://github.com/jsongraph/json-graph-specification/blob/master/TESTING.rst). 342 | 343 | ## Related Standards {#links} 344 | 345 | Graph data in JSON is usually modelled in application-specific ad-hoc formats. In addition there are 346 | several text-based graph formats: 347 | 348 | - [Graph Modelling Language](https://gephi.org/users/supported-graph-formats/gml-format/) (GML) 349 | - [DOT]() (graphviz syntax) 350 | - [Pajekt NET format](https://gephi.org/users/supported-graph-formats/pajek-net-format/) 351 | - [Netdraw VNA format](https://gephi.org/users/supported-graph-formats/netdraw-vna-format/) 352 | - [UCINET DL Format](https://gephi.org/users/supported-graph-formats/ucinet-dl-format/) 353 | - Trivial Graph Format (TGF) 354 | - [GUESS format](https://gephi.org/users/supported-graph-formats/gdf-format/) (GDF) 355 | - [Tulip TLP format](http://tulip.labri.fr/TulipDrupal/?q=tlp-file-format) 356 | 357 | and XML-based graph formats: 358 | 359 | - Directed Graph Markup Language (DGML) 360 | - [Graph Exchange XML Format](https://gephi.org/gexf/format) (GEXF) 361 | - Graph eXchange Language (GXL) 362 | - [GraphML](http://graphml.graphdrawing.org/) 363 | - DotML (XML representation of DOT) 364 | - XGMML (XML representation of GML) 365 | 366 | Several semi-standardized JSON-based graph formats are found in applications, for instance 367 | [Cytoscape JSON](http://js.cytoscape.org/#notation/elements-json). Simple graphs can also be 368 | expressed [in CSV format](https://gephi.org/users/supported-graph-formats/csv-format/). 369 | 370 | ## Links 371 | 372 | - [JSON schema](http://json-schema.org) 373 | -------------------------------------------------------------------------------- /TESTING.md: -------------------------------------------------------------------------------- 1 | # Testing 2 | 3 | ## Tests exist to: 4 | 5 | - validate json graph schema as draft v4 of [JSON schema](http://json-schema.org) 6 | - validate examples against the json graph schema 7 | 8 | ## How-to 9 | 10 | - Install python3 11 | - Install a virtual environment: `virtualenv venv` 12 | - Activate virtual environment: `. venv/bin/activate` 13 | - Install testing etc dependencies with `pip install -r requirements.txt` 14 | - Run tests: `python -m unittest test.test-examples` 15 | 16 | ## Travis-CI 17 | 18 | 19 | Automated testing with Travis-CI at [travis](https://travis-ci.org/jsongraph/json-graph-specification). 20 | 21 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2.4' 2 | services: 3 | python: 4 | image: python:3.9.0-alpine3.12 5 | command: sh -c 'pip install -r requirements.txt && python -m unittest test.test-examples' 6 | working_dir: /app 7 | volumes: 8 | - .:/app 9 | -------------------------------------------------------------------------------- /examples/car_graphs.json: -------------------------------------------------------------------------------- 1 | { 2 | "graphs": [ 3 | { 4 | "id": "car-manufacturer-relationships", 5 | "type": "car", 6 | "label": "Car Manufacturer Relationships", 7 | "nodes": { 8 | "nissan": { 9 | "label": "Nissan" 10 | }, 11 | "infiniti": { 12 | "label": "Infiniti" 13 | }, 14 | "toyota": { 15 | "label": "Toyota" 16 | }, 17 | "lexus": { 18 | "label": "Lexus" 19 | } 20 | }, 21 | "edges": [ 22 | { 23 | "source": "nissan", 24 | "target": "infiniti", 25 | "relation": "has_luxury_division" 26 | }, 27 | { 28 | "source": "toyota", 29 | "target": "lexus", 30 | "relation": "has_luxury_division" 31 | } 32 | ] 33 | }, 34 | { 35 | "id": "car-manufacturer-countries", 36 | "type": "car", 37 | "label": "Car Manufacturer Countries", 38 | "nodes": { 39 | "japan": { 40 | "label": "Japan" 41 | }, 42 | "nissan": { 43 | "label": "Nissan" 44 | }, 45 | "toyota": { 46 | "label": "Toyota" 47 | } 48 | }, 49 | "edges": [ 50 | { 51 | "source": "nissan", 52 | "target": "japan", 53 | "relation": "country_of_origin" 54 | }, 55 | { 56 | "source": "nissan", 57 | "target": "japan", 58 | "relation": "country_of_origin" 59 | } 60 | ] 61 | } 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /examples/empty_test.json: -------------------------------------------------------------------------------- 1 | { 2 | "graph": { 3 | "id": "", 4 | "type": "schema test", 5 | "label": "empty test", 6 | "nodes": {}, 7 | "edges": [], 8 | "metadata": {} 9 | } 10 | } -------------------------------------------------------------------------------- /examples/hyper-directed.json: -------------------------------------------------------------------------------- 1 | { 2 | "graph": { 3 | "id": "1", 4 | "type": "weighted directed network", 5 | "label": "None", 6 | "nodes": { "a": {}, "b": {}, "c": {}, "d": {}, "e": {}, "f": {}, "g": {}, "h": {} }, 7 | "hyperedges": [ 8 | { "source": ["a", "b", "c"], "target": ["f", "g"], "metadata": { "weight": 17 } }, 9 | { "source": ["a", "b", "c"], "target": ["f", "h"], "metadata": { "weight": 123 } }, 10 | { "source": ["c"], "target": ["d"], "metadata": { "weight": 45 } }, 11 | { "source": ["d"], "target": ["e"], "metadata": { "weight": 46 } } 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/hyper-undirected.json: -------------------------------------------------------------------------------- 1 | { 2 | "graph": { 3 | "id": "1", 4 | "type": "weighted network", 5 | "directed": false, 6 | "label": "None", 7 | "nodes": { "a": {}, "b": {}, "c": {}, "d": {}, "e": {}, "x": {} }, 8 | "hyperedges": [ 9 | { "nodes": ["a", "b", "x"], "metadata": { "weight": 17 } }, 10 | { "nodes": ["a", "b"], "metadata": { "weight": 123 } }, 11 | { "nodes": ["c", "d"], "metadata": { "weight": 45 } }, 12 | { "nodes": ["d", "e"], "metadata": { "weight": 46 } } 13 | ] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/les_miserables.json: -------------------------------------------------------------------------------- 1 | { 2 | "graph": { 3 | "id": "les_miserables", 4 | "type": "performance", 5 | "nodes": { 6 | "Myriel": { 7 | "metadata": { 8 | "group": 1 9 | }, 10 | "label": "Myriel" 11 | }, 12 | "Napoleon": { 13 | "metadata": { 14 | "group": 1 15 | }, 16 | "label": "Napoleon" 17 | }, 18 | "Mlle.Baptistine": { 19 | "metadata": { 20 | "group": 1 21 | }, 22 | "label": "Mlle.Baptistine" 23 | }, 24 | "Mme.Magloire": { 25 | "metadata": { 26 | "group": 1 27 | }, 28 | "label": "Mme.Magloire" 29 | }, 30 | "CountessdeLo": { 31 | "metadata": { 32 | "group": 1 33 | }, 34 | "label": "CountessdeLo" 35 | }, 36 | "Geborand": { 37 | "metadata": { 38 | "group": 1 39 | }, 40 | "label": "Geborand" 41 | }, 42 | "Champtercier": { 43 | "metadata": { 44 | "group": 1 45 | }, 46 | "label": "Champtercier" 47 | }, 48 | "Cravatte": { 49 | "metadata": { 50 | "group": 1 51 | }, 52 | "label": "Cravatte" 53 | }, 54 | "Count": { 55 | "metadata": { 56 | "group": 1 57 | }, 58 | "label": "Count" 59 | }, 60 | "OldMan": { 61 | "metadata": { 62 | "group": 1 63 | }, 64 | "label": "OldMan" 65 | }, 66 | "Labarre": { 67 | "metadata": { 68 | "group": 2 69 | }, 70 | "label": "Labarre" 71 | }, 72 | "Valjean": { 73 | "metadata": { 74 | "group": 2 75 | }, 76 | "label": "Valjean" 77 | }, 78 | "Marguerite": { 79 | "metadata": { 80 | "group": 3 81 | }, 82 | "label": "Marguerite" 83 | }, 84 | "Mme.deR": { 85 | "metadata": { 86 | "group": 2 87 | }, 88 | "label": "Mme.deR" 89 | }, 90 | "Isabeau": { 91 | "metadata": { 92 | "group": 2 93 | }, 94 | "label": "Isabeau" 95 | }, 96 | "Gervais": { 97 | "metadata": { 98 | "group": 2 99 | }, 100 | "label": "Gervais" 101 | }, 102 | "Tholomyes": { 103 | "metadata": { 104 | "group": 3 105 | }, 106 | "label": "Tholomyes" 107 | }, 108 | "Listolier": { 109 | "metadata": { 110 | "group": 3 111 | }, 112 | "label": "Listolier" 113 | }, 114 | "Fameuil": { 115 | "metadata": { 116 | "group": 3 117 | }, 118 | "label": "Fameuil" 119 | }, 120 | "Blacheville": { 121 | "metadata": { 122 | "group": 3 123 | }, 124 | "label": "Blacheville" 125 | }, 126 | "Favourite": { 127 | "metadata": { 128 | "group": 3 129 | }, 130 | "label": "Favourite" 131 | }, 132 | "Dahlia": { 133 | "metadata": { 134 | "group": 3 135 | }, 136 | "label": "Dahlia" 137 | }, 138 | "Zephine": { 139 | "metadata": { 140 | "group": 3 141 | }, 142 | "label": "Zephine" 143 | }, 144 | "Fantine": { 145 | "metadata": { 146 | "group": 3 147 | }, 148 | "label": "Fantine" 149 | }, 150 | "Mme.Thenardier": { 151 | "metadata": { 152 | "group": 4 153 | }, 154 | "label": "Mme.Thenardier" 155 | }, 156 | "Thenardier": { 157 | "metadata": { 158 | "group": 4 159 | }, 160 | "label": "Thenardier" 161 | }, 162 | "Cosette": { 163 | "metadata": { 164 | "group": 5 165 | }, 166 | "label": "Cosette" 167 | }, 168 | "Javert": { 169 | "metadata": { 170 | "group": 4 171 | }, 172 | "label": "Javert" 173 | }, 174 | "Fauchelevent": { 175 | "metadata": { 176 | "group": 0 177 | }, 178 | "label": "Fauchelevent" 179 | }, 180 | "Bamatabois": { 181 | "metadata": { 182 | "group": 2 183 | }, 184 | "label": "Bamatabois" 185 | }, 186 | "Perpetue": { 187 | "metadata": { 188 | "group": 3 189 | }, 190 | "label": "Perpetue" 191 | }, 192 | "Simplice": { 193 | "metadata": { 194 | "group": 2 195 | }, 196 | "label": "Simplice" 197 | }, 198 | "Scaufflaire": { 199 | "metadata": { 200 | "group": 2 201 | }, 202 | "label": "Scaufflaire" 203 | }, 204 | "Woman1": { 205 | "metadata": { 206 | "group": 2 207 | }, 208 | "label": "Woman1" 209 | }, 210 | "Judge": { 211 | "metadata": { 212 | "group": 2 213 | }, 214 | "label": "Judge" 215 | }, 216 | "Champmathieu": { 217 | "metadata": { 218 | "group": 2 219 | }, 220 | "label": "Champmathieu" 221 | }, 222 | "Brevet": { 223 | "metadata": { 224 | "group": 2 225 | }, 226 | "label": "Brevet" 227 | }, 228 | "Chenildieu": { 229 | "metadata": { 230 | "group": 2 231 | }, 232 | "label": "Chenildieu" 233 | }, 234 | "Cochepaille": { 235 | "metadata": { 236 | "group": 2 237 | }, 238 | "label": "Cochepaille" 239 | }, 240 | "Pontmercy": { 241 | "metadata": { 242 | "group": 4 243 | }, 244 | "label": "Pontmercy" 245 | }, 246 | "Boulatruelle": { 247 | "metadata": { 248 | "group": 6 249 | }, 250 | "label": "Boulatruelle" 251 | }, 252 | "Eponine": { 253 | "metadata": { 254 | "group": 4 255 | }, 256 | "label": "Eponine" 257 | }, 258 | "Anzelma": { 259 | "metadata": { 260 | "group": 4 261 | }, 262 | "label": "Anzelma" 263 | }, 264 | "Woman2": { 265 | "metadata": { 266 | "group": 5 267 | }, 268 | "label": "Woman2" 269 | }, 270 | "MotherInnocent": { 271 | "metadata": { 272 | "group": 0 273 | }, 274 | "label": "MotherInnocent" 275 | }, 276 | "Gribier": { 277 | "metadata": { 278 | "group": 0 279 | }, 280 | "label": "Gribier" 281 | }, 282 | "Jondrette": { 283 | "metadata": { 284 | "group": 7 285 | }, 286 | "label": "Jondrette" 287 | }, 288 | "Mme.Burgon": { 289 | "metadata": { 290 | "group": 7 291 | }, 292 | "label": "Mme.Burgon" 293 | }, 294 | "Gavroche": { 295 | "metadata": { 296 | "group": 8 297 | }, 298 | "label": "Gavroche" 299 | }, 300 | "Gillenormand": { 301 | "metadata": { 302 | "group": 5 303 | }, 304 | "label": "Gillenormand" 305 | }, 306 | "Magnon": { 307 | "metadata": { 308 | "group": 5 309 | }, 310 | "label": "Magnon" 311 | }, 312 | "Mlle.Gillenormand": { 313 | "metadata": { 314 | "group": 5 315 | }, 316 | "label": "Mlle.Gillenormand" 317 | }, 318 | "Mme.Pontmercy": { 319 | "metadata": { 320 | "group": 5 321 | }, 322 | "label": "Mme.Pontmercy" 323 | }, 324 | "Mlle.Vaubois": { 325 | "metadata": { 326 | "group": 5 327 | }, 328 | "label": "Mlle.Vaubois" 329 | }, 330 | "Lt.Gillenormand": { 331 | "metadata": { 332 | "group": 5 333 | }, 334 | "label": "Lt.Gillenormand" 335 | }, 336 | "Marius": { 337 | "metadata": { 338 | "group": 8 339 | }, 340 | "label": "Marius" 341 | }, 342 | "BaronessT": { 343 | "metadata": { 344 | "group": 5 345 | }, 346 | "label": "BaronessT" 347 | }, 348 | "Mabeuf": { 349 | "metadata": { 350 | "group": 8 351 | }, 352 | "label": "Mabeuf" 353 | }, 354 | "Enjolras": { 355 | "metadata": { 356 | "group": 8 357 | }, 358 | "label": "Enjolras" 359 | }, 360 | "Combeferre": { 361 | "metadata": { 362 | "group": 8 363 | }, 364 | "label": "Combeferre" 365 | }, 366 | "Prouvaire": { 367 | "metadata": { 368 | "group": 8 369 | }, 370 | "label": "Prouvaire" 371 | }, 372 | "Feuilly": { 373 | "metadata": { 374 | "group": 8 375 | }, 376 | "label": "Feuilly" 377 | }, 378 | "Courfeyrac": { 379 | "metadata": { 380 | "group": 8 381 | }, 382 | "label": "Courfeyrac" 383 | }, 384 | "Bahorel": { 385 | "metadata": { 386 | "group": 8 387 | }, 388 | "label": "Bahorel" 389 | }, 390 | "Bossuet": { 391 | "metadata": { 392 | "group": 8 393 | }, 394 | "label": "Bossuet" 395 | }, 396 | "Joly": { 397 | "metadata": { 398 | "group": 8 399 | }, 400 | "label": "Joly" 401 | }, 402 | "Grantaire": { 403 | "metadata": { 404 | "group": 8 405 | }, 406 | "label": "Grantaire" 407 | }, 408 | "MotherPlutarch": { 409 | "metadata": { 410 | "group": 9 411 | }, 412 | "label": "MotherPlutarch" 413 | }, 414 | "Gueulemer": { 415 | "metadata": { 416 | "group": 4 417 | }, 418 | "label": "Gueulemer" 419 | }, 420 | "Babet": { 421 | "metadata": { 422 | "group": 4 423 | }, 424 | "label": "Babet" 425 | }, 426 | "Claquesous": { 427 | "metadata": { 428 | "group": 4 429 | }, 430 | "label": "Claquesous" 431 | }, 432 | "Montparnasse": { 433 | "metadata": { 434 | "group": 4 435 | }, 436 | "label": "Montparnasse" 437 | }, 438 | "Toussaint": { 439 | "metadata": { 440 | "group": 5 441 | }, 442 | "label": "Toussaint" 443 | }, 444 | "Child1": { 445 | "metadata": { 446 | "group": 10 447 | }, 448 | "label": "Child1" 449 | }, 450 | "Child2": { 451 | "metadata": { 452 | "group": 10 453 | }, 454 | "label": "Child2" 455 | }, 456 | "Brujon": { 457 | "metadata": { 458 | "group": 4 459 | }, 460 | "label": "Brujon" 461 | }, 462 | "Mme.Hucheloup": { 463 | "metadata": { 464 | "group": 8 465 | }, 466 | "label": "Mme.Hucheloup" 467 | } 468 | }, 469 | "edges": [ 470 | { 471 | "source": "Napoleon", 472 | "target": "Myriel", 473 | "metadata": { 474 | "value": 1 475 | } 476 | }, 477 | { 478 | "source": "Mlle.Baptistine", 479 | "target": "Myriel", 480 | "metadata": { 481 | "value": 8 482 | } 483 | }, 484 | { 485 | "source": "Mme.Magloire", 486 | "target": "Myriel", 487 | "metadata": { 488 | "value": 10 489 | } 490 | }, 491 | { 492 | "source": "Mme.Magloire", 493 | "target": "Mlle.Baptistine", 494 | "metadata": { 495 | "value": 6 496 | } 497 | }, 498 | { 499 | "source": "CountessdeLo", 500 | "target": "Myriel", 501 | "metadata": { 502 | "value": 1 503 | } 504 | }, 505 | { 506 | "source": "Geborand", 507 | "target": "Myriel", 508 | "metadata": { 509 | "value": 1 510 | } 511 | }, 512 | { 513 | "source": "Champtercier", 514 | "target": "Myriel", 515 | "metadata": { 516 | "value": 1 517 | } 518 | }, 519 | { 520 | "source": "Cravatte", 521 | "target": "Myriel", 522 | "metadata": { 523 | "value": 1 524 | } 525 | }, 526 | { 527 | "source": "Count", 528 | "target": "Myriel", 529 | "metadata": { 530 | "value": 2 531 | } 532 | }, 533 | { 534 | "source": "OldMan", 535 | "target": "Myriel", 536 | "metadata": { 537 | "value": 1 538 | } 539 | }, 540 | { 541 | "source": "Valjean", 542 | "target": "Labarre", 543 | "metadata": { 544 | "value": 1 545 | } 546 | }, 547 | { 548 | "source": "Valjean", 549 | "target": "Mme.Magloire", 550 | "metadata": { 551 | "value": 3 552 | } 553 | }, 554 | { 555 | "source": "Valjean", 556 | "target": "Mlle.Baptistine", 557 | "metadata": { 558 | "value": 3 559 | } 560 | }, 561 | { 562 | "source": "Valjean", 563 | "target": "Myriel", 564 | "metadata": { 565 | "value": 5 566 | } 567 | }, 568 | { 569 | "source": "Marguerite", 570 | "target": "Valjean", 571 | "metadata": { 572 | "value": 1 573 | } 574 | }, 575 | { 576 | "source": "Mme.deR", 577 | "target": "Valjean", 578 | "metadata": { 579 | "value": 1 580 | } 581 | }, 582 | { 583 | "source": "Isabeau", 584 | "target": "Valjean", 585 | "metadata": { 586 | "value": 1 587 | } 588 | }, 589 | { 590 | "source": "Gervais", 591 | "target": "Valjean", 592 | "metadata": { 593 | "value": 1 594 | } 595 | }, 596 | { 597 | "source": "Listolier", 598 | "target": "Tholomyes", 599 | "metadata": { 600 | "value": 4 601 | } 602 | }, 603 | { 604 | "source": "Fameuil", 605 | "target": "Tholomyes", 606 | "metadata": { 607 | "value": 4 608 | } 609 | }, 610 | { 611 | "source": "Fameuil", 612 | "target": "Listolier", 613 | "metadata": { 614 | "value": 4 615 | } 616 | }, 617 | { 618 | "source": "Blacheville", 619 | "target": "Tholomyes", 620 | "metadata": { 621 | "value": 4 622 | } 623 | }, 624 | { 625 | "source": "Blacheville", 626 | "target": "Listolier", 627 | "metadata": { 628 | "value": 4 629 | } 630 | }, 631 | { 632 | "source": "Blacheville", 633 | "target": "Fameuil", 634 | "metadata": { 635 | "value": 4 636 | } 637 | }, 638 | { 639 | "source": "Favourite", 640 | "target": "Tholomyes", 641 | "metadata": { 642 | "value": 3 643 | } 644 | }, 645 | { 646 | "source": "Favourite", 647 | "target": "Listolier", 648 | "metadata": { 649 | "value": 3 650 | } 651 | }, 652 | { 653 | "source": "Favourite", 654 | "target": "Fameuil", 655 | "metadata": { 656 | "value": 3 657 | } 658 | }, 659 | { 660 | "source": "Favourite", 661 | "target": "Blacheville", 662 | "metadata": { 663 | "value": 4 664 | } 665 | }, 666 | { 667 | "source": "Dahlia", 668 | "target": "Tholomyes", 669 | "metadata": { 670 | "value": 3 671 | } 672 | }, 673 | { 674 | "source": "Dahlia", 675 | "target": "Listolier", 676 | "metadata": { 677 | "value": 3 678 | } 679 | }, 680 | { 681 | "source": "Dahlia", 682 | "target": "Fameuil", 683 | "metadata": { 684 | "value": 3 685 | } 686 | }, 687 | { 688 | "source": "Dahlia", 689 | "target": "Blacheville", 690 | "metadata": { 691 | "value": 3 692 | } 693 | }, 694 | { 695 | "source": "Dahlia", 696 | "target": "Favourite", 697 | "metadata": { 698 | "value": 5 699 | } 700 | }, 701 | { 702 | "source": "Zephine", 703 | "target": "Tholomyes", 704 | "metadata": { 705 | "value": 3 706 | } 707 | }, 708 | { 709 | "source": "Zephine", 710 | "target": "Listolier", 711 | "metadata": { 712 | "value": 3 713 | } 714 | }, 715 | { 716 | "source": "Zephine", 717 | "target": "Fameuil", 718 | "metadata": { 719 | "value": 3 720 | } 721 | }, 722 | { 723 | "source": "Zephine", 724 | "target": "Blacheville", 725 | "metadata": { 726 | "value": 3 727 | } 728 | }, 729 | { 730 | "source": "Zephine", 731 | "target": "Favourite", 732 | "metadata": { 733 | "value": 4 734 | } 735 | }, 736 | { 737 | "source": "Zephine", 738 | "target": "Dahlia", 739 | "metadata": { 740 | "value": 4 741 | } 742 | }, 743 | { 744 | "source": "Fantine", 745 | "target": "Tholomyes", 746 | "metadata": { 747 | "value": 3 748 | } 749 | }, 750 | { 751 | "source": "Fantine", 752 | "target": "Listolier", 753 | "metadata": { 754 | "value": 3 755 | } 756 | }, 757 | { 758 | "source": "Fantine", 759 | "target": "Fameuil", 760 | "metadata": { 761 | "value": 3 762 | } 763 | }, 764 | { 765 | "source": "Fantine", 766 | "target": "Blacheville", 767 | "metadata": { 768 | "value": 3 769 | } 770 | }, 771 | { 772 | "source": "Fantine", 773 | "target": "Favourite", 774 | "metadata": { 775 | "value": 4 776 | } 777 | }, 778 | { 779 | "source": "Fantine", 780 | "target": "Dahlia", 781 | "metadata": { 782 | "value": 4 783 | } 784 | }, 785 | { 786 | "source": "Fantine", 787 | "target": "Zephine", 788 | "metadata": { 789 | "value": 4 790 | } 791 | }, 792 | { 793 | "source": "Fantine", 794 | "target": "Marguerite", 795 | "metadata": { 796 | "value": 2 797 | } 798 | }, 799 | { 800 | "source": "Fantine", 801 | "target": "Valjean", 802 | "metadata": { 803 | "value": 9 804 | } 805 | }, 806 | { 807 | "source": "Mme.Thenardier", 808 | "target": "Fantine", 809 | "metadata": { 810 | "value": 2 811 | } 812 | }, 813 | { 814 | "source": "Mme.Thenardier", 815 | "target": "Valjean", 816 | "metadata": { 817 | "value": 7 818 | } 819 | }, 820 | { 821 | "source": "Thenardier", 822 | "target": "Mme.Thenardier", 823 | "metadata": { 824 | "value": 13 825 | } 826 | }, 827 | { 828 | "source": "Thenardier", 829 | "target": "Fantine", 830 | "metadata": { 831 | "value": 1 832 | } 833 | }, 834 | { 835 | "source": "Thenardier", 836 | "target": "Valjean", 837 | "metadata": { 838 | "value": 12 839 | } 840 | }, 841 | { 842 | "source": "Cosette", 843 | "target": "Mme.Thenardier", 844 | "metadata": { 845 | "value": 4 846 | } 847 | }, 848 | { 849 | "source": "Cosette", 850 | "target": "Valjean", 851 | "metadata": { 852 | "value": 31 853 | } 854 | }, 855 | { 856 | "source": "Cosette", 857 | "target": "Tholomyes", 858 | "metadata": { 859 | "value": 1 860 | } 861 | }, 862 | { 863 | "source": "Cosette", 864 | "target": "Thenardier", 865 | "metadata": { 866 | "value": 1 867 | } 868 | }, 869 | { 870 | "source": "Javert", 871 | "target": "Valjean", 872 | "metadata": { 873 | "value": 17 874 | } 875 | }, 876 | { 877 | "source": "Javert", 878 | "target": "Fantine", 879 | "metadata": { 880 | "value": 5 881 | } 882 | }, 883 | { 884 | "source": "Javert", 885 | "target": "Thenardier", 886 | "metadata": { 887 | "value": 5 888 | } 889 | }, 890 | { 891 | "source": "Javert", 892 | "target": "Mme.Thenardier", 893 | "metadata": { 894 | "value": 1 895 | } 896 | }, 897 | { 898 | "source": "Javert", 899 | "target": "Cosette", 900 | "metadata": { 901 | "value": 1 902 | } 903 | }, 904 | { 905 | "source": "Fauchelevent", 906 | "target": "Valjean", 907 | "metadata": { 908 | "value": 8 909 | } 910 | }, 911 | { 912 | "source": "Fauchelevent", 913 | "target": "Javert", 914 | "metadata": { 915 | "value": 1 916 | } 917 | }, 918 | { 919 | "source": "Bamatabois", 920 | "target": "Fantine", 921 | "metadata": { 922 | "value": 1 923 | } 924 | }, 925 | { 926 | "source": "Bamatabois", 927 | "target": "Javert", 928 | "metadata": { 929 | "value": 1 930 | } 931 | }, 932 | { 933 | "source": "Bamatabois", 934 | "target": "Valjean", 935 | "metadata": { 936 | "value": 2 937 | } 938 | }, 939 | { 940 | "source": "Perpetue", 941 | "target": "Fantine", 942 | "metadata": { 943 | "value": 1 944 | } 945 | }, 946 | { 947 | "source": "Simplice", 948 | "target": "Perpetue", 949 | "metadata": { 950 | "value": 2 951 | } 952 | }, 953 | { 954 | "source": "Simplice", 955 | "target": "Valjean", 956 | "metadata": { 957 | "value": 3 958 | } 959 | }, 960 | { 961 | "source": "Simplice", 962 | "target": "Fantine", 963 | "metadata": { 964 | "value": 2 965 | } 966 | }, 967 | { 968 | "source": "Simplice", 969 | "target": "Javert", 970 | "metadata": { 971 | "value": 1 972 | } 973 | }, 974 | { 975 | "source": "Scaufflaire", 976 | "target": "Valjean", 977 | "metadata": { 978 | "value": 1 979 | } 980 | }, 981 | { 982 | "source": "Woman1", 983 | "target": "Valjean", 984 | "metadata": { 985 | "value": 2 986 | } 987 | }, 988 | { 989 | "source": "Woman1", 990 | "target": "Javert", 991 | "metadata": { 992 | "value": 1 993 | } 994 | }, 995 | { 996 | "source": "Judge", 997 | "target": "Valjean", 998 | "metadata": { 999 | "value": 3 1000 | } 1001 | }, 1002 | { 1003 | "source": "Judge", 1004 | "target": "Bamatabois", 1005 | "metadata": { 1006 | "value": 2 1007 | } 1008 | }, 1009 | { 1010 | "source": "Champmathieu", 1011 | "target": "Valjean", 1012 | "metadata": { 1013 | "value": 3 1014 | } 1015 | }, 1016 | { 1017 | "source": "Champmathieu", 1018 | "target": "Judge", 1019 | "metadata": { 1020 | "value": 3 1021 | } 1022 | }, 1023 | { 1024 | "source": "Champmathieu", 1025 | "target": "Bamatabois", 1026 | "metadata": { 1027 | "value": 2 1028 | } 1029 | }, 1030 | { 1031 | "source": "Brevet", 1032 | "target": "Judge", 1033 | "metadata": { 1034 | "value": 2 1035 | } 1036 | }, 1037 | { 1038 | "source": "Brevet", 1039 | "target": "Champmathieu", 1040 | "metadata": { 1041 | "value": 2 1042 | } 1043 | }, 1044 | { 1045 | "source": "Brevet", 1046 | "target": "Valjean", 1047 | "metadata": { 1048 | "value": 2 1049 | } 1050 | }, 1051 | { 1052 | "source": "Brevet", 1053 | "target": "Bamatabois", 1054 | "metadata": { 1055 | "value": 1 1056 | } 1057 | }, 1058 | { 1059 | "source": "Chenildieu", 1060 | "target": "Judge", 1061 | "metadata": { 1062 | "value": 2 1063 | } 1064 | }, 1065 | { 1066 | "source": "Chenildieu", 1067 | "target": "Champmathieu", 1068 | "metadata": { 1069 | "value": 2 1070 | } 1071 | }, 1072 | { 1073 | "source": "Chenildieu", 1074 | "target": "Brevet", 1075 | "metadata": { 1076 | "value": 2 1077 | } 1078 | }, 1079 | { 1080 | "source": "Chenildieu", 1081 | "target": "Valjean", 1082 | "metadata": { 1083 | "value": 2 1084 | } 1085 | }, 1086 | { 1087 | "source": "Chenildieu", 1088 | "target": "Bamatabois", 1089 | "metadata": { 1090 | "value": 1 1091 | } 1092 | }, 1093 | { 1094 | "source": "Cochepaille", 1095 | "target": "Judge", 1096 | "metadata": { 1097 | "value": 2 1098 | } 1099 | }, 1100 | { 1101 | "source": "Cochepaille", 1102 | "target": "Champmathieu", 1103 | "metadata": { 1104 | "value": 2 1105 | } 1106 | }, 1107 | { 1108 | "source": "Cochepaille", 1109 | "target": "Brevet", 1110 | "metadata": { 1111 | "value": 2 1112 | } 1113 | }, 1114 | { 1115 | "source": "Cochepaille", 1116 | "target": "Chenildieu", 1117 | "metadata": { 1118 | "value": 2 1119 | } 1120 | }, 1121 | { 1122 | "source": "Cochepaille", 1123 | "target": "Valjean", 1124 | "metadata": { 1125 | "value": 2 1126 | } 1127 | }, 1128 | { 1129 | "source": "Cochepaille", 1130 | "target": "Bamatabois", 1131 | "metadata": { 1132 | "value": 1 1133 | } 1134 | }, 1135 | { 1136 | "source": "Pontmercy", 1137 | "target": "Thenardier", 1138 | "metadata": { 1139 | "value": 1 1140 | } 1141 | }, 1142 | { 1143 | "source": "Boulatruelle", 1144 | "target": "Thenardier", 1145 | "metadata": { 1146 | "value": 1 1147 | } 1148 | }, 1149 | { 1150 | "source": "Eponine", 1151 | "target": "Mme.Thenardier", 1152 | "metadata": { 1153 | "value": 2 1154 | } 1155 | }, 1156 | { 1157 | "source": "Eponine", 1158 | "target": "Thenardier", 1159 | "metadata": { 1160 | "value": 3 1161 | } 1162 | }, 1163 | { 1164 | "source": "Anzelma", 1165 | "target": "Eponine", 1166 | "metadata": { 1167 | "value": 2 1168 | } 1169 | }, 1170 | { 1171 | "source": "Anzelma", 1172 | "target": "Thenardier", 1173 | "metadata": { 1174 | "value": 2 1175 | } 1176 | }, 1177 | { 1178 | "source": "Anzelma", 1179 | "target": "Mme.Thenardier", 1180 | "metadata": { 1181 | "value": 1 1182 | } 1183 | }, 1184 | { 1185 | "source": "Woman2", 1186 | "target": "Valjean", 1187 | "metadata": { 1188 | "value": 3 1189 | } 1190 | }, 1191 | { 1192 | "source": "Woman2", 1193 | "target": "Cosette", 1194 | "metadata": { 1195 | "value": 1 1196 | } 1197 | }, 1198 | { 1199 | "source": "Woman2", 1200 | "target": "Javert", 1201 | "metadata": { 1202 | "value": 1 1203 | } 1204 | }, 1205 | { 1206 | "source": "MotherInnocent", 1207 | "target": "Fauchelevent", 1208 | "metadata": { 1209 | "value": 3 1210 | } 1211 | }, 1212 | { 1213 | "source": "MotherInnocent", 1214 | "target": "Valjean", 1215 | "metadata": { 1216 | "value": 1 1217 | } 1218 | }, 1219 | { 1220 | "source": "Gribier", 1221 | "target": "Fauchelevent", 1222 | "metadata": { 1223 | "value": 2 1224 | } 1225 | }, 1226 | { 1227 | "source": "Mme.Burgon", 1228 | "target": "Jondrette", 1229 | "metadata": { 1230 | "value": 1 1231 | } 1232 | }, 1233 | { 1234 | "source": "Gavroche", 1235 | "target": "Mme.Burgon", 1236 | "metadata": { 1237 | "value": 2 1238 | } 1239 | }, 1240 | { 1241 | "source": "Gavroche", 1242 | "target": "Thenardier", 1243 | "metadata": { 1244 | "value": 1 1245 | } 1246 | }, 1247 | { 1248 | "source": "Gavroche", 1249 | "target": "Javert", 1250 | "metadata": { 1251 | "value": 1 1252 | } 1253 | }, 1254 | { 1255 | "source": "Gavroche", 1256 | "target": "Valjean", 1257 | "metadata": { 1258 | "value": 1 1259 | } 1260 | }, 1261 | { 1262 | "source": "Gillenormand", 1263 | "target": "Cosette", 1264 | "metadata": { 1265 | "value": 3 1266 | } 1267 | }, 1268 | { 1269 | "source": "Gillenormand", 1270 | "target": "Valjean", 1271 | "metadata": { 1272 | "value": 2 1273 | } 1274 | }, 1275 | { 1276 | "source": "Magnon", 1277 | "target": "Gillenormand", 1278 | "metadata": { 1279 | "value": 1 1280 | } 1281 | }, 1282 | { 1283 | "source": "Magnon", 1284 | "target": "Mme.Thenardier", 1285 | "metadata": { 1286 | "value": 1 1287 | } 1288 | }, 1289 | { 1290 | "source": "Mlle.Gillenormand", 1291 | "target": "Gillenormand", 1292 | "metadata": { 1293 | "value": 9 1294 | } 1295 | }, 1296 | { 1297 | "source": "Mlle.Gillenormand", 1298 | "target": "Cosette", 1299 | "metadata": { 1300 | "value": 2 1301 | } 1302 | }, 1303 | { 1304 | "source": "Mlle.Gillenormand", 1305 | "target": "Valjean", 1306 | "metadata": { 1307 | "value": 2 1308 | } 1309 | }, 1310 | { 1311 | "source": "Mme.Pontmercy", 1312 | "target": "Mlle.Gillenormand", 1313 | "metadata": { 1314 | "value": 1 1315 | } 1316 | }, 1317 | { 1318 | "source": "Mme.Pontmercy", 1319 | "target": "Pontmercy", 1320 | "metadata": { 1321 | "value": 1 1322 | } 1323 | }, 1324 | { 1325 | "source": "Mlle.Vaubois", 1326 | "target": "Mlle.Gillenormand", 1327 | "metadata": { 1328 | "value": 1 1329 | } 1330 | }, 1331 | { 1332 | "source": "Lt.Gillenormand", 1333 | "target": "Mlle.Gillenormand", 1334 | "metadata": { 1335 | "value": 2 1336 | } 1337 | }, 1338 | { 1339 | "source": "Lt.Gillenormand", 1340 | "target": "Gillenormand", 1341 | "metadata": { 1342 | "value": 1 1343 | } 1344 | }, 1345 | { 1346 | "source": "Lt.Gillenormand", 1347 | "target": "Cosette", 1348 | "metadata": { 1349 | "value": 1 1350 | } 1351 | }, 1352 | { 1353 | "source": "Marius", 1354 | "target": "Mlle.Gillenormand", 1355 | "metadata": { 1356 | "value": 6 1357 | } 1358 | }, 1359 | { 1360 | "source": "Marius", 1361 | "target": "Gillenormand", 1362 | "metadata": { 1363 | "value": 12 1364 | } 1365 | }, 1366 | { 1367 | "source": "Marius", 1368 | "target": "Pontmercy", 1369 | "metadata": { 1370 | "value": 1 1371 | } 1372 | }, 1373 | { 1374 | "source": "Marius", 1375 | "target": "Lt.Gillenormand", 1376 | "metadata": { 1377 | "value": 1 1378 | } 1379 | }, 1380 | { 1381 | "source": "Marius", 1382 | "target": "Cosette", 1383 | "metadata": { 1384 | "value": 21 1385 | } 1386 | }, 1387 | { 1388 | "source": "Marius", 1389 | "target": "Valjean", 1390 | "metadata": { 1391 | "value": 19 1392 | } 1393 | }, 1394 | { 1395 | "source": "Marius", 1396 | "target": "Tholomyes", 1397 | "metadata": { 1398 | "value": 1 1399 | } 1400 | }, 1401 | { 1402 | "source": "Marius", 1403 | "target": "Thenardier", 1404 | "metadata": { 1405 | "value": 2 1406 | } 1407 | }, 1408 | { 1409 | "source": "Marius", 1410 | "target": "Eponine", 1411 | "metadata": { 1412 | "value": 5 1413 | } 1414 | }, 1415 | { 1416 | "source": "Marius", 1417 | "target": "Gavroche", 1418 | "metadata": { 1419 | "value": 4 1420 | } 1421 | }, 1422 | { 1423 | "source": "BaronessT", 1424 | "target": "Gillenormand", 1425 | "metadata": { 1426 | "value": 1 1427 | } 1428 | }, 1429 | { 1430 | "source": "BaronessT", 1431 | "target": "Marius", 1432 | "metadata": { 1433 | "value": 1 1434 | } 1435 | }, 1436 | { 1437 | "source": "Mabeuf", 1438 | "target": "Marius", 1439 | "metadata": { 1440 | "value": 1 1441 | } 1442 | }, 1443 | { 1444 | "source": "Mabeuf", 1445 | "target": "Eponine", 1446 | "metadata": { 1447 | "value": 1 1448 | } 1449 | }, 1450 | { 1451 | "source": "Mabeuf", 1452 | "target": "Gavroche", 1453 | "metadata": { 1454 | "value": 1 1455 | } 1456 | }, 1457 | { 1458 | "source": "Enjolras", 1459 | "target": "Marius", 1460 | "metadata": { 1461 | "value": 7 1462 | } 1463 | }, 1464 | { 1465 | "source": "Enjolras", 1466 | "target": "Gavroche", 1467 | "metadata": { 1468 | "value": 7 1469 | } 1470 | }, 1471 | { 1472 | "source": "Enjolras", 1473 | "target": "Javert", 1474 | "metadata": { 1475 | "value": 6 1476 | } 1477 | }, 1478 | { 1479 | "source": "Enjolras", 1480 | "target": "Mabeuf", 1481 | "metadata": { 1482 | "value": 1 1483 | } 1484 | }, 1485 | { 1486 | "source": "Enjolras", 1487 | "target": "Valjean", 1488 | "metadata": { 1489 | "value": 4 1490 | } 1491 | }, 1492 | { 1493 | "source": "Combeferre", 1494 | "target": "Enjolras", 1495 | "metadata": { 1496 | "value": 15 1497 | } 1498 | }, 1499 | { 1500 | "source": "Combeferre", 1501 | "target": "Marius", 1502 | "metadata": { 1503 | "value": 5 1504 | } 1505 | }, 1506 | { 1507 | "source": "Combeferre", 1508 | "target": "Gavroche", 1509 | "metadata": { 1510 | "value": 6 1511 | } 1512 | }, 1513 | { 1514 | "source": "Combeferre", 1515 | "target": "Mabeuf", 1516 | "metadata": { 1517 | "value": 2 1518 | } 1519 | }, 1520 | { 1521 | "source": "Prouvaire", 1522 | "target": "Gavroche", 1523 | "metadata": { 1524 | "value": 1 1525 | } 1526 | }, 1527 | { 1528 | "source": "Prouvaire", 1529 | "target": "Enjolras", 1530 | "metadata": { 1531 | "value": 4 1532 | } 1533 | }, 1534 | { 1535 | "source": "Prouvaire", 1536 | "target": "Combeferre", 1537 | "metadata": { 1538 | "value": 2 1539 | } 1540 | }, 1541 | { 1542 | "source": "Feuilly", 1543 | "target": "Gavroche", 1544 | "metadata": { 1545 | "value": 2 1546 | } 1547 | }, 1548 | { 1549 | "source": "Feuilly", 1550 | "target": "Enjolras", 1551 | "metadata": { 1552 | "value": 6 1553 | } 1554 | }, 1555 | { 1556 | "source": "Feuilly", 1557 | "target": "Prouvaire", 1558 | "metadata": { 1559 | "value": 2 1560 | } 1561 | }, 1562 | { 1563 | "source": "Feuilly", 1564 | "target": "Combeferre", 1565 | "metadata": { 1566 | "value": 5 1567 | } 1568 | }, 1569 | { 1570 | "source": "Feuilly", 1571 | "target": "Mabeuf", 1572 | "metadata": { 1573 | "value": 1 1574 | } 1575 | }, 1576 | { 1577 | "source": "Feuilly", 1578 | "target": "Marius", 1579 | "metadata": { 1580 | "value": 1 1581 | } 1582 | }, 1583 | { 1584 | "source": "Courfeyrac", 1585 | "target": "Marius", 1586 | "metadata": { 1587 | "value": 9 1588 | } 1589 | }, 1590 | { 1591 | "source": "Courfeyrac", 1592 | "target": "Enjolras", 1593 | "metadata": { 1594 | "value": 17 1595 | } 1596 | }, 1597 | { 1598 | "source": "Courfeyrac", 1599 | "target": "Combeferre", 1600 | "metadata": { 1601 | "value": 13 1602 | } 1603 | }, 1604 | { 1605 | "source": "Courfeyrac", 1606 | "target": "Gavroche", 1607 | "metadata": { 1608 | "value": 7 1609 | } 1610 | }, 1611 | { 1612 | "source": "Courfeyrac", 1613 | "target": "Mabeuf", 1614 | "metadata": { 1615 | "value": 2 1616 | } 1617 | }, 1618 | { 1619 | "source": "Courfeyrac", 1620 | "target": "Eponine", 1621 | "metadata": { 1622 | "value": 1 1623 | } 1624 | }, 1625 | { 1626 | "source": "Courfeyrac", 1627 | "target": "Feuilly", 1628 | "metadata": { 1629 | "value": 6 1630 | } 1631 | }, 1632 | { 1633 | "source": "Courfeyrac", 1634 | "target": "Prouvaire", 1635 | "metadata": { 1636 | "value": 3 1637 | } 1638 | }, 1639 | { 1640 | "source": "Bahorel", 1641 | "target": "Combeferre", 1642 | "metadata": { 1643 | "value": 5 1644 | } 1645 | }, 1646 | { 1647 | "source": "Bahorel", 1648 | "target": "Gavroche", 1649 | "metadata": { 1650 | "value": 5 1651 | } 1652 | }, 1653 | { 1654 | "source": "Bahorel", 1655 | "target": "Courfeyrac", 1656 | "metadata": { 1657 | "value": 6 1658 | } 1659 | }, 1660 | { 1661 | "source": "Bahorel", 1662 | "target": "Mabeuf", 1663 | "metadata": { 1664 | "value": 2 1665 | } 1666 | }, 1667 | { 1668 | "source": "Bahorel", 1669 | "target": "Enjolras", 1670 | "metadata": { 1671 | "value": 4 1672 | } 1673 | }, 1674 | { 1675 | "source": "Bahorel", 1676 | "target": "Feuilly", 1677 | "metadata": { 1678 | "value": 3 1679 | } 1680 | }, 1681 | { 1682 | "source": "Bahorel", 1683 | "target": "Prouvaire", 1684 | "metadata": { 1685 | "value": 2 1686 | } 1687 | }, 1688 | { 1689 | "source": "Bahorel", 1690 | "target": "Marius", 1691 | "metadata": { 1692 | "value": 1 1693 | } 1694 | }, 1695 | { 1696 | "source": "Bossuet", 1697 | "target": "Marius", 1698 | "metadata": { 1699 | "value": 5 1700 | } 1701 | }, 1702 | { 1703 | "source": "Bossuet", 1704 | "target": "Courfeyrac", 1705 | "metadata": { 1706 | "value": 12 1707 | } 1708 | }, 1709 | { 1710 | "source": "Bossuet", 1711 | "target": "Gavroche", 1712 | "metadata": { 1713 | "value": 5 1714 | } 1715 | }, 1716 | { 1717 | "source": "Bossuet", 1718 | "target": "Bahorel", 1719 | "metadata": { 1720 | "value": 4 1721 | } 1722 | }, 1723 | { 1724 | "source": "Bossuet", 1725 | "target": "Enjolras", 1726 | "metadata": { 1727 | "value": 10 1728 | } 1729 | }, 1730 | { 1731 | "source": "Bossuet", 1732 | "target": "Feuilly", 1733 | "metadata": { 1734 | "value": 6 1735 | } 1736 | }, 1737 | { 1738 | "source": "Bossuet", 1739 | "target": "Prouvaire", 1740 | "metadata": { 1741 | "value": 2 1742 | } 1743 | }, 1744 | { 1745 | "source": "Bossuet", 1746 | "target": "Combeferre", 1747 | "metadata": { 1748 | "value": 9 1749 | } 1750 | }, 1751 | { 1752 | "source": "Bossuet", 1753 | "target": "Mabeuf", 1754 | "metadata": { 1755 | "value": 1 1756 | } 1757 | }, 1758 | { 1759 | "source": "Bossuet", 1760 | "target": "Valjean", 1761 | "metadata": { 1762 | "value": 1 1763 | } 1764 | }, 1765 | { 1766 | "source": "Joly", 1767 | "target": "Bahorel", 1768 | "metadata": { 1769 | "value": 5 1770 | } 1771 | }, 1772 | { 1773 | "source": "Joly", 1774 | "target": "Bossuet", 1775 | "metadata": { 1776 | "value": 7 1777 | } 1778 | }, 1779 | { 1780 | "source": "Joly", 1781 | "target": "Gavroche", 1782 | "metadata": { 1783 | "value": 3 1784 | } 1785 | }, 1786 | { 1787 | "source": "Joly", 1788 | "target": "Courfeyrac", 1789 | "metadata": { 1790 | "value": 5 1791 | } 1792 | }, 1793 | { 1794 | "source": "Joly", 1795 | "target": "Enjolras", 1796 | "metadata": { 1797 | "value": 5 1798 | } 1799 | }, 1800 | { 1801 | "source": "Joly", 1802 | "target": "Feuilly", 1803 | "metadata": { 1804 | "value": 5 1805 | } 1806 | }, 1807 | { 1808 | "source": "Joly", 1809 | "target": "Prouvaire", 1810 | "metadata": { 1811 | "value": 2 1812 | } 1813 | }, 1814 | { 1815 | "source": "Joly", 1816 | "target": "Combeferre", 1817 | "metadata": { 1818 | "value": 5 1819 | } 1820 | }, 1821 | { 1822 | "source": "Joly", 1823 | "target": "Mabeuf", 1824 | "metadata": { 1825 | "value": 1 1826 | } 1827 | }, 1828 | { 1829 | "source": "Joly", 1830 | "target": "Marius", 1831 | "metadata": { 1832 | "value": 2 1833 | } 1834 | }, 1835 | { 1836 | "source": "Grantaire", 1837 | "target": "Bossuet", 1838 | "metadata": { 1839 | "value": 3 1840 | } 1841 | }, 1842 | { 1843 | "source": "Grantaire", 1844 | "target": "Enjolras", 1845 | "metadata": { 1846 | "value": 3 1847 | } 1848 | }, 1849 | { 1850 | "source": "Grantaire", 1851 | "target": "Combeferre", 1852 | "metadata": { 1853 | "value": 1 1854 | } 1855 | }, 1856 | { 1857 | "source": "Grantaire", 1858 | "target": "Courfeyrac", 1859 | "metadata": { 1860 | "value": 2 1861 | } 1862 | }, 1863 | { 1864 | "source": "Grantaire", 1865 | "target": "Joly", 1866 | "metadata": { 1867 | "value": 2 1868 | } 1869 | }, 1870 | { 1871 | "source": "Grantaire", 1872 | "target": "Gavroche", 1873 | "metadata": { 1874 | "value": 1 1875 | } 1876 | }, 1877 | { 1878 | "source": "Grantaire", 1879 | "target": "Bahorel", 1880 | "metadata": { 1881 | "value": 1 1882 | } 1883 | }, 1884 | { 1885 | "source": "Grantaire", 1886 | "target": "Feuilly", 1887 | "metadata": { 1888 | "value": 1 1889 | } 1890 | }, 1891 | { 1892 | "source": "Grantaire", 1893 | "target": "Prouvaire", 1894 | "metadata": { 1895 | "value": 1 1896 | } 1897 | }, 1898 | { 1899 | "source": "MotherPlutarch", 1900 | "target": "Mabeuf", 1901 | "metadata": { 1902 | "value": 3 1903 | } 1904 | }, 1905 | { 1906 | "source": "Gueulemer", 1907 | "target": "Thenardier", 1908 | "metadata": { 1909 | "value": 5 1910 | } 1911 | }, 1912 | { 1913 | "source": "Gueulemer", 1914 | "target": "Valjean", 1915 | "metadata": { 1916 | "value": 1 1917 | } 1918 | }, 1919 | { 1920 | "source": "Gueulemer", 1921 | "target": "Mme.Thenardier", 1922 | "metadata": { 1923 | "value": 1 1924 | } 1925 | }, 1926 | { 1927 | "source": "Gueulemer", 1928 | "target": "Javert", 1929 | "metadata": { 1930 | "value": 1 1931 | } 1932 | }, 1933 | { 1934 | "source": "Gueulemer", 1935 | "target": "Gavroche", 1936 | "metadata": { 1937 | "value": 1 1938 | } 1939 | }, 1940 | { 1941 | "source": "Gueulemer", 1942 | "target": "Eponine", 1943 | "metadata": { 1944 | "value": 1 1945 | } 1946 | }, 1947 | { 1948 | "source": "Babet", 1949 | "target": "Thenardier", 1950 | "metadata": { 1951 | "value": 6 1952 | } 1953 | }, 1954 | { 1955 | "source": "Babet", 1956 | "target": "Gueulemer", 1957 | "metadata": { 1958 | "value": 6 1959 | } 1960 | }, 1961 | { 1962 | "source": "Babet", 1963 | "target": "Valjean", 1964 | "metadata": { 1965 | "value": 1 1966 | } 1967 | }, 1968 | { 1969 | "source": "Babet", 1970 | "target": "Mme.Thenardier", 1971 | "metadata": { 1972 | "value": 1 1973 | } 1974 | }, 1975 | { 1976 | "source": "Babet", 1977 | "target": "Javert", 1978 | "metadata": { 1979 | "value": 2 1980 | } 1981 | }, 1982 | { 1983 | "source": "Babet", 1984 | "target": "Gavroche", 1985 | "metadata": { 1986 | "value": 1 1987 | } 1988 | }, 1989 | { 1990 | "source": "Babet", 1991 | "target": "Eponine", 1992 | "metadata": { 1993 | "value": 1 1994 | } 1995 | }, 1996 | { 1997 | "source": "Claquesous", 1998 | "target": "Thenardier", 1999 | "metadata": { 2000 | "value": 4 2001 | } 2002 | }, 2003 | { 2004 | "source": "Claquesous", 2005 | "target": "Babet", 2006 | "metadata": { 2007 | "value": 4 2008 | } 2009 | }, 2010 | { 2011 | "source": "Claquesous", 2012 | "target": "Gueulemer", 2013 | "metadata": { 2014 | "value": 4 2015 | } 2016 | }, 2017 | { 2018 | "source": "Claquesous", 2019 | "target": "Valjean", 2020 | "metadata": { 2021 | "value": 1 2022 | } 2023 | }, 2024 | { 2025 | "source": "Claquesous", 2026 | "target": "Mme.Thenardier", 2027 | "metadata": { 2028 | "value": 1 2029 | } 2030 | }, 2031 | { 2032 | "source": "Claquesous", 2033 | "target": "Javert", 2034 | "metadata": { 2035 | "value": 1 2036 | } 2037 | }, 2038 | { 2039 | "source": "Claquesous", 2040 | "target": "Eponine", 2041 | "metadata": { 2042 | "value": 1 2043 | } 2044 | }, 2045 | { 2046 | "source": "Claquesous", 2047 | "target": "Enjolras", 2048 | "metadata": { 2049 | "value": 1 2050 | } 2051 | }, 2052 | { 2053 | "source": "Montparnasse", 2054 | "target": "Javert", 2055 | "metadata": { 2056 | "value": 1 2057 | } 2058 | }, 2059 | { 2060 | "source": "Montparnasse", 2061 | "target": "Babet", 2062 | "metadata": { 2063 | "value": 2 2064 | } 2065 | }, 2066 | { 2067 | "source": "Montparnasse", 2068 | "target": "Gueulemer", 2069 | "metadata": { 2070 | "value": 2 2071 | } 2072 | }, 2073 | { 2074 | "source": "Montparnasse", 2075 | "target": "Claquesous", 2076 | "metadata": { 2077 | "value": 2 2078 | } 2079 | }, 2080 | { 2081 | "source": "Montparnasse", 2082 | "target": "Valjean", 2083 | "metadata": { 2084 | "value": 1 2085 | } 2086 | }, 2087 | { 2088 | "source": "Montparnasse", 2089 | "target": "Gavroche", 2090 | "metadata": { 2091 | "value": 1 2092 | } 2093 | }, 2094 | { 2095 | "source": "Montparnasse", 2096 | "target": "Eponine", 2097 | "metadata": { 2098 | "value": 1 2099 | } 2100 | }, 2101 | { 2102 | "source": "Montparnasse", 2103 | "target": "Thenardier", 2104 | "metadata": { 2105 | "value": 1 2106 | } 2107 | }, 2108 | { 2109 | "source": "Toussaint", 2110 | "target": "Cosette", 2111 | "metadata": { 2112 | "value": 2 2113 | } 2114 | }, 2115 | { 2116 | "source": "Toussaint", 2117 | "target": "Javert", 2118 | "metadata": { 2119 | "value": 1 2120 | } 2121 | }, 2122 | { 2123 | "source": "Toussaint", 2124 | "target": "Valjean", 2125 | "metadata": { 2126 | "value": 1 2127 | } 2128 | }, 2129 | { 2130 | "source": "Child1", 2131 | "target": "Gavroche", 2132 | "metadata": { 2133 | "value": 2 2134 | } 2135 | }, 2136 | { 2137 | "source": "Child2", 2138 | "target": "Gavroche", 2139 | "metadata": { 2140 | "value": 2 2141 | } 2142 | }, 2143 | { 2144 | "source": "Child2", 2145 | "target": "Child1", 2146 | "metadata": { 2147 | "value": 3 2148 | } 2149 | }, 2150 | { 2151 | "source": "Brujon", 2152 | "target": "Babet", 2153 | "metadata": { 2154 | "value": 3 2155 | } 2156 | }, 2157 | { 2158 | "source": "Brujon", 2159 | "target": "Gueulemer", 2160 | "metadata": { 2161 | "value": 3 2162 | } 2163 | }, 2164 | { 2165 | "source": "Brujon", 2166 | "target": "Thenardier", 2167 | "metadata": { 2168 | "value": 3 2169 | } 2170 | }, 2171 | { 2172 | "source": "Brujon", 2173 | "target": "Gavroche", 2174 | "metadata": { 2175 | "value": 1 2176 | } 2177 | }, 2178 | { 2179 | "source": "Brujon", 2180 | "target": "Eponine", 2181 | "metadata": { 2182 | "value": 1 2183 | } 2184 | }, 2185 | { 2186 | "source": "Brujon", 2187 | "target": "Claquesous", 2188 | "metadata": { 2189 | "value": 1 2190 | } 2191 | }, 2192 | { 2193 | "source": "Brujon", 2194 | "target": "Montparnasse", 2195 | "metadata": { 2196 | "value": 1 2197 | } 2198 | }, 2199 | { 2200 | "source": "Mme.Hucheloup", 2201 | "target": "Bossuet", 2202 | "metadata": { 2203 | "value": 1 2204 | } 2205 | }, 2206 | { 2207 | "source": "Mme.Hucheloup", 2208 | "target": "Joly", 2209 | "metadata": { 2210 | "value": 1 2211 | } 2212 | }, 2213 | { 2214 | "source": "Mme.Hucheloup", 2215 | "target": "Grantaire", 2216 | "metadata": { 2217 | "value": 1 2218 | } 2219 | }, 2220 | { 2221 | "source": "Mme.Hucheloup", 2222 | "target": "Bahorel", 2223 | "metadata": { 2224 | "value": 1 2225 | } 2226 | }, 2227 | { 2228 | "source": "Mme.Hucheloup", 2229 | "target": "Courfeyrac", 2230 | "metadata": { 2231 | "value": 1 2232 | } 2233 | }, 2234 | { 2235 | "source": "Mme.Hucheloup", 2236 | "target": "Gavroche", 2237 | "metadata": { 2238 | "value": 1 2239 | } 2240 | }, 2241 | { 2242 | "source": "Mme.Hucheloup", 2243 | "target": "Enjolras", 2244 | "metadata": { 2245 | "value": 1 2246 | } 2247 | } 2248 | ] 2249 | } 2250 | } 2251 | -------------------------------------------------------------------------------- /examples/test.network.json: -------------------------------------------------------------------------------- 1 | { 2 | "graph": { 3 | "nodes": { 4 | "p(HGNC:LTA)": { 5 | "metadata": { 6 | "yloc": 105, 7 | "xloc": 265 8 | }, 9 | "label": "p(HGNC:LTA)" 10 | }, 11 | "r(HGNC:IFNG)": { 12 | "metadata": { 13 | "yloc": 30, 14 | "xloc": 45 15 | }, 16 | "label": "r(HGNC:IFNG)" 17 | }, 18 | "bp(GO:\"T-helper 1 type immune response\")": { 19 | "metadata": { 20 | "yloc": 230, 21 | "xloc": 165 22 | }, 23 | "label": "bp(GO:\"T-helper 1 type immune response\")" 24 | }, 25 | "r(HGNC:LTA)": { 26 | "metadata": { 27 | "yloc": 30, 28 | "xloc": 265 29 | }, 30 | "label": "r(HGNC:LTA)" 31 | }, 32 | "r(HGNC:IL2)": { 33 | "metadata": { 34 | "yloc": 30, 35 | "xloc": 155 36 | }, 37 | "label": "r(HGNC:IL2)" 38 | }, 39 | "r(HGNC:LTB)": { 40 | "metadata": { 41 | "yloc": 30, 42 | "xloc": 375 43 | }, 44 | "label": "r(HGNC:LTB)" 45 | }, 46 | "p(HGNC:IFNG)": { 47 | "metadata": { 48 | "yloc": 105, 49 | "xloc": 45 50 | }, 51 | "label": "p(HGNC:IFNG)" 52 | }, 53 | "p(HGNC:IL2)": { 54 | "metadata": { 55 | "yloc": 105, 56 | "xloc": 155 57 | }, 58 | "label": "p(HGNC:IL2)" 59 | }, 60 | "p(HGNC:LTB)": { 61 | "metadata": { 62 | "yloc": 105, 63 | "xloc": 375 64 | }, 65 | "label": "p(HGNC:LTB)" 66 | } 67 | }, 68 | "edges": [{ 69 | "source": "r(HGNC:IL2)", 70 | "relation": "translatedTo", 71 | "target": "p(HGNC:IL2)", 72 | "metadata": { 73 | "evidences": [{ 74 | "bel_statement": "r(HGNC:IL2) translatedTo p(HGNC:IL2)", 75 | "citation": { 76 | "type": "Online Resource", 77 | "id": "http://www.ncbi.nlm.nih.gov/gene/", 78 | "name": "NCBI Entrez Gene" 79 | }, 80 | "experiment_context": { 81 | "SpeciesName": "Mouse", 82 | "Species": "10090" 83 | } 84 | }, { 85 | "bel_statement": "r(HGNC:IL2) translatedTo p(HGNC:IL2)", 86 | "citation": { 87 | "type": "Online Resource", 88 | "id": "http://www.ncbi.nlm.nih.gov/gene/", 89 | "name": "NCBI Entrez Gene" 90 | }, 91 | "experiment_context": { 92 | "SpeciesName": "Human", 93 | "Species": "9606" 94 | } 95 | }, { 96 | "bel_statement": "r(HGNC:IL2) translatedTo p(HGNC:IL2)", 97 | "citation": { 98 | "type": "Online Resource", 99 | "id": "http://www.ncbi.nlm.nih.gov/gene/", 100 | "name": "NCBI Entrez Gene" 101 | }, 102 | "experiment_context": { 103 | "SpeciesName": "Rat", 104 | "Species": "10116" 105 | } 106 | }] 107 | } 108 | }, { 109 | "source": "p(HGNC:LTA)", 110 | "relation": "increases", 111 | "target": "bp(GO:\"T-helper 1 type immune response\")", 112 | "metadata": { 113 | "evidences": [{ 114 | "bel_statement": "p(HGNC:LTA) increases bp(GO:\"T-helper 1 type immune response\")", 115 | "citation": { 116 | "type": "PubMed", 117 | "id": "15745050", 118 | "name": "Acta Virol 2004 48(4) 263-6" 119 | }, 120 | "summary_text": "IM shows a mainly Th1-type profile, so Th1-type cytokines such as interleukin-2 (IL-2), interferon-gamma (IFN-gamma), and lymphotoxin (LT) are moderately enhanced. ", 121 | "experiment_context": { 122 | "Cell": "Th1 cell", 123 | "SpeciesName": "Human", 124 | "Species": "9606" 125 | }, 126 | "metadata": { 127 | "reviewer": "dpncab" 128 | } 129 | }] 130 | } 131 | }, { 132 | "source": "p(HGNC:IFNG)", 133 | "relation": "increases", 134 | "target": "bp(GO:\"T-helper 1 type immune response\")", 135 | "metadata": { 136 | "evidences": [{ 137 | "bel_statement": "p(HGNC:IFNG) increases bp(GO:\"T-helper 1 type immune response\")", 138 | "citation": { 139 | "type": "PubMed", 140 | "id": "15745050", 141 | "name": "Acta Virol 2004 48(4) 263-6" 142 | }, 143 | "experiment_context": { 144 | "Cell": "Th1 cell", 145 | "SpeciesName": "Human", 146 | "Species": "9606" 147 | }, 148 | "summary_text": "IM shows a mainly Th1-type profile, so Th1-type cytokines such as interleukin-2 (IL-2), interferon-gamma (IFN-gamma), and lymphotoxin (LT) are moderately enhanced. " 149 | }, { 150 | "bel_statement": "p(HGNC:IFNG) increases bp(GO:\"T-helper 1 type immune response\")", 151 | "citation": { 152 | "type": "PubMed", 153 | "id": "11739273", 154 | "name": "Circ Res 2001 Dec 7 89(12) 1092-103" 155 | }, 156 | "experiment_context": { 157 | "Cell": "Endothelial Cells", 158 | "SpeciesName": "Human", 159 | "Species": "9606" 160 | }, 161 | "summary_text": "IL-12p40, dimerized with the IL-12p35 subunit, triggers synthesis of IFN-, a cytokine that not only directly promotes Th1 responses, but further elevates CD40 levels" 162 | }, { 163 | "bel_statement": "p(HGNC:IFNG) increases bp(GO:\"T-helper 1 type immune response\")", 164 | "citation": { 165 | "type": "PubMed", 166 | "id": "10756059", 167 | "name": "J Virol 2000 May 74(9) 4429-32" 168 | }, 169 | "experiment_context": { 170 | "Cell": "Th1 cell", 171 | "SpeciesName": "Mouse", 172 | "Species": "10090" 173 | }, 174 | "summary_text": "Analysis of C57BL/6 mice acutely infected with lymphocytic choriomeningitis virus (LCMV) by using intracellular cytokine staining revealed a high frequency (2 to 10%) of CD4(+) T cells secreting the Th1-associated cytokines interleukin-2 (IL-2), gamma interferon (IFN-gamma), and tumor necrosis factor alpha, with no concomitant increase in the frequency of CD4(+) T cells secreting the Th2-associated cytokines IL-4, IL-5, and IL-10 following stimulation with viral peptides." 175 | }, { 176 | "bel_statement": "p(HGNC:IFNG) increases bp(GO:\"T-helper 1 type immune response\")", 177 | "citation": { 178 | "type": "PubMed", 179 | "id": "10077627", 180 | "name": "Proc Natl Acad Sci U S A 1999 Mar 16 96(6) 3006-11" 181 | }, 182 | "experiment_context": { 183 | "Cell": "Th1 cell", 184 | "SpeciesName": "Mouse", 185 | "Species": "10090" 186 | }, 187 | "summary_text": "CyCAP is a widely expressed secreted glycoprotein that modulates the host response to endotoxin gene-targeted CyCAP-deficient mice are more sensitive to the lethal effects of endotoxin in response to endotoxin, CyCAP-deficient mice overproduce interleukin 12 and interferon-gamma systemically and tumor necrosis factor alpha locally, these are proinflammatory molecules that also promote T helper 1 responses" 188 | }, { 189 | "bel_statement": "p(HGNC:IFNG) increases bp(GO:\"T-helper 1 type immune response\")", 190 | "citation": { 191 | "type": "PubMed", 192 | "id": "11057672", 193 | "name": "Nature 2000 Oct 19 407(6806) 916-20" 194 | }, 195 | "experiment_context": { 196 | "Cell": "Th1 cell", 197 | "SpeciesName": "Human", 198 | "Species": "9606" 199 | }, 200 | "summary_text": "Th1 cells produce interleukin (IL)-2, interferon-gamma (IFN-gamma) and lymphotoxin-beta, which mediate pro-inflammatory functions critical for the development of cell-mediated immune responses, whereas Th2 cells secrete cytokines such as IL-4, IL-5 and IL-10 that enhance humoral immunity." 201 | }, { 202 | "bel_statement": "p(HGNC:IFNG) increases bp(GO:\"T-helper 1 type immune response\")", 203 | "citation": { 204 | "type": "PubMed", 205 | "id": "11397944", 206 | "name": "Science 2001 Jun 8 292(5523) 1907-10" 207 | }, 208 | "experiment_context": { 209 | "Cell": "Th1 cell", 210 | "SpeciesName": "Human", 211 | "Species": "9606" 212 | }, 213 | "summary_text": "TH1 cells express IFN-g and mediate cellular immunity. TH2 cells express IL-4, IL-5, and IL-13 and mediate nonphagocytic immunity." 214 | }] 215 | } 216 | }, { 217 | "source": "p(HGNC:IL2)", 218 | "relation": "increases", 219 | "target": "bp(GO:\"T-helper 1 type immune response\")", 220 | "metadata": { 221 | "evidences": [{ 222 | "bel_statement": "p(HGNC:IL2) increases bp(GO:\"T-helper 1 type immune response\")", 223 | "citation": { 224 | "type": "PubMed", 225 | "id": "15745050", 226 | "name": "Acta Virol 2004 48(4) 263-6" 227 | }, 228 | "experiment_context": { 229 | "Cell": "Th1 cell", 230 | "SpeciesName": "Human", 231 | "Species": "9606" 232 | }, 233 | "summary_text": "IM shows a mainly Th1-type profile, so Th1-type cytokines such as interleukin-2 (IL-2), interferon-gamma (IFN-gamma), and lymphotoxin (LT) are moderately enhanced. " 234 | }, { 235 | "bel_statement": "p(HGNC:IL2) increases bp(GO:\"T-helper 1 type immune response\")", 236 | "citation": { 237 | "type": "PubMed", 238 | "id": "11057672", 239 | "name": "Nature 2000 Oct 19 407(6806) 916-20" 240 | }, 241 | "experiment_context": { 242 | "Cell": "Th1 cell", 243 | "SpeciesName": "Human", 244 | "Species": "9606" 245 | }, 246 | "summary_text": "Th1 cells produce interleukin (IL)-2, interferon-gamma (IFN-gamma) and lymphotoxin-beta, which mediate pro-inflammatory functions critical for the development of cell-mediated immune responses, whereas Th2 cells secrete cytokines such as IL-4, IL-5 and IL-10 that enhance humoral immunity." 247 | }, { 248 | "bel_statement": "p(HGNC:IL2) increases bp(GO:\"T-helper 1 type immune response\")", 249 | "citation": { 250 | "type": "PubMed", 251 | "id": "9144387", 252 | "name": "Biochem Biophys Res Commun 1997 Apr 7 233(1) 14-9" 253 | }, 254 | "experiment_context": { 255 | "Cell": "Th1 cell", 256 | "SpeciesName": "Human", 257 | "Species": "9606" 258 | }, 259 | "summary_text": "Furthermore, NO inhibits the proliferation of, and production of interleukin-2 (IL-2) and interferon-gamma by, Th1 but not Th2 cells." 260 | }, { 261 | "bel_statement": "p(HGNC:IL2) increases bp(GO:\"T-helper 1 type immune response\")", 262 | "citation": { 263 | "type": "PubMed", 264 | "id": "10756059", 265 | "name": "J Virol 2000 May 74(9) 4429-32" 266 | }, 267 | "experiment_context": { 268 | "Cell": "Th1 cell", 269 | "SpeciesName": "Mouse", 270 | "Species": "10090" 271 | }, 272 | "summary_text": "Analysis of C57BL/6 mice acutely infected with lymphocytic choriomeningitis virus (LCMV) by using intracellular cytokine staining revealed a high frequency (2 to 10%) of CD4(+) T cells secreting the Th1-associated cytokines interleukin-2 (IL-2), gamma interferon (IFN-gamma), and tumor necrosis factor alpha, with no concomitant increase in the frequency of CD4(+) T cells secreting the Th2-associated cytokines IL-4, IL-5, and IL-10 following stimulation with viral peptides." 273 | }] 274 | } 275 | }, { 276 | "source": "r(HGNC:LTB)", 277 | "relation": "translatedTo", 278 | "target": "p(HGNC:LTB)", 279 | "metadata": { 280 | "evidences": [{ 281 | "bel_statement": "r(HGNC:LTB) translatedTo p(HGNC:LTB)", 282 | "citation": { 283 | "type": "Online Resource", 284 | "id": "http://www.ncbi.nlm.nih.gov/gene/", 285 | "name": "NCBI Entrez Gene" 286 | }, 287 | "experiment_context": { 288 | "SpeciesName": "Rat", 289 | "Species": "10116" 290 | } 291 | }, { 292 | "bel_statement": "r(HGNC:LTB) translatedTo p(HGNC:LTB)", 293 | "citation": { 294 | "type": "Online Resource", 295 | "id": "http://www.ncbi.nlm.nih.gov/gene/", 296 | "name": "NCBI Entrez Gene" 297 | }, 298 | "experiment_context": { 299 | "SpeciesName": "Human", 300 | "Species": "9606" 301 | } 302 | }, { 303 | "bel_statement": "r(HGNC:LTB) translatedTo p(HGNC:LTB)", 304 | "citation": { 305 | "type": "Online Resource", 306 | "id": "http://www.ncbi.nlm.nih.gov/gene/", 307 | "name": "NCBI Entrez Gene" 308 | }, 309 | "experiment_context": { 310 | "SpeciesName": "Mouse", 311 | "Species": "10090" 312 | } 313 | }] 314 | } 315 | }, { 316 | "source": "r(HGNC:IFNG)", 317 | "relation": "translatedTo", 318 | "target": "p(HGNC:IFNG)", 319 | "metadata": { 320 | "evidences": [{ 321 | "bel_statement": "r(HGNC:IFNG) translatedTo p(HGNC:IFNG)", 322 | "citation": { 323 | "type": "Online Resource", 324 | "id": "http://www.ncbi.nlm.nih.gov/gene/", 325 | "name": "NCBI Entrez Gene" 326 | }, 327 | "experiment_context": { 328 | "SpeciesName": "Mouse", 329 | "Species": "10090" 330 | } 331 | }, { 332 | "bel_statement": "r(HGNC:IFNG) translatedTo p(HGNC:IFNG)", 333 | "citation": { 334 | "type": "Online Resource", 335 | "id": "http://www.ncbi.nlm.nih.gov/gene/", 336 | "name": "NCBI Entrez Gene" 337 | }, 338 | "experiment_context": { 339 | "SpeciesName": "Human", 340 | "Species": "9606" 341 | } 342 | }, { 343 | "bel_statement": "r(HGNC:IFNG) translatedTo p(HGNC:IFNG)", 344 | "citation": { 345 | "type": "Online Resource", 346 | "id": "http://www.ncbi.nlm.nih.gov/gene/", 347 | "name": "NCBI Entrez Gene" 348 | }, 349 | "experiment_context": { 350 | "SpeciesName": "Rat", 351 | "Species": "10116" 352 | } 353 | }] 354 | } 355 | }, { 356 | "source": "p(HGNC:LTB)", 357 | "relation": "increases", 358 | "target": "bp(GO:\"T-helper 1 type immune response\")", 359 | "metadata": { 360 | "evidences": [{ 361 | "bel_statement": "p(HGNC:LTB) increases bp(GO:\"T-helper 1 type immune response\")", 362 | "citation": { 363 | "type": "PubMed", 364 | "id": "11057672", 365 | "name": "Nature 2000 Oct 19 407(6806) 916-20" 366 | }, 367 | "experiment_context": { 368 | "Cell": "Th1 cell", 369 | "SpeciesName": "Human", 370 | "Species": "9606" 371 | }, 372 | "summary_text": "Th1 cells produce interleukin (IL)-2, interferon-gamma (IFN-gamma) and lymphotoxin-beta, which mediate pro-inflammatory functions critical for the development of cell-mediated immune responses, whereas Th2 cells secrete cytokines such as IL-4, IL-5 and IL-10 that enhance humoral immunity." 373 | }] 374 | } 375 | }, { 376 | "source": "r(HGNC:LTA)", 377 | "relation": "translatedTo", 378 | "target": "p(HGNC:LTA)", 379 | "metadata": { 380 | "evidences": [{ 381 | "bel_statement": "r(HGNC:LTA) translatedTo p(HGNC:LTA)", 382 | "citation": { 383 | "type": "Online Resource", 384 | "id": "http://www.ncbi.nlm.nih.gov/gene/", 385 | "name": "NCBI Entrez Gene" 386 | }, 387 | "experiment_context": { 388 | "SpeciesName": "Human", 389 | "Species": "9606" 390 | } 391 | }, { 392 | "bel_statement": "r(HGNC:LTA) translatedTo p(HGNC:LTA)", 393 | "citation": { 394 | "type": "Online Resource", 395 | "id": "http://www.ncbi.nlm.nih.gov/gene/", 396 | "name": "NCBI Entrez Gene" 397 | }, 398 | "experiment_context": { 399 | "SpeciesName": "Mouse", 400 | "Species": "10090" 401 | } 402 | }, { 403 | "bel_statement": "r(HGNC:LTA) translatedTo p(HGNC:LTA)", 404 | "citation": { 405 | "type": "Online Resource", 406 | "id": "http://www.ncbi.nlm.nih.gov/gene/", 407 | "name": "NCBI Entrez Gene" 408 | }, 409 | "experiment_context": { 410 | "SpeciesName": "Rat", 411 | "Species": "10116" 412 | } 413 | }] 414 | } 415 | }], 416 | "type": "BEL-V1.0", 417 | "metadata": { 418 | "customer": "Philip Morris International", 419 | "speciesName": "Human", 420 | "description": "The Th1 response model depicts the causal mechanisms that occur following activation of Th1 cells in response to upstream signals, including IFNG, IL2, LTA, and LTB.", 421 | "modelVersion": "3.0", 422 | "graphCreatedByEmail": "tthomson@genstruct.com", 423 | "graphCreatedAt": "1305578028000", 424 | "graphCreatedBy": "Ty Thomson", 425 | "graphUpdatedBy": "Ty Thomson", 426 | "reference_node": "bp(GO:\"T-helper 1 type immune response\")", 427 | "graphUpdatedByEmail": "tthomson@genstruct.com", 428 | "graphProject": "System Models Project", 429 | "graphUpdatedAt": "1305578028000", 430 | "species": 9606, 431 | "bel_version": "1.0" 432 | } 433 | } 434 | } 435 | -------------------------------------------------------------------------------- /examples/usual_suspects.json: -------------------------------------------------------------------------------- 1 | { 2 | "graph": { 3 | "id": "Usual Suspects", 4 | "type": "movie characters", 5 | "label": "Usual Suspects", 6 | "nodes": { 7 | "Roger Kint": { 8 | "label": "Roger Kint", 9 | "metadata": { 10 | "nickname": "Verbal", 11 | "actor": "Kevin Spacey" 12 | } 13 | }, 14 | "Keyser Söze": { 15 | "label": "Keyser Söze", 16 | "metadata": { 17 | "actor": "Kevin Spacey" 18 | } 19 | } 20 | }, 21 | "edges": [ 22 | { 23 | "source": "Roger Kint", 24 | "target": "Keyser Söze", 25 | "relation": "is" 26 | } 27 | ], 28 | "metadata": { 29 | "release year": "1995" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /json-graph-schema_v1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema", 3 | "oneOf": [ 4 | { 5 | "type": "object", 6 | "properties": { 7 | "graph": { 8 | "$ref": "#/definitions/graph" 9 | } 10 | }, 11 | "additionalProperties": false, 12 | "required": ["graph"] 13 | }, 14 | { 15 | "type": "object", 16 | "properties": { 17 | "label": { 18 | "type": "string" 19 | }, 20 | "type": { 21 | "type": "string" 22 | }, 23 | "metadata": { 24 | "type": ["object", "null"] 25 | }, 26 | "graphs": { 27 | "type": "array", 28 | "items": { 29 | "$ref": "#/definitions/graph" 30 | } 31 | } 32 | }, 33 | "additionalProperties": false 34 | } 35 | ], 36 | "definitions": { 37 | "graph": { 38 | "type": "object", 39 | "additionalProperties": false, 40 | "properties": { 41 | "label": { 42 | "type": "string" 43 | }, 44 | "directed": { 45 | "type": ["boolean", "null"], 46 | "default": true 47 | }, 48 | "type": { 49 | "type": "string" 50 | }, 51 | "metadata": { 52 | "type": ["object", "null"] 53 | }, 54 | "nodes": { 55 | "type": ["array", "null"], 56 | "items": { 57 | "type": "object", 58 | "additionalProperties": false, 59 | "properties": { 60 | "id": { 61 | "type": "string" 62 | }, 63 | "label": { 64 | "type": "string" 65 | }, 66 | "metadata": { 67 | "type": ["object", "null"] 68 | } 69 | }, 70 | "required": ["id"] 71 | } 72 | }, 73 | "edges": { 74 | "type": ["array", "null"], 75 | "items": { 76 | "type": "object", 77 | "additionalProperties": false, 78 | "properties": { 79 | "id": { 80 | "type": "string" 81 | }, 82 | "source": { 83 | "type": "string" 84 | }, 85 | "target": { 86 | "type": "string" 87 | }, 88 | "relation": { 89 | "type": "string" 90 | }, 91 | "directed": { 92 | "type": ["boolean", "null"], 93 | "default": true 94 | }, 95 | "label": { 96 | "type": "string" 97 | }, 98 | "metadata": { 99 | "type": ["object", "null"] 100 | } 101 | }, 102 | "required": ["source", "target"] 103 | } 104 | } 105 | } 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /json-graph-schema_v2.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "http://jsongraphformat.info/v2.1/json-graph-schema.json", 4 | "title": "JSON Graph Schema", 5 | "oneOf": [ 6 | { 7 | "type": "object", 8 | "properties": { 9 | "graph": { "$ref": "#/definitions/graph" } 10 | }, 11 | "additionalProperties": false, 12 | "required": [ 13 | "graph" 14 | ] 15 | }, 16 | { 17 | "type": "object", 18 | "properties": { 19 | "graphs": { 20 | "type": "array", 21 | "items": { "$ref": "#/definitions/graph" } 22 | } 23 | }, 24 | "additionalProperties": false 25 | } 26 | ], 27 | "definitions": { 28 | "graph": { 29 | "oneOf": [ 30 | { 31 | "type": "object", 32 | "additionalProperties": false, 33 | "properties": { 34 | "id": { "type": "string" }, 35 | "label": { "type": "string" }, 36 | "directed": { "type": [ "boolean" ], "default": true }, 37 | "type": { "type": "string" }, 38 | "metadata": { "type": [ "object" ] }, 39 | "nodes": { 40 | "type": "object", 41 | "additionalProperties": { "$ref": "#/definitions/node" } 42 | }, 43 | "edges": { 44 | "type": [ "array" ], 45 | "items": { "$ref": "#/definitions/edge" } 46 | } 47 | } 48 | }, 49 | { 50 | "type": "object", 51 | "additionalProperties": false, 52 | "properties": { 53 | "id": { "type": "string" }, 54 | "label": { "type": "string" }, 55 | "directed": { "type": [ "boolean" ], "default": true }, 56 | "type": { "type": "string" }, 57 | "metadata": { "type": [ "object" ] }, 58 | "nodes": { 59 | "type": "object", 60 | "additionalProperties": { "$ref": "#/definitions/node" } 61 | }, 62 | "hyperedges": { 63 | "type": [ "array" ], 64 | "items": { "$ref": "#/definitions/directedhyperedge" } 65 | } 66 | } 67 | }, 68 | { 69 | "type": "object", 70 | "additionalProperties": false, 71 | "properties": { 72 | "id": { "type": "string" }, 73 | "label": { "type": "string" }, 74 | "directed": { "type": [ "boolean" ], "enum": [false] }, 75 | "type": { "type": "string" }, 76 | "metadata": { "type": [ "object" ] }, 77 | "nodes": { 78 | "type": "object", 79 | "additionalProperties": { "$ref": "#/definitions/node" } 80 | }, 81 | "hyperedges": { 82 | "type": [ "array" ], 83 | "items": { "$ref": "#/definitions/undirectedhyperedge" } 84 | } 85 | }, 86 | "required": [ "directed" ] 87 | } 88 | ] 89 | }, 90 | "node": { 91 | "type": "object", 92 | "properties": { 93 | "label": { "type": "string" }, 94 | "metadata": { "type": "object" }, 95 | "additionalProperties": false 96 | } 97 | }, 98 | "edge": { 99 | "type": "object", 100 | "additionalProperties": false, 101 | "properties": { 102 | "id": { "type": "string" }, 103 | "source": { "type": "string" }, 104 | "target": { "type": "string" }, 105 | "relation": { "type": "string" }, 106 | "directed": { "type": [ "boolean" ], "default": true }, 107 | "label": { "type": "string" }, 108 | "metadata": { "type": [ "object" ] } 109 | }, 110 | "required": [ "source", "target" ] 111 | }, 112 | "directedhyperedge": { 113 | "type": "object", 114 | "additionalProperties": false, 115 | "properties": { 116 | "id": { "type": "string" }, 117 | "source": { "type": "array", "items": { "type": "string" } }, 118 | "target": { "type": "array", "items": { "type": "string" } }, 119 | "relation": { "type": "string" }, 120 | "label": { "type": "string" }, 121 | "metadata": { "type": [ "object" ] } 122 | }, 123 | "required": [ "source", "target" ] 124 | }, 125 | "undirectedhyperedge": { 126 | "type": "object", 127 | "additionalProperties": false, 128 | "properties": { 129 | "id": { "type": "string" }, 130 | "nodes": { "type": "array", "items": { "type": "string" } }, 131 | "relation": { "type": "string" }, 132 | "label": { "type": "string" }, 133 | "metadata": { "type": [ "object" ] } 134 | }, 135 | "required": [ "nodes" ] 136 | } 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "json-graph-specification", 3 | "version": "1.0.0", 4 | "description": "This JSON Graph Format is focused on capturing basic graph structure in a convenient to use format.", 5 | "main": "json-graph-schema.json", 6 | "directories": { 7 | "example": "examples" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/jsongraph/json-graph-specification.git" 15 | }, 16 | "keywords": [ 17 | "json", 18 | "graph", 19 | "schema", 20 | "nodes" 21 | ], 22 | "bugs": { 23 | "url": "https://github.com/jsongraph/json-graph-specification/issues" 24 | }, 25 | "homepage": "https://github.com/jsongraph/json-graph-specification" 26 | } 27 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | attrs==20.3.0 2 | jsonschema==3.2.0 3 | pyrsistent==0.17.3 4 | six==1.15.0 5 | -------------------------------------------------------------------------------- /test/__init__.py: -------------------------------------------------------------------------------- 1 | # Module init 2 | -------------------------------------------------------------------------------- /test/test-examples.py: -------------------------------------------------------------------------------- 1 | from jsonschema import validate 2 | import os 3 | import ntpath 4 | import glob 5 | import unittest 6 | import json 7 | 8 | __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) 9 | 10 | # Test examples against JGF 11 | # JGF schema against the meta schema is validated implicitly by jsonschema 12 | class SchemaTest(unittest.TestCase): 13 | 14 | def test_schema(self): 15 | 16 | with open(__location__ + '/../json-graph-schema_v2.json') as file: 17 | schema = json.load(file) 18 | 19 | for filename in glob.glob(__location__ + '/../examples/*.json'): 20 | 21 | with open(filename) as file: 22 | instance = json.load(file) 23 | 24 | validate(instance=instance, schema=schema) 25 | 26 | prettyname = ntpath.basename(filename) 27 | print('File {} is valid against v2 schema.'.format(prettyname)) 28 | --------------------------------------------------------------------------------