React+D3v4
Reusable dataviz & games using modern JavaScript
React with d3.js was the most fun I've had in years.
Creating dynamic data visualizations on the web is a pain in the ass.
With React+d3.js ES6 you'll learn how to build re-usable visualization components using modern JavaScript standards in about an hour.
The author is letting you choose the price you pay for this book!
React with d3.js was the most fun I've had in years.
Creating dynamic data visualizations on the web is a pain in the ass.
With React+d3.js ES6 you'll learn how to build re-usable visualization components using modern JavaScript standards in about an hour.
About
About the Book
React+d3.js ES6 is designed to be short, but comprehensive.
In about an hour, it will guide you through a whole React and d3.js project from start to finish.
Everything from setting up code compilation, to creating reusable visualization components.
REACT+D3.JS ES6
Learn how to build reusable visualization components that work anywhere, with any data.
Fly through the code with to-the-point instructions and a healthy dose of interesting banter.
USING REACT WITH D3.JS
Declarative.
Say what you want, not how.
Reusable.
Code once, use everywhere.
Fast.
Render only the stuff that changes.
Price
Pick Your Price...
Minimum price
$49.00
$49.00
You pay
$49.00Author earns
$39.20Author
About the Author
Swizec Teller
Hi, I’m a digital nomad and full stack web engineer.
I travel the world and help startups win. From setting up new teams and training juniors, to fixing spaghetti code and implementing new features.
My code has been used by MasterCard, Commerzbank, Google, Mashable, Lyft, and many others.
When I’m not coding, I’m writing.
At least 5000 people bought my books ... I don’t know if that’s a lot, but it’s more than zero. I like that.
My work has been featured in Business Insider, LifeHacker, Huffington Post, and several dead-tree magazines. I’ve spoken on BBC Radio, appeared on Slovenian national television, and given talks all over the world.
Contents
Table of Contents
Introduction
Foreword
Why you should read React + D3v4
What you need to know
- How to read this book
Why React and D3.js
Buzzword soup explained
JSX
- Visualizing data with React and d3.js
The basic approach
Blackbox Components
- A quick blackbox example - a D3 axis
- A quick blackbox example - a React+D3 axis
A D3 blackbox higher order component – HOC
Full-feature Integration
- A color scale
You’re awesome
State Handling Architecture
- Basic architecture
- A caveat
Structuring your React app
Set up a local environment with create-react-app
- Make sure you have node.js
- Install create-react-app
- Run create-react-app
- What you get
- Install dependencies for this book
- A big example project - 176,113 tech salaries visualized
Show a Preloader
- Step 1: Get the image
- Step 2: Preloader component
- Step 3: Update App
- Step 4: Load Bootstrap styles
Asynchronously load data
- Step 0: Get the data
- Step 1: Prep App.js
- Step 2: Prep data parsing functions
- Step 3: Load the datasets
- Step 4: Tie the datasets together
Render a choropleth map of the US
- Step 1: Prep App.js
- Step 2: CountyMap/index.js
- Step 3: CountyMap/CountyMap.js
- Step 4: CountyMap/County.js
Render a Histogram of salaries
- Step 1: Prep App.js
- Step 2: CSS changes
- Step 3: Histogram component
- Step 4: HistogramBar (sub)component
- Step 5: Axis HOC
Make it understandable - meta info
- Dynamic title
- Dynamic description
- Median household line
Add user controls for data slicing and dicing
- Step 1: Update App.js
- Step 2: Build Controls component
- Step 3: Build ControlRow component
- Step 4: Build Toggle component
- Step 5: Add US state and Job Title filters
A small speed optimization
Rudimentary routing
Prep for launch
- Setting up deployment
- Twitter and Facebook cards and SEO
- Full dataset
Launch!
- Animation
Using a game loop for rich animation
- A bouncing ball
Using transitions for simple animation
- Rainbow snake
Enter/update/exit animation
- Animated alphabet
Animating with React, Redux, and d3
- Here’s how it works
- 3 presentation components
- 6 Redux Actions
- 1 Container component
- 1 Redux Reducer
- What we learned
- Speed optimizations
Using canvas
- Why Canvas
- The trouble with HTML5 Canvas
Declarative HTML5 Canvas with Konva and react-konva
- A particle generator pushed to 20,000 elements with Canvas
- Billiards simulation with MobX and canvas
Using a React alternative like Preact or Inferno
- Stress testing with a recursive fractal
- Trying the stress test in Preact and Inferno
- Conclusion
- Appendixes
Appendix A - roll your own environment
- Bundle with Webpack
- Compile with Babel
- Quickstart
- NPM for dependencies and tools
- Step-by-step with boilerplate
- Add Less compiling
- Serve static files in development
- Webpack nice-to-haves
- Optionally enable ES7
- Check that everything works
- Remove sample code
- The environment in depth
- That’s it. Time to play!
Appendix B - Browserify-based environment
- NPM for server-side tools
- The development server
- Compiling our code with Grunt
- Managing client-side dependencies with Bower
- Final check
Contributor
About the Contributors
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Write and Publish on Leanpub
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.