Data Visualization with Python and JavaScript

Author: Kyran Dale
Publisher: O'Reilly
Pages: 592
ISBN: 978-1491920510
Print: 1491920513
Kindle: B01HSMKJIA
Audience: JavaScript & Python data miners
Rating: 3
Reviewer: Ian Elliot

JavaScript and Python - a tall order for the reader to master?

Of course once you master one programming language you quickly discover that the rest are all the same. Even so it is something of a surprise to find a book that uses two languages - Python on the server and JavaScript on the client. It also has to be said that Python isn't the most dominant server language, but using it for data manipulation is something that it is suitable for. However, you are going to have to be fairly confident in both Python and JavaScript to get a lot from this book, which is arranged in five distinct sections, delves into a number of different toolkits along the way.

Banner

Part I Basic Toolkit

After a general introduction in Chapter 1 we move onto a comparison of JavaScript and Python. Here the author tries to convince you that they are very similar languages. They are because all computer languages are similar but Python and JavaScript are two relative outliers. Python has some weird ways of doing things which are going to confuse you if you are new to it. JavaScript suffers from the problem of being treated as if it was a standard object oriented language when in fact it is something very different from the rest of the pack. This introduction doesn't really do justice to either language and probably doesn't do the read much good either.

Chapter 3 moves on to using Python to work with data - CSV files, JSON, MongoDB and SQL. This is a lot of detail for a single chapter. The final chapter in the section is Webdev 101 where we are told that you don't need an IDE and just a clever text editor is all you need. I would disagree and recommend that you get an IDE for both Python and JavaScript and, while I agree that Chrome has good debugging, there is also a lot to be said for Netbeans and its built in debugger. The chapter ends with a long description of SVG - not sure why its included in 101. 

Overall this section of the book deals with far too much information and dives into things it really doesn't have to at this point. It is difficult to know exactly what the book is trying to achieve.  

 

 

Part II Getting Your Data

You might think that if you are interested in data visualization you might well already have the data that is motivating you. What this section tries to explain is how you can get data from the web using the requests library or using Scrapy to scrap data from web pages. It also deals with getting Twitter data and data from Google spreadsheets. 

Part III Cleaning and Exploring Data with Pandas

As its title makes clear, the section focuses on the Pandas library The first two chapters describe using NumPy and the basics of Pandas mainly how to get data into it.  The third chapter is about cleaning the data using manipulation to logically check formats and missing values. The final two chapters of the section use Mathplotlib and Panda to explore the data. This is essentially a traditional descriptive statistics approach to finding outliers and generally investigating distributions. 

Part IV Delivering the Data

This section  is a short tutorial on using Python to implement web pages using the Flask library. It works its way though static web pages and on to dynamic pages. The next chapter goes into more detail about organizing a dynamic web site using MongoDB and SQL. 

Part V Visualizing Your Data with D3

The final part of the book is probably what you might have suppose the book would concentrate on, i.e. using the D3 library, and it is a substantial section with over 150 pages. It starts off with some basic charts including maps and works its way through increasingly advanced techniques. In case you were wondering this is where the JavaScript is. The whole section is about implementing a particular visualization - the data has been used in earlier chapters but now we are displaying it. There really isn't much choice but to follow carefully along to find out what D3 is all about. 

Conclusion

This is a big book and parts of it are fairly easy to read. There are lots of examples and many illustrate extremely specific points. It is difficult to get a bird's eye view of what is going on. There is also a tendency to branch off and explain everything even if it is tangential to the main plot. The explanations are also often inadequate because the topic would need a chapter to itself not just a few paragraphs. For example, its boxout on regular expressions doesn't really help. A short note on what a regular expression is and roughly how it works would be better with a pointer to a fuller reference for readers wanting to find out more. 

This is also a very specific book in the sense that it isn't going to be of much interest to a statistician looking to explore and present some survey data. This is much more aimed at someone who wants to collect data from the web and create online presentations. If you fit into this category, and are happy with a range of server and client technologies, then you might enjoy this book. 

Related Reviews

D3.js in Action

 

To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.

Banner


SQL Server 2022 Administration Inside Out

Author: Randolph West et al
Publisher: Microsoft Press
Pages: 992
Print: 0137899882
ISBN: 978-0137899883
Kindle: B0C4VKVP27
Audience: DBAs and developers
Rating: 5.0
Reviewer: Ian Stirk

This book aims to update your DBA skills to cover SQL Server 2022, how does it fare?



Data Structures & Algorithms in Python

Author: Dr. John Canning, Alan Broder and Robert Lafore
Publisher: Addison-Wesley
Date: October 2022
Pages: 928
ISBN:978-0134855684
Print: 013485568X
Kindle: B0B1WJF1K9
Audience: Python developers
Rating: 4
Reviewer: Mike James
Data structures in Python - a good idea!


More Reviews

 

 

Last Updated ( Saturday, 21 January 2017 )