Book Image

Clojure Data Analysis Cookbook - Second Edition

By : Eric Richard Rochester
Book Image

Clojure Data Analysis Cookbook - Second Edition

By: Eric Richard Rochester

Overview of this book

Table of Contents (19 chapters)
Clojure Data Analysis Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up to use ClojureScript


The only thing that's missing is JavaScript. We can also generate this with ClojureScript (https://github.com/clojure/clojurescript). This is an implementation of Clojure that compiles to JavaScript.

Why will we want to write JavaScript in Clojure? First, it simplifies your project when both the client and the server are written in the same language. It also allows you to share code between the two sides of your application, which can cut down the complexity of your code as well as the lines of code.

For the rest of this chapter, we'll be creating charts and graphs using ClojureScript. These recipes will show you how to install ClojureScript and get it working. We'll take the web application we started in the Serving data with Ring and Compojure and Creating HTML with Hiccup recipes and add an alert to the index page. This isn't anything more than a hello world application, but this will prove that ClojureScript is working in our application.

Getting ready

To...