Book description
How do you turn raw, unprocessed, or malformed data into dynamic, interactive web visualizations? In this practical book, author Kyran Dale shows data scientists and analysts--as well as Python and JavaScript developers--how to create the ideal toolchain for the job. By providing engaging examples and stressing hard-earned best practices, this guide teaches you how to leverage the power of best-of-breed Python and JavaScript libraries.
Python provides accessible, powerful, and mature libraries for scraping, cleaning, and processing data. And while JavaScript is the best language when it comes to programming web visualizations, its data processing abilities can't compare with Python's. Together, these two languages are a perfect complement for creating a modern web-visualization toolchain. This book gets you started.
You'll learn how to:
- Obtain data you need programmatically, using scraping tools or web APIs: Requests, Scrapy, Beautiful Soup
- Clean and process data using Python's heavyweight data processing libraries within the NumPy ecosystem: Jupyter notebooks with pandas+Matplotlib+Seaborn
- Deliver the data to a browser with static files or by using Flask, the lightweight Python server, and a RESTful API
- Pick up enough web development skills (HTML, CSS, JS) to get your visualized data on the web
- Use the data you've mined and refined to create web charts and visualizations with Plotly, D3, Leaflet, and other libraries
Publisher resources
Table of contents
-
Preface
- Part I: Basic Toolkit
- Part II: Getting Your Data
- Part III: Cleaning and Exploring Data with pandas
- Part IV: Delivering the Data
- Part V: Visualizing Your Data with D3 and Plotly
- The Second Edition
- Conventions Used in This Book
- Using Code Examples
- OâReilly Online Learning
- How to Contact Us
- Acknowledgments
- Introduction
- I. Basic Toolkit
- 1. Development Setup
-
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
- JavaScript Modules
- Keeping Your Namespaces Clean
- Outputting âHello World!â
- Simple Data Processing
- String Construction
- Significant Whitespace Versus Curly Brackets
- Comments and Doc-Strings
- Declaring Variables Using let or 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 and Plotly
- 14. Bringing Your Charts to the Web with Matplotlib and Plotly
- 15. Imagining a Nobel Visualization
- 16. Building a Visualization
- 17. Introducing D3ââThe Story of a Bar Chart
- 18. Visualizing Individual Prizes
- 19. Mapping with D3
- 20. Visualizing Individual Winners
- 21. The Menu Bar
- 22. Conclusion
- A. D3âs enter/exit Pattern
- Index
- About the Author
Product information
- Title: Data Visualization with Python and JavaScript, 2nd Edition
- Author(s):
- Release date: December 2022
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781098111878
You might also like
book
Interactive Data Visualization with Python - Second Edition
Create your own clear and impactful interactive data visualizations with the powerful data visualization libraries of …
book
Time Series Analysis with Python Cookbook
Perform time series analysis and forecasting confidently with this Python code bank and reference manual Key …
book
Hands-On Data Visualization
Tell your story and show it with data, using free and easy-to-learn tools on the web. …
book
Fundamentals of Data Visualization
Effective visualization is the best way to communicate information from the increasingly large and complex datasets …