Creating a geographic chart with Google Visualization API
In our first recipe for this chapter, we will start working with a vector-based map of the world. We will use it to highlight countries based on a data feed. In our case, we will use Wikipedia's list of countries as per the intentional homicide rate (latest numbers).
To view this raw data go to http://en.wikipedia.org/wiki/List_of_countries_by_intentional_homicide_rate.
Our goal will be to have a map of the world highlighted with a range of colors according to the number of intentional homicides per 100,000 people. As of the latest data in 2012 according to Wikipedia, it sounds like the most unsafe place to live in is Honduras—if you don't want to be intentionally killed—while you should feel really safe from intentional killing in Japan. How is your country doing? Mine is not that bad. I should probably avoid my local news stations that make me feel like I'm living in a war zone.
Getting ready
There isn't much that you need to do. We...