, ,

Creating a filled map using JavaScript libraries might take you much time to get it work. This tutorial demonstrates how data visualization tool Tableau provide a decent and handy solution (*Note: Hong Kong Map feature is only available after version 10).

The final product can be found here: https://public.tableau.com/profile/roy.tang#!/vizhome/SimpleFilledMap/Dashboard1

Testing data: testing data


District Value
Central and Western 8
Wan Chai 7
Estern 10
Southern 4
Yau Tsim Mong 9
Sham Shui Po 8

  1. Import the dataset as it is in Excel.

Remember to give each column a name in Excel. For a single fill map, there is no need to alter the data in Tableau. After importing the Excel, you are all set to create a new sheet or workbook. The “District” column will be automatically recognized as “Dimension”, “Value” column will be in “Measures”.


  1. Set the District Dimension’s “Geographic Role” to “County”.


“Longitude” and “Latitude” will be generated.

Drag “Latitude (generated)” to “rows”, “Longitude(generated)” to “Columns”. The sheet should be showing a map now.


  1. Drag the “District” dimension to show as “details”, Tableau will do the mapping.


Some districts can not be recognized. Fix it following the below steps.


  1. Some District name might not be recognized or be ambiguous, in the bottom right corner of the map, click the unknown button, choose “edit locations”.


Choose “Edit Locations”.


First fixed the “country” and “region” to “Hong Kong” to eliminate ambiguity, after that basically you can just choose from district names in Hong Kong provided by Tableau (* this Hong Kong Map feature is only available after version 10)

(In my testing data, “Estern” is a typo, Tableau can not recognize it at the first place, and the “North” district is ambiguous, so Tableau will be asking you to clarify unless you narrow down search in Hong Kong)