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
About the Author
About the Reviewer

Obtaining a Google API key

To work with most of the Google APIs, you must have a Google API key. As such we will go through the steps involved in getting a Google API key.

Google API has certain limitations and constraints. Although most of the APIs are free to use for small- to medium-sized sites, you are bound by some rules. Please refer to each library for its rules and regulations.

Getting ready

To get through this recipe you must have a Google ID; if you do not have one, you will need to create one.

How to do it...

Let's list the steps required to gain access to the Google API:

  1. Log in to the API console at

  2. Select the Services option from the left-hand side menu:

  3. Activate the API that you want to use (for example, in the next recipe Building a Google map we will use the Google Maps API v3 service):

  4. Again in the left-hand side menu select the API Access option. You will have to copy the API key and replace it in future Google API projects:

This is the only...