CrossfilterCharts.jl

CrossfilterCharts.jl is a Julia module which harnesses the power of DC.js to automagically generate linked data visualizations.

In [1]:
using RDatasets
iris = dataset("datasets", "iris");

CrossfilterCharts.jl is extremely easy to use. Here we are pulling a dataset using the RDatasets package in order to supply example datasets contained in DataFrames.

Basic use of CrossfilterCharts only requires importing the package and calling dc() on the dataframe to generate a visualization:

In [2]:
using CrossfilterCharts
dc(iris)
Out[2]:
 

Chart for SepalLength

Chart for SepalWidth

Chart for PetalLength

Chart for PetalWidth

Chart for Species

Users have complete access to the DCOut object, and can choose to structure the visualization themselves:

In [3]:
df = dataset("mlmRev", "Exam")
dcout = DCOut(df)
infer_dimensions!(dcout) # infer all dimensions
infer_groups!(dcout) # infer all groups
quick_add!(dcout, :School, piechart)
quick_add!(dcout, :NormExam, barchart)
quick_add!(dcout, :SchGend, rowchart)
quick_add!(dcout, :SchAvg, linechart)
quick_add!(dcout, :VR, piechart)
quick_add!(dcout, :Sex, piechart)
dcout.charts[end].typ[:innerRadius] = "50"
add_bubblechart!(dcout, :School, :NormExam, :SchAvg, :StandLRT)
add_datacountwidget!(dcout)
add_datatablewidget!(dcout)
dcout
Out[3]:
 

Chart for School

Chart for NormExam

Chart for SchGend

Chart for SchAvg

Chart for VR

Chart for Sex

Chart for School

selected out of records

SchoolNormExamSchGendSchAvgVRIntakeStandLRTSexTypeStudent

CrossfilterCharts will now not automatically infer charts if there are missing or NaN values.

In [4]:
msleep = dataset("ggplot2","msleep")
dc(msleep)
Out[4]:
 

Chart for Name

Chart for Genus

Chart for Order

Chart for SleepTotal

Chart for Awake

Chart for BodyWt

In [ ]: