O'Reilly logo

ActionScript Graphing Cookbook by Peter Backx, Dominic Gélineau

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3D world population chart, part 3: The data

Now that the globe is finished, it's time to start adding the data. We will use the data format as it is provided by the original inspiration for this recipe: http://code.google.com/p/webgl-globe/.

Data sets come in series of repeating (latitude, longitude, magnitude) tuples. The latitude and longitude map to a place on the globe. The magnitude represents the actual data we want to show, in this case, the population at that location.

Getting ready

We will start from the end result in the previous recipe.The data set can be downloaded from http://code.google.com/p/webgl-globe/source/browse/globe/population909500.json.

Click on the View raw file link to download the actual JSON file. Store that file in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required