Data Visualization with Python and JavaScript Scrape Clean Explore Transform Your Data 1st Edition by Kyran Dale – Ebook PDF Instant Download/Delivery: 1491920513, 978-1491920510
Full download Data Visualization with Python and JavaScript Scrape Clean Explore Transform Your Data 1st Edition after payment

Product details:
ISBN 10: 1491920513
ISBN 13: 978-1491920510
Author: Kyran Dale
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
Table of contents:
Preface
Conventions Used in This Book
Using Code Examples
O’Reilly Safari
How to Contact Us
Acknowledgments
Introduction
Who This Book Is For
Minimal Requirements to Use This Book
Why Python and JavaScript?
Why Not Python on the Browser?
Why Python for Data Processing
Python’s Getting Better All the Time
What You’ll Learn
The Choice of Libraries
Preliminaries
The Dataviz Toolchain
1. Scraping Data with Scrapy
2. Cleaning Data with Pandas
3. Exploring Data with Pandas and Matplotlib
4. Delivering Your Data with Flask
5. Transforming Data into Interactive Visualizations with D3
Smaller Libraries
Using the Book
A Little Bit of Context
Summary
Recommended Books
1. Development Setup
The Accompanying Code
Python
Anaconda
Checking the Anaconda Install
Installing Extra Libraries
Virtual Environments
JavaScript
Content Delivery Networks
Installing Libraries Locally
Databases
Installing MongoDB
Integrated Development Environments
Summary
I. Basic Toolkit
2. A Language-Learning Bridge Between Python and JavaScript
Similarities and Differences
Interacting with the Code
Python
JavaScript
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
Method Chaining
Enumerating a List
Tuple Unpacking
Collections
Underscore
Functional Array Methods and List Comprehensions
Map, Reduce, and Filter with Python’s Lambdas
JavaScript Closures and the Module Pattern
This Is That
A Cheat Sheet
Summary
3. Reading and Writing Data with Python
Easy Does It
Passing Data Around
Working with System Files
CSV, TSV, and Row-Column Data Formats
JSON
Dealing with Dates and Times
SQL
Creating the Database Engine
Defining the Database Tables
Adding Instances with a Session
Querying the Database
Easier SQL with Dataset
MongoDB
Dealing with Dates, Times, and Complex Data
Summary
4. Webdev 101
The Big Picture
Single-Page Apps
Tooling Up
The Myth of IDEs, Frameworks, and Tools
A Text-Editing Workhorse
Browser with Development Tools
Terminal or Command Prompt
Building a Web Page
Serving Pages with HTTP
The DOM
The HTML Skeleton
Marking Up Content
CSS
JavaScript
Data
Chrome’s Developer Tools
The Elements Tab
The Sources Tab
Other Tools
A Basic Page with Placeholders
Filling the Placeholders with Content
Scalable Vector Graphics
The Element
The Element
Circles
Applying CSS Styles
Lines, Rectangles, and Polygons
Text
Paths
Scaling and Rotating
Working with Groups
Layering and Transparency
JavaScripted SVG
Summary
II. Getting Your Data
5. Getting Data off the Web with Python
Getting Web Data with the requests Library
Getting Data Files with requests
Using Python to Consume Data from a Web API
Using a RESTful Web API with requests
Getting Country Data for the Nobel Dataviz
Using Libraries to Access Web APIs
Using Google Spreadsheets
Using the Twitter API with Tweepy
Scraping Data
Why We Need to Scrape
BeautifulSoup and lxml
A First Scraping Foray
Getting the Soup
Selecting Tags
Crafting Selection Patterns
Caching the Web Pages
Scraping the Winners’ Nationalities
Summary
6. Heavyweight Scraping with Scrapy
Setting Up Scrapy
Establishing the Targets
Targeting HTML with Xpaths
Testing Xpaths with the Scrapy Shell
Selecting with Relative Xpaths
A First Scrapy Spider
Scraping the Individual Biography Pages
Chaining Requests and Yielding Data
Caching Pages
Yielding Requests
Scrapy Pipelines
Scraping Text and Images with a Pipeline
Specifying Pipelines with Multiple Spiders
Summary
III. Cleaning and Exploring Data with Pandas
7. Introduction to NumPy
The NumPy Array
Creating Arrays
Array Indexing and Slicing
A Few Basic Operations
Creating Array Functions
Calculating a Moving Average
Summary
8. Introduction to Pandas
Why Pandas Is Tailor-Made for Dataviz
Why Pandas Was Developed
Heterogeneous Data and Categorizing Measurements
The DataFrame
Indices
Rows and Columns
Selecting Groups
Creating and Saving DataFrames
JSON
CSV
Excel Files
SQL
MongoDB
Series into DataFrames
Panels
Summary
9. Cleaning Data with Pandas
Coming Clean About Dirty Data
Inspecting the Data
Indices and Pandas Data Selection
Selecting Multiple Rows
Cleaning the Data
Finding Mixed Types
Replacing Strings
Removing Rows
Finding Duplicates
Sorting Data
Removing Duplicates
Dealing with Missing Fields
Dealing with Times and Dates
The Full clean_data Function
Saving the Cleaned Dataset
Merging DataFrames
Summary
10. Visualizing Data with Matplotlib
Pyplot and Object-Oriented Matplotlib
Starting an Interactive Session
Interactive Plotting with Pyplot’s Global State
Configuring Matplotlib
Setting the Figure’s Size
Points, Not Pixels
Labels and Legends
Titles and Axes Labels
Saving Your Charts
Figures and Object-Oriented Matplotlib
Axes and Subplots
Plot Types
Bar Charts
Scatter Plots
Seaborn
FacetGrids
Pairgrids
Summary
11. Exploring Data with Pandas
Starting to Explore
Plotting with Pandas
Gender Disparities
Unstacking Groups
Historical Trends
National Trends
Prize Winners per Capita
Prizes by Category
Historical Trends in Prize Distribution
Age and Life Expectancy of Winners
Age at Time of Award
Life Expectancy of Winners
Increasing Life Expectancies over Time
The Nobel Diaspora
Summary
IV. Delivering the Data
12. Delivering the Data
Serving the Data
Organizing Your Flask Files
Serving Data with Flask
Delivering Static Files
Dynamic Data with Flask
A Simple RESTful API with Flask
Using Static or Dynamic Delivery
Summary
13. RESTful Data with Flask
A RESTful, MongoDB API with Eve
Using AJAX to Access the API
Delivering Data to the Nobel Prize Visualization
RESTful SQL with Flask-Restless
Creating the API
Adding CORS Support
Querying the API
Summary
V. Visualizing Your Data with D3
14. Imagining a Nobel Visualization
Who Is It For?
Choosing Visual Elements
Menu Bar
Prizes by Year
A Map Showing Selected Nobel Countries
A Bar Chart Showing Number of Winners by Country
A List of the Selected Winners
A Mini-Biography Box with Picture
The Complete Visualization
Summary
15. Building a Visualization
Preliminaries
Core Components
Organizing Your Files
Serving the Data
The HTML Skeleton
CSS Styling
The JavaScript Engine
Importing the Scripts
Basic Data Flow
The Core Code
Initializing the Nobel Prize Visualization
Ready to Go
Data-Driven Updates
Filtering Data with Crossfilter
Running the Nobel Prize Visualization App
Summary
16. Introducing D3—The Story of a Bar Chart
Framing the Problem
Working with Selections
Adding DOM Elements
Leveraging D3
Measuring Up with D3’s Scales
Quantitative Scales
Ordinal Scales
Unleashing the Power of D3 with Data Binding
The enter Method
Accessing the Bound Data
The Update Pattern
Axes and Labels
Transitions
Summary
17. Visualizing Individual Prizes
Building the Framework
Scales
Axes
Category Labels
Nesting the Data
Adding the Winners with a Nested Data-Join
A Little Transitional Sparkle
Summary
18. Mapping with D3
Available Maps
D3’s Mapping Data Formats
GeoJSON
TopoJSON
Converting Maps to TopoJSON
D3 Geo, Projections, and Paths
Projections
Paths
Graticules
Putting the Elements Together
Updating the Map
Adding Value Indicators
Our Completed Map
Building a Simple Tooltip
Summary
19. Visualizing Individual Winners
Building the List
Building the Bio-Box
Summary
20. The Menu Bar
Creating HTML Elements with D3
Building the Menu Bar
Building the Category Selector
Adding the Gender Selector
Adding the Country Selector
Wiring Up the Metric Radio Button
Summary
21. Conclusion
Recap
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
Future Progress
Visualizing Social Media Networks
Interactive Mapping with Leaflet and Folium
Machine-Learning Visualizations
Final Thoughts
A. Moving from Development to Production
The Starting Directory
Configuration
Configuring Flask
Configuring the JavaScript App
Authentication
Testing Flask Apps
Testing JavaScript Apps
Deploying Flask Apps
Configuring Apache
Logging and Error Handling
People also search for:
ibm data visualization with python final assignment
interactive data visualization with python
data analysis and data visualization with python
data visualization with python final assignment
data visualization with python final assignment part 2
Tags:
Kyran Dale,Data Visualization,Python and Java Script,Clean Explore


