Jump to ratings and reviews
Rate this book

Data Visualization with Python and JavaScript: Scrape, Clean, Explore, and Transform Your Data

Rate this book
In a world that increasingly expects more than pre-rendered, static images, Python and Javascript are the perfect complement for turning data into rich, interactive visualizations. Developers need to know how to turn raw, unprocessed data often "dirty" or malformed into dynamic web visualizations. Author Kyran Dale teaches you how to leverage the power of best-of-breed Python and Javascript libraries to do so, using engaging examples and stressing hard-earned best-practices.

You'll learn how to: Get data programmatically, using scraping tools or web APIsClean and process data using Python's heavyweight data-processing librariesDeliver data to a browser using a lightweight Python server (Flask)Receive data and use it to create a web visualization, using D3, Canvas, or WebGL"

566 pages, Paperback

First published March 25, 2016

Loading...
Loading...

About the author

Kyran Dale

2 books2 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
10 (23%)
4 stars
22 (51%)
3 stars
9 (20%)
2 stars
2 (4%)
1 star
0 (0%)
Displaying 1 - 4 of 4 reviews
Profile Image for Ahmed.
28 reviews9 followers
November 21, 2016
This is a unique book in the world of data, as it shows the full workflow of a modern data analyst -- from data scraping to clean up to storage to web visualization. It is also the first book I've seen that bridges the gap between front-end web developers familiar with HTML/CSS/Javascript and traditional Python data analysts more used to libraries like NumPy and Pandas. For this reason alone it's worth reading.

The one drawback to the text is the author's code base on Github isn't exactly that well organized -- making it hard to run the code for each chapter. That said it offers very useful "big picture" context for anyone looking to dive deeper into modern day data visualization.
Profile Image for Hồ Vinh.
122 reviews12 followers
July 18, 2026
Read this hands-on rather than passively, working through the toolchain the book actually builds rather than just following along on the page. Writing this up stage by stage, since the book's real strength is in how deliberately it's structured, not any single chapter.

**Getting the data, chapters 5-6.** Requests for basic HTTP and web APIs, a purpose-built client library for a specific API (Tweepy for Twitter, in the book's case), BeautifulSoup and lxml for scraping plus response caching, then a full second pass through the same territory as a proper Scrapy project with XPath selectors and item pipelines. A genuinely good structure: same problem solved four ways, with the book being explicit about when each one actually earns its keep rather than presenting them as interchangeable.

**Storage, chapter 3.** SQLAlchemy's ORM, the lower-boilerplate `dataset` library, and MongoDB, all compared against the same data. The ORM is the standout for me here: mapping a table row to a plain object with attributes is the most immediately intuitive of the three if you already think in OOP terms, and the chapter is honest that the ORM's explicit schema is usually the right call for anything actually relational, with `dataset` earning its keep for throwaway scripts and MongoDB only once records genuinely stop sharing a shape.

**Cleaning and exploring, chapters 7-11.** The book leans hard on NumPy and Pandas here, five chapters worth: DataFrame indexing, groupby, merging, then Matplotlib and Seaborn for the exploratory charting on top. This is genuinely close to a third of the book, so worth knowing going in if Pandas fluency is part of what you're hoping to get out of it. The underlying philosophy carries the chapters well regardless: collection should tolerate partial failure and log rather than drop data, cleaning is where inconsistency actually gets resolved or a row gets excluded, and those are treated as genuinely different concerns with different failure tolerances rather than one blurry "data prep" step.

**Delivering the data, chapters 12-13.** Flask-Restless auto-generates a RESTful API over the SQL side, Eve does the same for MongoDB, both instead of hand-rolling routes. Useful for seeing how little boilerplate a REST API needs once you pick a framework that matches your storage layer, and CORS gets a proper explanation for why a separately-served frontend needs it at all.

**D3, chapters 14-20.** This is the payoff section and it earns the reputation. Scales, the data-join/`enter` pattern, transitions, then a full build: a country choropleth via GeoJSON/TopoJSON, a bio-box for individual entries, and a menu bar wired through Crossfilter for client-side filtering. Once the `enter`/`update`/`exit` pattern actually clicks, driving a whole interactive page off one small API feels a lot more powerful than "just" a charting library suggests going in.

One honest note on scope: chapter 4 (Webdev 101) stops at DOM and SVG basics plus CSS, and explicitly argues against reaching for heavy frameworks or build tooling at all, "The Myth of IDEs, Frameworks, and Tools" is an actual section header. That's a consistent position more than a gap: the book is teaching you that plain HTML, CSS, and JS get you further than you'd expect, and they do, right up until you want something that looks current rather than merely functional. It left me curious what the smallest step up from that baseline toward a modern look would actually take, without losing the directness that makes the book's approach so easy to follow in the first place. A fair question for the book to leave open, since it's outside what it's trying to do.

One more thing worth naming, since it changed how I read the whole book: working through it with an LLM doing a lot of the actual typing turned out to be a genuinely different way to use a book like this. I wasn't hand-writing every XPath selector or every D3 transition myself. What mattered was knowing the menu of options at each stage, the several ways to fetch data, the several ways to store it, the two ways to serve it, and the concepts the book gives for choosing between them, then directing the implementation and checking the result against that understanding. That's enough to get a working, reasonably faithful, runnable product out of the whole toolchain without necessarily building deep hand-written fluency in any single library along the way. Different kind of mastery than the book assumes you're building toward, breadth over depth, but a legitimate and increasingly common way to work through a hands-on technical book in 2026.

Solid book if you go in knowing it's a toolchain tour first and a deep-dive on any single library second. It's aged better on the Python side (requests, Pandas, Flask, SQLAlchemy) than on the frontend side, where "no framework, no build step" was a defensible default in 2016 and reads more like a deliberate tradeoff to accept today.
Profile Image for Eric Mesa.
861 reviews27 followers
October 12, 2022
While a book about web technologies is undoubtablely going to get out of date (especially when Javascript is involved), I would definitely recommend this book if you want to do some data visualization either as part of your job or for an undergrad, grad, or PhD project. While I would probably use FastAPI rather than Flask, I heard recently that the Javascript library the author uses, D3, is still one of the best in class libraries for this kind of work.

The author guides you through the process by building a website to visualize Nobel Prize winners. The early steps where the author teaches you how to obtain and how to clean data are very important and, to some extent, will never go out of style. The same can be said of the author's section explaining how to select the best visualizations.

It's very well written and I highly recommend.
Displaying 1 - 4 of 4 reviews