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

Connecting a Twitter feed to a Google map

This is the start of a very fun experiment with Google Maps. The goal of the task is to create a link between Twitter posts and a Google map. It will take us a few recipes to get to our final goal. By the end of this recipe, we will have a Google map. This Google map will be clickable in any area of the screen. When the user clicks on the map, they will connect to the Twitter API and search for tweets in that area that have the word "HTML5" in them. When the result comes back, it will pop a new marker onto the area that was clicked and add the most recent tweet on that topic originating from that location. At this stage, it would just be a marker with a rollover that shows us the actual tweet without more information.

Getting ready

If you haven't read through Chapter 9, Using Google Maps, you might find this chapter a little difficult, so I encourage you to read it before starting with this recipe. At this stage you should have a Google API set up...