0
votes

I have a data where at one latitude and longitude multiple shops are located. For Example.

Latitude Longitude ShopId Type
6.24458  50.001756 101  Saloon
6.24458  50.001756 102  Groceory
6.24458  50.001756 103  Pharmacy
6.24458  50.001756 104  FishMarket

When on map I am plotting using above latitude & longitude I am getting single mark. And when I hover the mark I am getting single shop details but I want 4 marks and on each mark it should show respective shopid and Type. I am new to Tableau and not able to figure out how to do it.

1

1 Answers

0
votes

You are likely getting 4 marks displayed at the same location. So when you click on the mark you see, then you are only selecting the top mark. You can verify this by dragging over the mark to select all the marks within a selection rectangle. If you then, right click and view data, you should see all 4 marks.

Another thing that can help when you have overlapping marks, is to make the marks partially transparent and add a border around the marks. Both options are available by clicking on the Color button on the marks card to get to the advanced color settings.

If this is not the behavior you want, you have a couple of options. One easy approach is to add a little random noise to each latitude and longitude (called jitter). Adding a little jitter makes the marks visible, although the size of the jittering depends on your data and scale. Jittering is especially useful if all your points are geocoded to the same situation - say if every building with a Los Angeles address is treated as if it is located at city hall. In that case, the geocoding distorts the data to a degree that jittering is just fine.

The undocumented RANDOM() function is an easy way to add some jitter. Excel and Hyper Extracts support RANDOM() among other data source types. It returns a number between 0 and 1.

The other options involve treating your coordinates as continuous dimensions instead of measures, and then using some other visual attribute size, color etc to indicate the number of items at each location. It is often useful to combine nearby items with some sort of grid or hex bin function -- In this case, instead of adding random noise to each coordinate, you round or truncate it in someway to effectively snap points to a grid. The ROUND() and HEXBINX() HEXBINY() functions are useful here. When using this approach, be sure your packed coordinate fields are continuous dimensions and have the appropriate Latitude or Longitude geographic role.

Finally, take a look at the density mark type. It can make visual heat maps, either working with exact data points or grid packed points.