Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

World Heatmap using Google API

Hi,

Has any one used Google API to show world heatmap? This should be without using extension objects. We have trouble in installing extension objects on the server. I see that Google API can be used to show points on the map using longitude and latitude but need help to show heatmap by country. Countries with high volume of data should show in particular color.

Thanks in advance.

8 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I have done this. I used the original google chart api and set chtm=world.

The QV Cookbook has an example of doing a heatmap with the google chart api if you need an example.

-Rob

http://robwunderlich.com

Not applicable
Author

Rob,

Thank you for the answer. It was helpful. I was able to see the world map by changing chtm but having difficulty in changing other parameters. If I increase the size even by a pixel it shows blank. I need a bigger world map. Also, I tried to change states to countries but color schemes are not getting applied. Can you please provide example for world heat map?

Thank you again.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you give an invalid size (see the chart API doc for limits), the chart will not render.

Attached is an example of a world chart map.

-Rob

kalyandg
Partner - Creator III
Partner - Creator III

hi Rob,

           i am in need of the latitude and longitude values of google map, please send me the file

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Kalyan,

This thread is about the google chart API, which does not use lat/long. Search for other threads that use google map API for info about lat/long data.

Rob

Not applicable
Author

Hi Rob,

is it possible to use this solution for one Country? I mean to show sales in each district in one Country?

Best regards, Mirek

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The Google chart APi has limited maps available. The V2 of the chart API has more maps, but I haven't tried it.

-Rob

selcukcadir
Creator II
Creator II

hi rob,

I want to show coloring budget and sales in countries.

sample ;

Country "US"  Sales Total =  5100  Budget Total = 23000  rate = %22

red = %0-%25

yellow = %26-%50

blue = %51-%80

green = %80-%100

dark green = < %100

Thanks

Selcuk.

my table;

data:

LOAD * INLINE [

Product, Country, Sales, Budget

A, US, 1000, 5500

B, US, 1500, 6500

A, US, 2000, 7500

C, US, 600, 3500

A, AU, 2000, 4500

A, CN, 1 , 5500

B, CN, 500, 3500

C, IN, 300, 2500

C, CN, 20, 1500

C, NZ, 600, 2500

]

;

='http://chart.apis.google.com/chart?&cht=t'

                    & '&chs=' & '440x220' /* Chart size */

                    & '&chtm=' & 'world'          /* Region */

                    & '&chco=' & 'f5f5f5'  /* Color for no value */

                    & ',' & 'edf0d4,6c9642,13390a'  /* Color gradient */

                    & '&chld=' & concat(DISTINCT Country, '', fieldIndex('State', Country))

                    & '&chd=s:' & concat(  aggr(  mid('$(simpleEncodingMap)', 1+round(61*sum(Sales)/max(TOTAL aggr(DISTINCT sum(Sales), Country)),1),1), Country), '', fieldIndex('State', Country))