One of the projects I am currently working on is writing the Julia for Data Analysis book. In this post I want to give you a brief overview of the contents of the book and its current status.

What is the objective of the book?

The book is aimed at data scientists with some programming experience wanting to learn how to do data analysis in Julia. Some previous experience with Julia would be a plus, but it is not strictly required.

Since the book is aimed as an entry-level introduction to data analysis in Julia I have divided it into two parts:

  • Part 1 is teaching you the essential Julia skills you need to learn to confidently use the language.
  • Part 2 is focused on data analysis.

I do not assume that you know the Julia language and in Part 1 explain the basic components of the language from the very beginning. However, I assume that you have some experience with programming (e.g. in R or Python).

Part 2 focuses on data analysis in Julia. In it I concentrate a lot on the functionalities of the DataFrames.jl package.

It is impossible to cover every aspect of data analysis in Julia in a single book. Therefore, my goal was to discuss all essential material that will allow you to later confidently learn more advanced things on your own, while being convenient that you have a firm grasp of the fundamental concepts.

What is the scope of the book?

Most of the chapters in the book are project oriented. I introduce new concepts and functionalities of the Julia ecosystem by showing how they can be used to solve practical problems.

Since the scope of the book is quite wide let me here list selected technical topics that I discuss in it which, I think, are useful even for people who already know Julia:

  • working with source data in various formats: CSV, Apache Arrow, SQLite, JSON, serialization, parsing data that has non-standard format;
  • getting data from external sources (like: downloading data, unpacking compressed data, getting data using HTTP requests, finishing with writing a web service on your own);
  • solving typical issues encountered when pre-processing data: efficient handling of strings, using categorical values, working with time-series, understanding missing values.
  • coverage of key functionalities of the DataFrames.jl package and DataFramesMeta.jl package (creating data frames, transforming them, split-apply-combine strategy, joining, sorting, subsetting, reshaping);
  • creating plots that visualize the results of your analysis using the Plots.jl package;
  • building simple predictive models (linear regression, logistic regression, LOESS) and assessment of the model performance;
  • integrating Julia code with R and Python.

Notably, I have not covered in this book more advanced topics on machine learning. The reason is that there are too many options available, so this would be a material for another book. However, as I have already mentioned, the book is written in a way so that after reading it you should be able to easily learn the functionalities of the concrete packages that provide such functionalities, like e.g. MLJ.jl, yourself.

For example, after reading this book you might want to check out my Hands-on Data Science with Julia live project that gives you an introduction to machine learning with Julia.

Where to get the book?

The book will be published by Manning. This week its first two chapters have been made available in MEAP (Manning Early Access Platform).

You can find a preview of the book under this link.

If you are interested in the topic I encourage you to visit the website, as MEAP program gives the readers an opportunity to give feedback about the material I have prepared before the final version of the book is published.

What is the status of the book?

All core chapters have been already written. Now we are going through a review and publishing process. I will write another post when the book is finalized.

However, since all the technical material is already prepared, you can get the source codes of all chapters from GitHub. Codes are shared there are under MIT license so you can freely reuse them.


Today, as a conclusion, let me pick one example code from the book (codes are also available on GitHub).

The example code produces a plot that compares speed and code size of Julia, Python, Java, and C on 10 standard problems taken from the The Computer Language Benchmarks Game website.

The example is self-contained and was tested under Julia 1.7.0, DataFrames.jl 1.3.2, CSV.jl 0.10.3, and Plots.jl 1.27.1.

data = """
spectral norm,c,0.41,1197
spectral norm,Java,1.55,756
spectral norm,Python,112.97,407
spectral norm,Julia,1.11,429

using CSV
using DataFrames
using Plots

df =, DataFrame)

plot(map([:time, :size],
         ["execution time (relative to C)",
          "code size (relative to C)"]) do col, title
    df_plot = unstack(df, :problem, :language, col)
    df_plot[!, Not(:problem)] ./= df_plot.c
    select!(df_plot, Not(:c))
    scatter(df_plot.problem, Matrix(select(df_plot, Not(:problem)));
            labels=permutedims(names(df_plot, Not(:problem))),
            yaxis = col == :time ? :log : :none,
            markershape=[:rect :diamond :circle],
            markersize=[4 5 5],
            markercolor=[:lightgray :lightgray :gold],
            xtickfontsize=7, ytickfontsize=7,
            legendfontsize=7, ylabelfontsize=7)
            hline!([1.0]; color="orange", labels="C")

(the code is not easy, but after reading the whole book you should be able to confidently read it and create a similar implementation yourself)

The figure produced by this code looks as follows.

Benchmarks plot

If you would like to read a complete interpretation of the plot please check Chapter 1 in Julia for Data Analysis book. Here let me just summarize that Julia runs the code fast (left pane) and at the same time is convenient to use (as measured by the code size; right pane).