Skip to content

A simple script to convert uBiome's export data into a D3 tree visualization.

License

Notifications You must be signed in to change notification settings

jrrera/ubiome-to-d3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A small utility for converting uBiome's JSON data export into a user friendly tree graph.

Usage:

The ubiometree function takes two arguments:

  • dataLocation: The location of the JSON file (e.g. /static/microbiome.json)
  • elementId: The id selector of the element that should house the graph.

Example:

// CommonJS / Browserify
var d3 = require('d3');
var ubiometree = require('./ubiome-d3-tree');
ubiometree('static/microbiome.json', '#graph-div'); 

// Non-CommonJS, use globals. Requires D3.
ubiometree('static/microbiome.json', '#graph-div');

To view an example, first run bower install, fire up a local server (e.g. python -m SimpleHTTPServer 8081) and open example/index.html.

Questions? Issues? Let me know!

About

A simple script to convert uBiome's export data into a D3 tree visualization.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published