Book description
Learn how to turn raw data into rich, interactive web visualizations with the powerful combination of Python and JavaScript. With this hands-on guide, author Kyran Dale teaches you how build a basic dataviz toolchain with best-of-breed Python and JavaScript libraries—including Scrapy, Matplotlib, Pandas, Flask, and D3—for crafting engaging, browser-based visualizations.
As a working example, throughout the book Dale walks you through transforming Wikipedia’s table-based list of Nobel Prize winners into an interactive visualization. You’ll examine steps along the entire toolchain, from scraping, cleaning, exploring, and delivering data to building the visualization with JavaScript’s D3 library. If you’re ready to create your own web-based data visualizations—and know either Python or JavaScript— this is the book for you.
- Learn how to manipulate data with Python
- Understand the commonalities between Python and JavaScript
- Extract information from websites by using Python’s web-scraping tools, BeautifulSoup and Scrapy
- Clean and explore data with Python’s Pandas, Matplotlib, and Numpy libraries
- Serve data and create RESTful web APIs with Python’s Flask framework
- Create engaging, interactive web visualizations with JavaScript’s D3 library
Publisher resources
Table of contents
- Preface
- Introduction
- 1. Development Setup
- I. Basic Toolkit
-
2. A Language-Learning Bridge Between Python and JavaScript
- Similarities and Differences
- Interacting with the Code
-
Basic Bridge Work
- Style Guidelines, PEP 8, and use strict
- CamelCase Versus Underscore
- Importing Modules, Including Scripts
- Keeping Your Namespaces Clean
- Outputting “Hello World!”
- Simple Data Processing
- String Construction
- Significant Whitespace Versus Curly Brackets
- Comments and doc-strings
- Declaring Variables, var
- Strings and Numbers
- Booleans
- Data Containers: Dicts, Objects, Lists, Arrays
- Functions
- Iterating: for Loops and Functional Alternatives
- Conditionals: if, else, elif, switch
- File Input and Output
- Classes and Prototypes
- Differences in Practice
- A Cheat Sheet
- Summary
- 3. Reading and Writing Data with Python
- 4. Webdev 101
- II. Getting Your Data
- 5. Getting Data off the Web with Python
- 6. Heavyweight Scraping with Scrapy
- III. Cleaning and Exploring Data with Pandas
- 7. Introduction to NumPy
- 8. Introduction to Pandas
- 9. Cleaning Data with Pandas
- 10. Visualizing Data with Matplotlib
- 11. Exploring Data with Pandas
- IV. Delivering the Data
- 12. Delivering the Data
- 13. RESTful Data with Flask
- V. Visualizing Your Data with D3
- 14. Imagining a Nobel Visualization
- 15. Building a Visualization
- 16. Introducing D3—The Story of a Bar Chart
- 17. Visualizing Individual Prizes
- 18. Mapping with D3
- 19. Visualizing Individual Winners
- 20. The Menu Bar
- 21. Conclusion
- A. Moving from Development to Production
- Index
Product information
- Title: Data Visualization with Python and JavaScript
- Author(s):
- Release date: July 2016
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491920510
You might also like
book
Data Visualization with Python and JavaScript, 2nd Edition
How do you turn raw, unprocessed, or malformed data into dynamic, interactive web visualizations? In this …
book
Data Visualization with JavaScript
You've got data to communicate. But what kind of visualization do you choose, how do you …
book
Python: Data Analytics and Visualization
Understand, evaluate, and visualize data About This Book Learn basic steps of data analysis and how …
book
Hands-on Matplotlib: Learn Plotting and Visualizations with Python 3
Learn the core aspects of NumPy, Matplotlib, and Pandas, and use them to write programs with …