Geospatial hierarchy problems when embedding

Currently exploring QuickSight Embedded Analytics and ran into a few issues when displaying a filled map visual with a geo hierarchy.

For context, I have a simple dataset which shows household counts by US state, county, or zip code:

Question 1: In the embedded view only, the map periodically does not display colored areas at the state or county level, but only at the zip level. This happens after some combination of user interactions and setting parameters through the embedding SDK, and the fix is to hard refresh the page. Even the Reset to original dashboard will not restore functionality. Is there anything we might be doing wrong to cause this?

Question 2: We want to give users the option to define their own custom markets, where a market is a collection of zip codes, counties, or states. Currently we have implemented the market management logic in our code and then pass over to QuickSight through setParameters with connected filters and controls defined in the dashboard. This works for us because we want to allow users to define markets once and then re-use them for various dashboards. We have a couple issues still:

  • We would like the map to automatically drill down to the geo level appropriate to the market, maybe using some embedding SDK functionality. For example, a user selecting a zip-based market (in a dropdown outside the embedding) should immediately drill map visuals to the zip level. Currently we are defaulting the dashboard to the top (state) level of the hierarchy, which can cause a confusing experience for users who expect to immediately see data at the granularity relevant to their selected market. Is this possible to fix? The hack we imagined was having 3 identical dashboards (one per hierarchy level) and swapping them if the market type changes, which is less than ideal.
  • Is there a way from the embedding SDK to trigger a zoom to data on the map? When switching from a Michigan market to a DC market, for example, the map stays focused on Michigan and doesn’t automatically fit the view to the updated data.

Question 3: Finally, a question unrelated to any of the above. Is there any QuickSight API to simply get the number of registered users? We are thinking to register external users at the Reader level, and want an efficient way to query just the total number for the purpose of enforcing a maximum user count as a cost-safety measure. I know we can maintain this data on our end (we’re registering the users, we certainly should know how many there are), but would be nice to get directly from the source as we’re not immune to bugs. Currently there is a list-user api that allows this, but it requires paginating through all the users which could be very inefficient at scale, especially if implemented as a check at each time a new user is added.

Hello @priestj_advisory , welcome to the QuickSight community!

For your first question, you would need to share the code you are using to be able to work through potential fixes. My assumption is that somewhere in the logic that values are not being passed to reset the map to defaults and so it is still being filtered.

On the second part, the zoom on maps has been something that I have struggled with too and have never found to be consistent. That being said, if you want an easier way to solve this than whole dashboards you could implement Rules to hide and show visuals using free form layout in the analysis settings.

For the last part, have you used list-users?

@duncan Conditional rules are awesome! First test with it looks very promising.

Follow-up Question: Is it possible to lock the drilldown to specific levels in a filled map? With conditional rules allowing me to have separate maps for each level, I actually want to lock those maps so users can’t navigate up or down, as it could lead to confusing results. For example, say a user filters to a handful of zip codes so the total households is small, then drills up to the state level and gets confused on why the state has such a small household count.

To your next point, I have tried list-users, but I was apprehensive about using it because it does a lot of extra beyond just returning the user count. Starting to feel this is just something we generally maintain and check on our side and periodically (maybe daily) validate with QS through list-users.

Finally, will try to provide some more info for the first issue here. I am able to get the issue when interacting purely with the embedded dashboard controls, and not using any setParameters calls.

The data set has

  • a geo hierarchy with state name, county name, zip code
  • locale_type field with 3 possible values ‘zip’, ‘county’, and ‘state’. This allows state, county, and zip level household counts to all be stacked into one data set.
  • locale_id is zip code, county fips, or state fips, depending on the locale_type of the row.

There are parameters connected directly to the controls pictured below and to filters on those two columns.

In this pictured embedded dashboard with controls used, I can see the map working at the zip drilldown level:

But drilling up to county_name or state_name in the hierarchy sometimes (not always and clearing site data fixes) will just show the base map and not anything filled in!

In this next image from the same embedding session but drilled up to state, it seem QS is even acknowledging it has the data, despite the map not showing it

Same issue if I go from that image and set the controls to ‘state’ and ‘01’ to show Alabama.

I will say that after I switched to using conditional rules with 3 overlapped visuals, the issue disappeared, which maybe is a useful breadcrumb. I wonder if nulls are doing anything here, since the county portion of the dataset will have nulls in the zip column; similarly, the state block will have null county_name and zip columns.

Hey @priestj_advisory , sorry about the late reply!

(1) I’m not sure what you mean here:

Do you mean that if a user filters to specific zip codes, meaning they should only see data for those zip codes, if they use the action to swap visuals (with conditional rules) that the count of households now shows the whole state? I would make sure that you are also using filters that affect all visuals even if they are hidden.

(2) For list-users I would recommend doing a mixture of manual and programmatic. There would be some dev work on your team to interpret the response from the API but it would give you an accurate account of users.

(3) I’m surprised by this part, does this not get fixed if a user zooms out on the map?

This could be a bug. My first thought is that it wouldn’t show a filled selection because there could be counter acting filters but the fact that summary data has something make me think its an issue with the map rendering. Does this only happen in the embedded version and not console?

No worries! Your tip on conditional rules solved most of this for me.

For (1), I was trying to get at the issue that hierarchies are all or nothing. County is probably a better example than zip codes. Say I want a filled map at the county level. I can’t just add the county name in the location field because counties are ambiguous (same name different state happens). So then I put the county in a geo hierarchy with state. But now I can’t just drag the county portion of the hierarchy into the location field, I have to include the whole hierarchy. This means that state is included and users can drill up and view at state level. I felt that might be confusing in some cases so I wanted to prevent it. Very minor issue overall but I was curious.

1 Like

Hey @priestj_advisory

I understand now, thank you for clarifying. Yeah, it’s a weird thing that once you create that hierarchy it will it lock them together. When using conditional rules you can probably just have them be separate.