Data Visualization with JavaScript 1st Edition Stephen A. Thomas - Download the complete ebook in PDF format and read freely
Data Visualization with JavaScript 1st Edition Stephen A. Thomas - Download the complete ebook in PDF format and read freely
https://ebookfinal.com/download/learning-ipython-for-interactive-
computing-and-data-visualization-1st-edition-rossant/
https://ebookfinal.com/download/cartography-visualization-of-
geospatial-data-third-edition-menno-jan-kraak/
https://ebookfinal.com/download/the-visual-organization-data-
visualization-big-data-and-the-quest-for-better-decisions-1st-edition-
phil-simon/
A Year with Thomas Merton Thomas Merton
https://ebookfinal.com/download/a-year-with-thomas-merton-thomas-
merton/
https://ebookfinal.com/download/data-visualization-part-1-new-
directions-for-evaluation-number-139-1st-edition-evergreen/
https://ebookfinal.com/download/minimally-invasive-periodontal-
therapy-clinical-techniques-and-visualization-technology-1st-edition-
stephen-k-harrel/
https://ebookfinal.com/download/html5-programming-with-javascript-for-
dummies-mueller/
https://ebookfinal.com/download/college-algebra-with-modeling-and-
visualization-4th-edition-gary-k-rockswold/
Data Visualization with JavaScript 1st Edition Stephen A.
Thomas Digital Instant Download
Author(s): Stephen A. Thomas
ISBN(s): 9781593276058, 1593276052
Edition: 1
File Details: PDF, 14.22 MB
Year: 2015
Language: english
DATA
VISUALIZATION
• WITH JAVASCRIPT
•
STEPHEN A. THOMAS
•
Data Visualization
with JavaScript
Data Visualization
with JavaScript
Stephen A . thomA S
DATA VISUALIZATION WITH JAVASCRIPT. Copyright © 2015 by Stephen A. Thomas.
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical,
including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the
copyright owner and the publisher.
Printed in USA
First printing
19 18 17 16 15 123456789
ISBN-10: 1-59327-605-2
ISBN-13: 978-1-59327-605-8
For information on distribution, translations, or bulk sales, please contact No Starch Press, Inc. directly:
No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names
mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a
trademarked name, we are using the names only in an editorial fashion and to the beneit of the trademark owner, with no intention
of infringement of the trademark.
The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the
preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to
any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.
About the Author
Stephen A. Thomas specializes in frontend development at Georgia Tech’s Depart-
ment of Education Technology and has developed complex JavaScript visualiza-
tions for the health-care and security industries. He writes and speaks about data
visualization in publications and at conferences around the world.
Introduction ................................................................................................................... 1
The Book’s Philosophy ..................................................................................................... 2
The Book’s Contents ........................................................................................................ 3
Source Code for Examples .............................................................................................. 4
x | Contents in Detail
Charting Many Variables ................................................................................................ 94
Step 1: Prepare the HTML Markup...................................................................... 94
Step 2: Draw the Charts ....................................................................................... 95
Step 3: Establish a Default Style for the Charts................................................. 96
Step 4: Modify the Default Style for Special Classes ........................................ 97
Step 5: Create a Unique Style for a Speciic Chart ............................................ 99
Annotating Sparklines .................................................................................................. 101
Step 1: Prepare the Data .................................................................................... 102
Step 2: Prepare the HTML Markup ................................................................... 102
Step 3: Add the Chart......................................................................................... 102
Step 4: Add the Primary Annotation ................................................................. 103
Step 5: Provide Additional Information ............................................................ 105
Drawing Composite Charts ......................................................................................... 105
Step 1: Draw the Trading Volume Chart ........................................................... 106
Step 2: Add the Closing Price Chart ................................................................. 106
Step 3: Add the Annotations ............................................................................. 107
Step 4: Show Details as a Chart......................................................................... 108
Responding to Click Events ..........................................................................................110
Step 1: Add the Chart ..........................................................................................110
Step 2: Handle Click Events ................................................................................ 111
Step 3: Improve the Transitions ..........................................................................112
Step 4: Animate ....................................................................................................114
Updating Charts in Real Time.......................................................................................115
Step 1: Retrieve the Data.....................................................................................116
Step 2: Update the Visualization ........................................................................116
Summing Up ...................................................................................................................117
Contents in Detail | xi
Step 4: Connect the Nodes with Edges ........................................................... 133
Step 5: Automate the Layout ............................................................................. 134
Step 6: Add Interactivity......................................................................................137
Revealing Language Patterns with Word Clouds ...................................................... 138
Step 1: Include the Required Libraries ............................................................. 139
Step 2: Prepare the Data .................................................................................... 140
Step 3: Add the Required Markup .....................................................................141
Step 4: Create a Simple Cloud ...........................................................................142
Step 5: Add Interactivity..................................................................................... 143
Summing Up .................................................................................................................. 146
Contents in Detail | xv
Acknowledgments
Even though it’s been said many times, there’s no getting around the fact that
a book is the work of many people other than the author. This book certainly
wouldn’t have been possible without the patience of Seph and the other ine folks
at No Starch Press. There simply is no better publisher for technical books. Kudos
also to Chris for the technical review, though, of course, the remaining mistakes
are mine alone. I owe a special thanks to NickC for his generosity; it’s such a plea-
sure to meet folks that appreciate the true community spirit of the Web and web
development. Finally, shout-outs to the team developing the Open Academic
Environment and my colleagues at the Georgia Institute of Technology; working
with them is a true pleasure.
Introduction
2 | Introduction
Reality vs. an Ideal World
When you begin building your own visualizations, you’ll discover that the
real world is rarely as kind as you’d wish. Open source libraries have bugs,
third-party servers have security issues, and not every user has updated
to the latest and greatest web browser. I’ve addressed these realities in the
examples in this book. I’ll show you how to accommodate older browsers
when it’s practical, how to comply with security constraints such as Cross-
Origin Resource Sharing (CORS), and how to work around bugs in other
folks’ code.
Introduction | 3
Source Code for Examples
To make the text as clear and readable as possible, examples usually contain iso-
lated snippets of JavaScript, plus occasional fragments of HTML or CSS. Complete
source code for all examples is available on GitHub at http://jsDataV.is/source/.
4 | Introduction
Graphing Data
1
Zadik-ben-Zadik, 112.
61 15 dodne
donde
73 7 venementi
vehementi
119 22 101
110
129 4 Beitrâge
Beiträge
129 38 antiquissime
antiquissimi
163 2 Vikins
Vikings
214 39 Saviesa
Saviesa, según la
opinión corriente,
aunque propiamente
no fué D. Jaime su
autor.
222 36 libre
libro
274 35 (1300)
(1390)
294 15 Terencio,
Peno Terencio Peno
303 20 1498
1398
312 29 Jun
Juan
314 37 Herberg
Herbera y
380 5 Osuna
Osma
400 34 Zamburda
Zambardo
420 22 1913
1915
422 31 bulas
buhas
463 6 1913
1915
OBRAS DE D. JULIO CEJADOR Y FRAUCA
¡De la tierra...!,
colección de artículos. Pesetas 3.—
Jubera Hermanos, Campomanes, 10, Madrid.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
1.F.1. Project Gutenberg volunteers and employees expend
considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookfinal.com