[ANN] C2: Clojure/ClojureScript data visualization

473 views
Skip to first unread message

Kevin Lynagh

unread,
May 11, 2012, 2:04:56 PM5/11/12
to Clojure
Announcing C2, a data visualization library inspired by D3.js
C2 is not a charting library; there are no plotting functions like
"scatterplot" or "piechart" .
Instead, C2 is a collection of scales, map projections, and component
templates (e.g., axes) that you can compose to build custom data
graphics on a DOM (e.g., HTML or SVG).

C2 is written in Clojure and can be used on the JVM in conjunction
with the Hiccup HTML rendering library to generate markup.
C2 can also be used within ClojureScript, where it includes

+ its own Hiccup compiler that acts directly on live DOM nodes
+ event wrappers for use with large datasets (via delegation)
+ DOM manipulation helpers (the usual suspects for manipulating
styles/attributes, selecting, appending, and removing DOM nodes)

To get started, just add it to your project.clj:

[com.keminglabs/c2 "0.1.0"]

There is also a standalone uberjar with built-in web server if you
don't have Leiningen around; see this 2-minute screencast:

http://www.youtube.com/watch?v=Urg79FmQnYs

For more information, see

Homepage: http://keminglabs.com/c2/
Marginalia docs: http://keminglabs.com/c2/docs/
Github: https://github.com/lynaghk/c2/

Some projects that pair well with C2:

cljx, a Leiningen plugin that statically rewrites metadata-annotated
Clojure code into platform specific code:

https://github.com/lynaghk/cljx

Cassowary, a linear constraint solver accessible from ClojureScript:

https://github.com/lynaghk/cassowary-coffee

Vomnibus, a collection of geographic data and color schemes:

https://github.com/lynaghk/vomnibus

Further reading:

D3 paper: http://vis.stanford.edu/files/2011-D3-InfoVis.pdf
D3 examples: https://github.com/mbostock/d3/wiki/Gallery
Tick selection algorithm: http://graphics.stanford.edu/vis/publications/2010/labeling-preprint.pdf
Stephen Few: http://www.perceptualedge.com/library.php
Bret Victor on information software: http://worrydream.com/MagicInk/

Kostas Pramatias

unread,
May 12, 2012, 9:42:37 AM5/12/12
to clo...@googlegroups.com

--

i tried it and it works. thanks for this library 

Reply all
Reply to author
Forward
0 new messages