Solved

Show state names instead of coordinates using geo pushpin field

  • 26 July 2023
  • 7 replies
  • 63 views

  • Known Participant
  • 25 replies

Hi,

 

I’ve added the Geo Pushpin field to the existing data model as mentioned in the below link

https://www.gooddata.com/blog/using-geo-charts-gooddata-technical-overview/

I can make geo charts in the analyze tab, but when I try to display them in table view, I get coordinate numbers rather than state names.  can someone please point me to a resource that would explain the process.

 

Thanks,

Kavi

icon

Best answer by michal 28 July 2023, 19:27

View original

7 replies

Even State in the map also showing coordinates
 

I feel it’s due to using US States (2-letter code) instead of text. Is there a way to do this without bringing a new column into the data model?

 

Hi Kavi,

Thanks for sending this in. The community article you linked is indeed correct. You may also refer to our documentation here. It is also recommended to check out the GoodData University course about the subject.

 

In this particular case, the problem you are encountering is most likely caused by using the incorrect Label. You see, the Coordinates you use for pushpins are added as Labels to an existing attribute (usually City or State, for example). When you change the visualization type, it’s important to make sure that you select the correct label for the attribute in the Analytical Designer, using the Display as… selector:

 

Please check out the resources I shared and try using different labels to get the results to look the way you’d prefer them to!

 

Best,

Francisco

Hi Francisco Antunes,

 

Thanks for responding. In my case Display as… selector is showing only when I use one of the attribute label type as text.

scenario 1: using label type as text

scenario 2: using label type as US States (2-letter code)

Is it possible to display the Display as... selector option in the second scenario? in order for me to fulfill my requirement.

 

Thanks,

Kavi

Hi Kavi,

The label type US States (2-letter code) was used on Geo Charts for the legacy Pixel Perfect UI; it doesn’t really interact with the new UI and the Analytical Designer, unfortunately.

As such, if you have the Recipient State codes or names in your Source Data, please try changing the label type for Recipient_State to Text, like it is on your Scenario 1. It should allow you to select it in other visualizations.

You can make that change by going to Manage > Attributes; then, select the Recipient_State attribute and Edit on the US States label.

 

Give that a shot and let us know if it works out.

 

Francisco

Hi Francisco Antunes,

Currently we are using Recipient_State  in Geo chart layer in the Dashboard and the new requirement(Recipient_State_coordinates ) is to create Geo chart in Analyze tab

If I do change Recipient_State to Text that’s impacting the existing Geo chart layer in the Dashboard and Geo chart is disappearing.

Label type as  US States (2-letter code)

  After changing the Label type to text

Is there any simple way to fix this or shall I go for creating new attribute for Geo Pushpin label type.

Thanks,

Kavi

Hi Kavi,

Thanks for trying it out, I’m sorry to hear it didn’t work out. It’s also a good confirmation that the US States works in the new geo charts too, I stand corrected on that one.

Since you’re using the US States label on the actual geo chart, and renaming it breaks that particular visualization, the solution here would be to add a new Text label to the attribute (with the corresponding column on the source data), so you can use it in Tables too. Creating a new attribute from scratch would work as well.

Another option would be to edit the GeoChart insight and see if you can change the US State label there to Coordinates instead (but then, if you mouse over the state it would show the coordinates instead of the state name), thus freeing the other label to be used as a Text.

 

Best,

Francisco

Userlevel 2

Hi kavi, if I understand it correctly, you are using both the new Analyze and the legacy PixelPerfect experience and in both cases you are using the geocharts and therefore you need the text label to be marked as US State code, right?

 

There is actually one way how you can make the desired label to be displayed by default in a table (and elsewhere) without the need to add additional label.  To do so, you need to make the desired label “default one” in the modeller for that attribute. Then when user selects the attribute (either in Analyze or in Pixel Perfect) it will always display this label as default and it does not matter whether it is marked as Text or US State Code.  It will also make this label displayed by the Analyze geochart (which you otherwise can not choose). This change should not affect any of your dataloads or mappings, they remain the same. 

 

To do this:

  • go to the edit mode of the modeller and click “More -> View Details” in your dataset
  • there in the Field (first) tab locate the label you want to change and click its three dots button (it is all the way to the right on the same line and will appear only when you highlight the line with mouse cursor)
  • in the tiny menu that opens click “Set as default label”
  • save and publish changes to your model

This should do the trick. You can keep your label types to be geo and the default one will be always displayed as default one.

I would recommend doing this, since I assume users will rarely want to see GPS coordinates rather than a more meaningful state code.

 

Reply