Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Julia for Data Science

You're reading from   Julia for Data Science high-performance computing simplified

Arrow left icon
Product type Paperback
Published in Sep 2016
Publisher Packt
ISBN-13 9781785289699
Length 346 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Anshul Joshi Anshul Joshi
Author Profile Icon Anshul Joshi
Anshul Joshi
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. The Groundwork – Julia's Environment FREE CHAPTER 2. Data Munging 3. Data Exploration 4. Deep Dive into Inferential Statistics 5. Making Sense of Data Using Visualization 6. Supervised Machine Learning 7. Unsupervised Machine Learning 8. Creating Ensemble Models 9. Time Series 10. Collaborative Filtering and Recommendation System 11. Introduction to Deep Learning

Visualizing using Vega


Vega is a beautiful visualization library provided by John Myles White. It is available as a registered Julia package, so it can be installed easily.

It is built on top of D3.js and uses JSON to create beautiful visualizations. It requires an Internet connection whenever we need to generate graphs as it doesn't store local copies of the JavaScript libraries needed.

Installation

To install Vega, use the following commands:

Pkg.add("Vega")
using Vega

Examples

Let's walk through various visualizations using Vega.

Scatterplot

Following are the arguments of a scatterplot:

  •  x and y: AbstractVector

  • Group: AbstractVector

Scatterplots are used to determine the correlation between two variables, that is, how one is affected by the other:

scatterplot(x=rand(100), y=rand(100))

We can now move on to building a complex scatterplot:

This will generate the following scatterplot. We can clearly see two clusters generated by Vega. These are d1 and d2:

In this particular example, we grouped...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image