Book Image

ActionScript Graphing Cookbook

Book Image

ActionScript Graphing Cookbook

Overview of this book

"A picture is worth a thousand words" has never been more true than when representing large sets of data. Bar charts, heat maps, cartograms, and many more have become important tools in applications and presentations to quickly give insight into complicated issues.The "ActionScript Graphing Cookbook" shows you how to add your own charts to any ActionScript program. The recipes give step-by-step instructions on how to process the input data, how to create various types of charts and how to make them interactive for even more user engagement.Starting with basic ActionScript knowledge, you will learn how to develop many different types of charts.First learn how to import your data, from Excel, web services and more. Next process the data and make it ready for graphical display. Pick one of the many graph options available as the book guides you through ActionScript's drawing functions. And when you're ready for it, branch out into 3D display.The recipes in the "ActionScript Graphing Cookbook" will gradually introduce you into the world of visualization.
Table of Contents (17 chapters)
ActionScript Graphing Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Overlaying a heat map


For this recipe we are going to overlay a heat map over a map layer. This is a bit more challenging than what we did before but it should go smoothly as the concept is not that complex. Heat maps are used to represent density over a region by adding different colors over certain areas. In the case, we are going to display the number of animal specimens over the area of the United States using the Global Biodiversity Information Facility's data.

Getting ready

Open the files from the code downloaded from the Packt Publishing web site in the folder Chapter 6 and within that, Recipe 6.

How to do it...

The following are the steps required to overlay a heat map on a map:

  1. First get over to the gbif.org website to download an XML file with the US data in it. The URL is given as http://es.mirror.gbif.org/ws/rest/density/list?originisocountrycode=US.

  2. Remove the extra markup in the XML file just so that it would be easier to parse it in ActionScript.

  3. Embed the XML file in the Main...