TABLEAU VERSUS QLIK SENSE: PLOTTING CITIES AND POSTAL CODES ON A MAP

Last year I wrote about the differences between Qlikview and Tableau. Since then Qlik Sense has gotten more popular. Hence, I came up with the idea to compare Tableau 10.0.1 to Qlik Sense. 3.0 SR when it comes to plotting geocodes on a map.

To get some experience in Qlik Sense I started building small applications with Qlik Sence. Personally I am interested in which self-service data visualization tool (Qlik Sense or Tableau) is the best in a specific situation.

tb-qv

What do you need? A dataset with all European postal codes and cities. I downloaded these files here:

http://www.clearlyandsimply.com/clearly_and_simply/2010/10/geocoding-databases-for-europe.html

TABLEAU

Loading the data..

After opening Tableau connect to a Text file by clicking on ‘Text file’ and open one of the following downloaded files CSV-files:

European_cities_us_standard.csv
European_postcodes_us_standard.csv

tb_img1

To select only the postal codes and cities in The Netherlands, click on ‘filter’ in the upper right corner and select the field ‘Country (ISO 3166-2)’ and select the country code ‘NL’. Press the ‘Ok’ button twice.

Build the following screen by dragging the other CSV-file to the upper part of the screen. Note that Tableau makes the join between the two tables.

Hide the columns longitude and latitude by right click on the columns. Tableau don’t need these information. It has his own geo-information.

Click on ‘Sheet 1’ in the lower left corner of the screen to go to the next step.

Building the graph in Tableau: Plotting Dutch cities on a map.

After open the screen, double clicking on ‘European city’ is enough to position longitude and latitude automatically. The map with dots will emerge instantly. See the result below.

tb_img2.png

Note (<2K unknown) that not all cities are plot on the map because of not all the (very small) cities are recognized by Tableau or spelled correctly in the dataset.

Plotting all postal codes on a map (more detail)

In this section I will plot all Dutch postal codes on the map of The Netherlands. You can do this by replacing the field ‘European city’ on the marks pane by the field ‘European Postal Code’. The easiest way to do this is by dragging the field ’European Postal Code’ on to the field ‘European city’ in the marks pane. See the result below and look how much detail you can get.

tb_img3

It’s also possible to plot the postal codes area’s on the map. This can be done by selecting the ‘filled map’ in the ‘Show me’ pane.

tb_img4

Qlik Sense

Loading the data..

After starting the Qlik Sense application and creating and opening an app, click on ‘Data load editor’. The following screen will appear.

QV_img1.png

  • Create a new connection by clicking the button ‘Create new connection’ in the upper right corner and select ‘folder’.
  • Go to the folder which contains the following downloaded CSV-files:
    • European_cities_us_standard.csv
    • European_postcodes_us_standard.csv
  • Name the connection ‘GEOData’ and press the ‘create’ button.
  • Copy the following script into the ‘Data load editor’:
qualify *;

[Cities]:
LOAD
               [European City],      
               GeoMakePoint([Latitude],[Longitude]) as CityLocation
FROM [lib://GEOData/european_cities_us_standard.csv]
(txt, codepage is 1252, embedded labels, delimiter is ',', msq)
where [Country (ISO 3166-2)] = 'NL';

[PostCodes]:
LOAD
    [European Postal Code],
    GeoMakePoint([Latitude],[Longitude]) as PostalCodeLocation
FROM [lib://GEOData/european_postcodes_us_standard.csv]
(txt, codepage is 1252, embedded labels, delimiter is ',', msq)
where [Country (ISO 3166-2)] = 'NL';
  • Click the button ‘Load data’ in the upper right corner of the screen to load data into Qlik Sense.
  • When the data has loaded you can make a visualisation. First you go to ‘App overview’ and create a new sheet.

qv_img2

Building the graph in Qlik Sense: Plotting Dutch cities on a map.

1)        After creating a new app and importing a record with Dutch cities in it, you can make the graph. Do not forget to put the application in edit mode by using the ‘Edit’ button.

qv_img3

QV_img4.png

2)        Drag the graph ‘Map’ from the chart pane to the sheet. Do not forget to unfold the chart pane by clicking this button

QV_img5.png

3)         Click the ‘Add dimension’ button and select ‘Cities.European City’. The following graph will appear:

QV_img6.png

4)         If you want, you can change the bubble size:

QV_img7.png

The graph will be shown as below:

QV_img8.png

Plotting all postal codes on a map (more detail)

1)         Create a second graph by dragging the chart ‘Map’ onto the sheet.

QV_img9.png

2)         Click ‘Add dimension’, select ‘PostCodes.European Postal Code’ and change the bubble size.

QV_img9a.png

Note: You can see Qlik Sense can’t plot all the postal codes!

 

CONCLUSION

In both applications it’s possible to make great visualisations. The difference between the applications is that Tableau has geo-coordinates (longitude and latitude) in it for each city in the Netherlands. In Qlik Sense you need to find these data on the internet or buy these data separately. In Qlik Sense you also need some scripting/programming skills to build the application.

Personally I find It’s easier to use Tableau when it comes to plotting geocodes on a map. You need less clicks to achieve results and the user interface is easier to understand.

The most striking difference between Tableau and Qlik sense is that Tableau can plot more data points on a map then Qlik Sense. Qlik Sense cannot plot al Dutch postal codes on a map, whereas Tableau can plot all European postal codes onto the map.

As both Tableau and Qlik Sense are complex applications, I might have overlooked some features that would make this easier in either Tableau or Qlik Sense. As I am still learning I would appreciate it if you leave a comment with your suggestions or best practices for either applications.

 

TABLEAU VERSUS QLIK SENSE: PLOTTING CITIES AND POSTAL CODES ON A MAP

TABLEAU VERSUS QLIKVIEW: PLOTTING GEOCODES ON A MAP

I’m a Qlikview consultant who wants to know more about Tableau. To get some experience in Tableau I started building small applications with Tableau. Personally I’m interested in which data visualization tool (Qlikview or Tableau) is the best in a specific situation. In this blog I will compare Tableau to Qlikview, especially the capability of plotting geocodes on a map.

In the example below I plotted all Dutch cities on a map.  The size of the dot gives an indication of the population.

image001

This type of map can also be used for visualizing the amount of restaurants per city or profit per production facility. See the following URL’s in Tableau public for more inspiration.

https://public.tableau.com/s/gallery/worlds-largest-stadiums

https://public.tableau.com/s/gallery/major-colorado-wildfires-1971-2013

https://public.tableau.com/s/gallery/vaccine-preventable-outbreaks

https://public.tableau.com/s/gallery/read-all-about-it

Tableau

In Tableau it’s very simple to build this kind of visualization. After importing the data (Excel file with Dutch cities)  you have to make sure the geographic role of the dimension city is marked as City.

image003

When the geographic role is turned in to City the field will begin with a small globe icon.

image005

This way Tableau can generate the geocodes.

Building the graph

After that you have to double click on longitude and latitude. Then drag the dimension city to Marks. The map with dots will emerge instantly. There is an even faster way of doing this: double clicking on city is enough to position longitude and latitude automatically. 

When you drag the measure ‘huishoudens14’ to size, the size of the dot gives an indication of the population.

image007

For this example I used a dataset with Dutch cities in it. You can download the dataset here: http://www.scp.nl/Onderzoek/Lopend_onderzoek/A_Z_alle_lopende_onderzoeken/Statusscores

Qlikview

If you want to do this in Qlikview, you have to do a lot more. The graph must be made custom and you have to get through complicated steps which take to much explanation for a short blog like this.

  1. First you have to get the geocodes for each city. To obtain the geocodes you have to write a script that connects to an online API such as google maps.
  2. You have to load the data in Qlikview by a script.
  3. After that you have to write a formula that translates the geocodes to coordinates on a picture of the Netherlands. This is a very complicated formula which takes into account the outline of the Earth.
  4. After that you have to select the Scatter chart with the right settings.

If you want to see the whole procedure look here: http://qlikshow.com/geocoding-and-maps-visualizations/

Conclusion

Personally I think Tableau is the best tool for geocoding. You can build a map visualization within a half an hour. In Qlikview it will take a lot more time.

As both Tableau and Qlikview are complex products I might have overlooked some features that would make this easier in either Tableau or Qlikview. As I am still learning I would appreciate it if you leave a comment with your suggestions or best practices for either products. I hope to document more of what I’ve learned starting working with Tableau over the coming months in future posts.

Last year Qlik introduced a new product called Qlik Sense. Qlik Sence is more self-service and also has good geocoding capabilities. I installed and used the product for training purpose. Maybe I will write a blog about Qlik Sense next time.

TABLEAU VERSUS QLIKVIEW: PLOTTING GEOCODES ON A MAP

TABLEAU VERSUS QLIKVIEW: CYCLIC GROUPS IN TABLEAU

I’m a Qlikview consultant who is starting to use Tableau. In many cases Tableau is the better option, but I was surprised that Tableau has no functionality that does the same as Cyclic groups in Qlikview.

This functionality is useful when you have multiple dimensions and there is not enough space to display a graph for each dimension. In Qlikview it’s possible to make a Cyclic group.  You can give the end user the choice which dimension he wants to show.

Top 10 by Product Nameimage001When the user clicks this button image002 the dimension changes from ‘Product Name’ to ‘Customer Name’. See the screenshot below.

image004

Qlikview

Create a Cyclic Group in Qlikview:

  1. In Qlikview you can make a Cyclic Group by choosing “Setting -> Document properties” in the main menu
  2. Choose the tab Groups and click ‘New’
  3. Give the group a Name
  4. Click ‘Cyclic Group’
  5. Add the field to Used Fields and click ‘Ok’.

.image005

After making the group you can use the Cyclic dimension in the dimensions tab of your chart. See the screen below.

image007

Tableau

The best way of doing this in Tableau is by creating a parameter and a calculated field.

1. Create a parameter by clicking right on the dimensions pane in the main screen and select ‘Create Parameter’. After that you can build the parameter in the window that appears.

image009

2. Create a Calculated field by clicking right on the dimensions pane and select ‘Create Calculated field’. Build the calculation in the window that appears. See below.

image011

3. Show Parameter Control by clicking right on the parameter and select ‘Show Parameter Control’.

image013

4. Build the visualization. Drag the calculated field ‘CalcCustomerProduct ‘ from step 2 to Rows and drag ‘Sales’ to Columns.

image014

5. The final result after deploying looks like this.

image016

Conclusion

Personally I think the Cyclic dimension in Qlikview is a great functionality. With creating a calculated field and parameter you can do the same in Tableau, but it’s takes a few more steps.

As both Tableau and Qlikview are complex products I might have overlooked some features that would make this easier in either Tableau or Qlikview. As I am still learning I would appreciate it if you leave a comment with your suggestions or best practices for either products. I hope to document more of what I’ve learned starting working with Tableau over the coming months in future posts.

I used the Superstore dataset to make this example. You can download the dataset here (http://community.tableau.com/docs/DOC-1236).

TABLEAU VERSUS QLIKVIEW: CYCLIC GROUPS IN TABLEAU