Permalink
Fetching contributors…
Cannot retrieve contributors at this time
142 lines (101 sloc) 4.12 KB

Candela

Candela is an open-source suite of interoperable web visualization components for Kitware's Resonant platform. Candela focuses on making scalable, rich visualizations available with a normalized API for use in real-world data science applications. Integrated components include:

Getting started

Quick start - JavaScript

  1. Enter the following in a text file named index.html:

    .. literalinclude:: static/index.html
       :language: html
       :linenos:
    
    
  2. Open index.html in your browser to display the resulting visualization.

Quick start - Python

  1. Make sure you have Python 2.7 and pip installed (on Linux and OS X systems, your local package manager should do the trick; for Windows, see here).

  2. Open a shell (e.g. Terminal on OS X; Bash on Linux; or Command Prompt on Windows) and issue this command to install the Candela package and the Requests library for obtaining sample data from the web:

    pip install pycandela requests
    

    (On UNIX systems you may need to do this as root, or with sudo.)

  3. Issue this command to start Jupyter notebook server in your browser:

    jupyter-notebook
    
  4. Create a notebook from the New menu and enter the following in a cell, followed by Shift-Enter to execute the cell and display the visualization:

    import requests
    data = requests.get(
        'https://raw.githubusercontent.com/vega/vega-datasets/gh-pages/data/iris.json'
    ).json()
    
    import pycandela
    pycandela.components.ScatterPlot(
        data=data, color='species', x='sepalLength', y='sepalWidth')
    

Quick start - R

  1. Download and install RStudio.

  2. Run the following commands to install Candela:

    install.packages('devtools')
    devtools::install_github('Kitware/candela', subdir='R/candela')
    
  3. Issue these commands to display a scatter plot of the mtcars dataset:

    library(candela)
    candela('ScatterPlot', data=mtcars, x='mpg', y='wt', color='disp')
    
.. toctree::
    :maxdepth: 2
    :caption: Using Candela

    installation
    versioning

.. toctree::
    :maxdepth: 1
    :caption: Components

    components/barchart
    components/boxplot
    components/ganttchart
    components/geo
    components/geodots
    components/glo
    components/histogram
    components/linechart
    components/lineup
    components/onset
    components/scatterplot
    components/scatterplotmatrix
    components/sententree
    components/similaritygraph
    components/treeheatmap
    components/upset

.. toctree::
    :maxdepth: 2
    :caption: API documentation

    candela-js
    candela-py
    candela-r

.. toctree::
    :maxdepth: 2
    :caption: Developer documentation

    coding-style-guide
    releasing-candela
    testing