12 Replies Latest reply: Jun 13, 2012 11:21 AM by David GANGAROSSA RSS

    Colour coding each region on Google map

    Beanz

      Hi,

      I'm trying to colour code each site differently for each region within my Qlikview map a different colour.

      For example: London : red ; New York : blue ; Glasgow : Green , a different colour for common suppliers across more than one site ...etc..

       

       

      Any help / tips would be appreciated!

       

       

      Many thanks!


        • Colour coding each region on Google map
          Beanz

          Any suggestions?

          • Colour coding each region on Google map
            Jean-Jacques Jesua

            Hi

            I'm not sure to undertand. Do you want a choromap ? or do you want to color some dots ?

            Look at the attachment to understand some tips.

            For example, you have country & cities as dimension and you want to color each city from the same country with the same color.

            Do as expression :

            City

            Country

             

            Hope it helps you

            JJJ

            • Colour coding each region on Google map
              Community Administrator

              Check out Rob Wunderlich's "QlikView Cookbook"...he has an example app that demonstrates heat maps with the Google Chart API. His is US-state based, so you'll have to do some research about converting it.

              http://www.robwunderlich.com/Download.html

                • Colour coding each region on Google map
                  pmizenin

                  Jason,

                  In Rob's Cookbook,there is variable called simpleEncodingMap

                  /* The string that will be used to perform simple encoding of the data values for Goole Chart */
                  SET simpleEncodingMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";

                  What is it, how does it work. There is nothing mentioned about it but it is used in Chart in '&chd=s:' ........

                  Thx.

                   

                    • Colour coding each region on Google map
                      Trevor Roth

                      This variable is needed per the Google Chart API. At a high level the Google chart API (in this example) wants you to rank/order the 50 states from highest to lowest for the metric that is being displayed in the chart. Keep in mind all these values are being passed in the URL so we want to attempt to compress it and keep the number of characters transmitted as minimal as possible. Think of this as a simple substitution method/algorithm. If the value is 0, then we substitute with the first character in the simpleEncodingMap 'A'. If the value is 1, then B; 3 then C, etc. The largest value we can account for is 61, which would be the last character '9'. The fact that we can only account for 61 values does not matter because this is a US map and we only have 50 states - hence why we are using the simpleEncodingMap and not a different method that would allow for more values. You can see that by using this method we can reduce the number of characters in the URL transmitted over the 'wire' to Google - which I am sure they appreciate.

                       

                      Honestly, you don't really need to understand what's being done here, since it's only being done as a requirement of the Google Chart API - and has nothing to do with QlikView.

                       

                       

                      Documentation on the simpleEncodingMap:

                      http://code.google.com/apis/chart/docs/data_formats.html#simple

                       

                      Documentation on the version of the Google Chart API used in the example:

                      http://code.google.com/apis/chart/docs/gallery/map_charts.html

                       

                      Documentation on a more recent version of the Google Chart API:

                      http://code.google.com/apis/chart/docs/gallery/new_map_charts.html

                       

                      Hope this helps!

                      • Colour coding each region on Google map
                        Rob Wunderlich

                         


                        pmizenin wrote:
                        In Rob's Cookbook,there is variable called simpleEncodingMap
                        /* The string that will be used to perform simple encoding of the data values for Goole Chart */
                        SET simpleEncodingMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
                        What is it, how does it work. There is nothing mentioned about it but it is used in Chart in '&chd=s:' ........


                        Trevor gave an excellent explanation as to why the Google Chart API requires encoding and pointed to the definitve documentation on available encodng methods. I can only add that the example "simpleEncodingMap" string is not passed in the url to Google chart. It is utilized as a parameter in the expression that builds the url with the encoed data values.

                        -Rob

                          • Colour coding each region on Google map
                            Gareth Campbell

                            Hello,

                            I have a further question to this problem. I have 142 country codes utilised in a map that I want to display using a gradient of colours. I really only want to show the countries using a 6 colour gradient where the top 5 get coloured along the gradient and the rest get the lowest value which is an off white colour. I'm having trouble adapting the example from the cookbook.

                            The google documentation contradicts itself especially when I look at the code from the cookbook. Can you please answer some simple questions for me?

                            Is it possible to do this in theory? i.e on 6 colour codes but 142 country codes? From the documentation it makes me think I need a colour code for every country code...

                            This would help me a lot!

                             

                            Thanks

                            Gareth

                      • Colour coding each region on Google map
                        krishna_s

                        Can we change colors of bubbles based on some expression. I'm using it in sales and I want to represent areas with coloured bubbles based on their sales range.

                          • Colour coding each region on Google map
                            Jean-Jacques Jesua

                            You can do it using the backgroung of the fist expression (longitude ).

                             

                            The create an expression like this

                             

                            = If ( Sum(Sales) >   100 ,  Color(1) ,

                                      If ( Sum(Sales) >   50,  Color(2) ,

                                     ...))

                             

                             

                            You can also use the colormix Wizard (  when you edit the background color expression , go to file menu)


                            JJ

                          • Re: Colour coding each region on Google map
                            David GANGAROSSA

                            Hi All,

                             

                            GIS/Maps Analytics in QlikView is a very interesting topic indeed.

                             

                            QlikView customers and channel parners are interested in displaying their QlikView KPI indicators on Geographic maps (ex: GMaps) but also sometimes on a Building Plan (ex: logistic warehouse, supermarket, hospital).

                             

                            Business Geografic has developed a mapping extension for QlikView (V9, V10, V11) namely "GeoQlik" and we have been a Technology Partner of QlikTech since 2006 starting with QlikView 8!

                             

                            I hereby suggest you to have a look at our new mapping extension for QlikView 11 "SR1": GeoQlik v11.6:

                            http://www.geoqlik.com/en/geoqlik-for-qlikview/geoqlik-v11.html

                             

                            Please find hereafter a few "Heat Maps" screenshots of GeoQlik V11.6 using WMS/TMS services to display QlikView KPIs:

                            geoqlik_v11_demo_1.JPG

                            geoqlik_v11_demo_2.JPG

                            geoqlik_v11_demo_3.JPG

                            geoqlik_v11_full.jpg

                            Thanks and best regards,

                             

                            David

                            @ Business Geografic