{"size": 668, "ext": "js", "max_stars_repo_path": "layout.js", "max_stars_repo_name": "Tiamat-Tech/allnpm", "max_stars_repo_stars_event_min_datetime": "2015-02-03T20:04:44.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-29T06:45:18.000Z", "max_issues_repo_path": "layout.js", "max_issues_repo_name": "Tiamat-Tech/allnpm", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "layout.js", "max_forks_repo_name": "Tiamat-Tech/allnpm", "max_forks_repo_forks_event_min_datetime": "2015-02-03T20:04:46.000Z", "max_forks_repo_forks_event_max_datetime": "2021-07-21T17:01:35.000Z"}
{"max_stars_count": 11, "max_issues_count": null, "max_forks_count": 6, "avg_line_length": 33.4, "max_line_length": 113, "alphanum_fraction": 0.6841317365}
/**
 * This file will produce layout files from
 * graph made by `convertToGraph.js` program
 *
 * Each 60th iteration is saved to a file
 */
var save = require('ngraph.tobinary');
console.log('Parsing graph file...');
require('./lib/loadGraph.js')(performLayout);

function performLayout(graph) {
  console.log('Graph parsed. Found ' + graph.getNodesCount() + ' nodes and ' + graph.getLinksCount() + ' edges');
  var layout = require('ngraph.offline.layout')(graph);
  console.log('Starting layout. This will take a while...');
  layout.run();
  console.log('Layout completed. Saving to binary format');
  save(graph, { outDir: './data' });
  console.log('Done.');
}
