Fork me on GitHub
#data-science
<
2019-01-23
>
Daniel Slutsky07:01:52

Hi! We made this questionnaire to prepare for the Clojure data science meeting. https://bit.ly/2FJgom2 Your response here will be extremely helpful! Please note that no question is mandatory -- e.g., you do not have to say even your name. Thanks!

metasoarous08:01:04

I'm excited to announce the release of oz 1.5.1. https://github.com/metasoarous/oz Oz is a simple data visualization library built around Vega & Vega-Lite. In Vega & Vega-Lite, data visualizations are specified as pure data descriptions about how to map properties of your data and interactions to aesthetics of a visualization. To find out more about Vega & Oz please visit https://github.com/metasoarous/oz. This release specifically adds some major new features: * Jupyter notebook support via the Clojupyter & IClojure kernels * Export of visualizations and scientific documents to live/interactive html files via the export! function * Load markdown files, with a notation for embedding visualizations as code blocks * Cljdoc API documentation (https://cljdoc.org/d/metasoarous/oz) These features, together with those already built into oz (REPL based workflow, hiccup support, Reagent components & publishing/sharing API), make oz a powerful tool for working with data visualizations and scientific documents from within Clojure, no matter the workflow. I hope you find it useful. Thanks!

🌟 30
metasoarous08:01:31

I'd like to specifically illustrate the markdown support feature, as its the one I'm most excited to start using myself, as well as the one which demands the most explanation. How many times have you been working on a simple markdown document, and realized you wanted to add a data visualization to illustrate a point? What did you have to do to get it done? My guess is you had fire up another tool, like R's ggplot, or Python's matplotlib, export a static figure, and awkwardly embed it into your markdown document, hoping to God you don't have to update it, and go through the ordeal again. With oz, you can simply embed vega-lite or vega visualizations like this:

# Some markown file

A data visualization:

``edn vega-lite
{:data {:values [{:a 2 :b 3 :c "T"} {:a 5 :b 2 :c "T"} {:a 7 :b 4 :c "Q"} {:a 3 :b 3 :c "Q"}]}
 :mark :point
 :width 400
 :encoding {:x {:field "a"}
            :y {:field "b"}
            :color {:field "c"}}}
``
(Note that I'm only using two ticks in the code above because three would break the slack code block :thinking_face: ) The load function parses the markdown file, and uses the edn vega-lite code block class to determine that the block should be interpreted as a Vega-Lite visualization. The fact that edn is one of the classes here means that your text editor and other markdown processors (if you push to GitHub or whatever) will recognize what kind of data it is and highlight it appropriately. (Thanks to GH users mpcarolin and yogthos for promptly updating their markdown processing libraries to allow for the specification of multiple code classes.) Once loaded, the corresponding document can be immediately viewed with the view! function, exported to a self-contained html file via export!, or published online with a shareable link via publish!. This notation allows you to embed as either json or yaml in lieu of edn, or vega in lieu of vega-lite. Moreover, hiccup can be embedded (possibly with [:vega ...] or [:vega-lite ...] nodes), for when you want more power than Markdown affords, but don't want to resort to manually writing html in your beautiful Markdown.

metasoarous08:01:22

Final note on this before I go to sleep regarding Jupyter support. While I personally prefer creating scientific documents from the comfort of my favorite text editor & REPL setup, I understand the value of the notebook environment. In fact, my first programming language was Mathematica, and there's a part of me that holds warm reverie for the model. Thus, it is with great pleasure that I announce that Oz can now be used as a go-to for those who enjoy using these environments and wish to be able to create powerful and interactive data visualizations therein. This feature would not have been possible without GH users mikeyford, keesterbrugge, jtcbrule, cgrand. Thank you all for your help initiating and piecing together a solution to the problem(s)! For usage details can be found in the README. Thanks again!

👏 30
👍 10