Book Image

HTML5 Graphing and Data Visualization Cookbook

By : Ben Fhala
Book Image

HTML5 Graphing and Data Visualization Cookbook

By: Ben Fhala

Overview of this book

The HTML5 canvas tag makes creating any plot shape easy, all you have to do then is fill it with exciting visualizations written in JavaScript or using other visualization tools. "HTML5 Graphing and Data Visualization Cookbook" is the perfect break into the world of Canvas, charts, and graphs in HTML5 and JavaScript. In this book we will go through a journey of getting to know the technology by creating and planning data-driven visualizations. This cookbook is organized in a linear, progressive way so it can be read from start to finish, as well as be used as a resource for specific tasks.This book travels through the steps involved in creating a fully interactive and animated visualization in HTML5 and JavaScript. You will start from very simple "hello world"ù samples and quickly dive deeper into the world of graphs and charts in HTML5. Followed by learning how canvas works and carrying out a group of tasks geared at taking what we learned and implementing it in a variety of chart types. With each chapter the content becomes more complex and our creations become more engaging and interactive.Our goal is that by the end of this book you will have a strong foundation; knowing when to create a chart on your own from scratch and when it would be a good idea to depend on other APIs.We finish our book in our last two chapters exploring Google maps and integrating everything we learnt into a full project.
Table of Contents (17 chapters)
HTML5 Graphing and Data Visualization Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Going through a funnel (a pyramid chart)


It's rare that you see a pyramid chart that is actually created dynamically. For the most part, they're designed and fleshed out creatively and turn into a .jpg file when they reach the web, and that's exactly why I wanted to start this chapter with this chart—it's not as complex as it might sound.

A pyramid chart is in essence a way for us to visualize changes in data that are quantitative by nature. They have a clear relationship between the lower layers and the higher layers. That sounded very vague, so let's explain it through an example.

Imagine that X amount of people complete their eighth year of school in a given year, if we follow the same group of people, how many of them would have completed their twelfth year of education four years later? Fair enough! We can't know the answer to that, but one thing we do know is that it can't be more than the initial X amount of people. The idea of a pyramid chart is exactly that of a body of data, of which...