29 April 2012

Google GeoChart in Qlikview

I wanted to use Google GeoChart in Qlikview and built a Qlikview Extension Object which displays a heat map generated by Google GeoChart. Although it does not work perfectly, it may give an idea and may be a starting point for people who would like to use Google GeoChart in their Qlikview applications.  Below is a screenshot from my demo application:



My demo application and the extension object set-up files can be downloaded from the following links:

If you'd like to see it working on your computer, please:
  • Run GGeoChart.qar (i.e. double click on it) to install the GGeoChart extension object.
  • Or, extract the GGeoChart.zip file under Qlikview's extension objects folder. (In Windows 7, it is C:\Users\[UserName]\AppData\Local\QlikTech\QlikView\Extensions\Objects). 
  • Open the demo application GeoChartViewer.qvw with Qlikview and turn the webview mode "ON" from the view menu.
  • At first you should see a world map, then drill down to country level by selecting United States in countries list-box and then drill down to state/province level by selecting California in provinces list-box.

If you'd like to use the extension object in your qlikview application, please:
  • note that a variable is necessary to keep the drill down level (i.e country, state/province, city). By default, the variable is assumed to be named as vGeoLevel. The extension object is relying on this variable to find out the level. The value/formula of the variable can be copied from the GeoChartViewer.qvw application (pls. see the link above).

Facts, known issues, etc.:
  • The sales data in GeoChartViewer.qvw is from Microsoft's Contoso database.
  • The geographic data (i.e. country, state/province, city) in GeoChartViewer.qvw is from Google.
  • GeoChartViewer.qvw is tested on Qlikview 11 SR1.
  • GeoChartViewer.qvw is tested on a computer with Internet Explorer version 9. 
  • The map displayed by the extension object does not work well for every set of data. For example, if one checks United States data in the GeoChartViewer.qvw, (s)he should be able to drill down from World to USA, then USA to California level and finally see the data for the cities in California. However, if one selects Italy, then (s)he will not be able to see the data until (s)he selects a province. That is because Google GeoChart does not recognize the province names which are passed to it. 

For those who would like to get familiar with qlikview extension objects, I strongly suggest to read the  following blogs: