Google Chart API’s New Schematic Maps

Raymond Yee, April 11th, 2008

Graphic, schematic maps can very useful in a wide range of charting scenarios and thanks to a recent upgrade, now you can use the Google Chart API to create them. As we reported earlier, Google’s Chart API is one of the simplest of all Google APIs. By passing parameters in the URL (i.e., HTTP GET), you can get images for various types of charts — bar charts, pie charts, line charts, etc — that you can embed on any web page. Plenty of mashups are already using the API including the 15+ mashups listed here.

The recent update adds this fun and useful capability as you can see in the docs. You can embed static maps that you can color by country or by US state. Here are a few simple examples of such maps, starting with a world map:×220&chd=s:_&chtm=world

World Map 1

You’ll note that the parameters in the URL control the map, three of which are mandatory for any Google chart:

  • type (cht): t represents the map type
  • size (chs): The size used in the example (440 by 220 pixels) is the maximum available for all maps.
  • data for the map (chd): Here s:_ is the simple encoding for “missing” (or no) value.
  • and a fourth parameter particular to maps (chtm) indicates a geographic area (e.g., world, asia, middle_east).

Compare the world map to the “Hello World” of Google Charts to see how the same API can be used to simple pie chart (click on the pie chart to see the full url/call):

Going back to the world map, see how changing the chtm parameter in the URL displays a map of Europe and using three additional parameters (chco, chld, and chd) highlight Hungary in green, while keeping other European countries an off-white:

Are people already using the Google Chart API to make maps? Take a look at the article Making maps with Google Chart API (listed in the ProgrammableWeb mashup database), which discusses the issues involved with generating the following fuller example of a world map:

Full World Map

Jeffrey Barke wrote a short tutorial for creating maps with the Google Chart API.

As others have noted, the maps one can create in this way are more demonstrations of what’s possible than fully developed functionality — so it’ll be interesting to see whether/how Google refines this feature of the Google Chart API.

For more on the Google Chart API at ProgrammableWeb check-out Google Chart Mashups: Love and Stats.

Both comments and pings are currently closed.

7 Responses to “Google Chart API’s New Schematic Maps”

April 11th, 2008
at 4:36 am
Comment by: Webstop: Przystanek Web » Blog Archive » Mapy jako typy wykresów w Google Charts API

[...] grupie dyskusyjnej, większości więc chyba umknęły – ja też dowiedziałem się dopiero dzięki dzisiejszemu newsowi na Programmable [...]

April 12th, 2008
at 3:33 am
Comment by: links for 2008-04-12 — SOJo: Student of Online Journalism by Megan Taylor

[...] Google Chart API’s New Schematic Maps Graphic, schematic maps can very useful in a wide range of charting scenarios and thanks to a recent upgrade, now you can use the Google Chart API to create them. (tags: api chart google maps) [...]

April 14th, 2008
at 12:39 pm
Comment by: - links for 2008-04-14

[...] Google Chart API’s New Schematic Maps New upgrades to Google Maps (tags: maps tools) [...]

June 5th, 2008
at 1:57 pm
Comment by: 50 Cool Things You Can Do with Google Charts API | College@Home

[...] Highlight a specific country: If you just need a simple image to highlight a specific country, it’s easy to do it with Google Charts. [...]

October 30th, 2008
at 7:17 pm
Comment by: deutsche hotels

The size of 420 by 220 pixels is too small for the regional view.

April 28th, 2010
at 5:51 am
Comment by: Anonymous

if we want to highlight the borders,then what we have to do.

January 6th, 2011
at 7:49 am
Comment by: Gavin

I created a tutorial on how to create heat maps with the Google Chart API –

Follow the PW team on Twitter

APIs, mashups and code. Because the world's your programmable oyster.

John Musser
Founder, ProgrammableWeb

Adam DuVander
Executive Editor, ProgrammableWeb. Author, Map Scripting 101. Lover, APIs.