By now, we all must have seen the demonstrations of Kibana Data Visualizer that was made available in PeopleTools 8.58. If not, it is very easy to spin up a PUM image (HCM or FSCM) and get a hands-on experience with this functionality.
While evaluating the delivered Kibana Visualizations, I noticed a few map visualizations.
For example, HCM > Workforce Administrator (Homepage) > Workforce Insight (Dashboard) > Workforce Equity (Tile) > Employee Distribution by Country (Visualization)
How does this work?
As we can see in the footer, the map is rendered to us using the Elastic Maps Service (EMS) which in turn produces basemap tiles leveraging OpenStreetMap data.
We can find more information here:
https://www.elastic.co/elastic-maps-service
https://maps.elastic.co
Further, the out-of-box Kibana functionality would directly request the maps from the browser. The EMS requests are made to the following domains:
- tiles.maps.elastic.co
- vectors.maps.elastic.co
If we run into firewall restrictions and unable to allow access to *.maps.elastic.co, we have the option of hosting the EMS locally.
We can find more information here:
https://www.elastic.co/guide/en/kibana/current/maps-connect-to-ems.html
Gotcha
When I dug in a little further to review how the application data (PS Query/Connected Query > Elasticsearch Index > Kibana Index Pattern) is hooked (or joined) to the EMS, I found a strange Kibana bug (?).
Here is the 'Data' tab of the Visualization configuration in Kibana. We can see that the COUNTRY field in PeopleSoft is being used as the aggregation field.
Now, if we go to the 'Options' tab, we will see that the Join Field for the EMS Vector map (World Countries) is set to 'ISO 3166-1 alpha-2 code'.
Wait a minute. The COUNTRY field in PeopleSoft is the 3 character ISO code but somehow it is joined with the 2 character ISO code. How is this possible? Am I right?
We can even preview on EMS to see the codes. If you don't believe me.
After scratching my head for a long time, I found that this is a bug with respect to the display of the Join Field in the Kibana configuration. It possibly may be defaulting to the first value that is in the drop-down. However, once I reviewed the actual JSON configuration (Saved Object) of the visualization, I found that it is in fact using the 'ISO 3166-1 alpha-3 code'. So, it proves that I was not losing my mind (at least as yet!). 😅
Exploring
Next, I wanted to build a map on my own. I used the same data 'Employee Distribution' and represented it per Country and State instead of just the Country.
I created an expression in my PS Query (used in Connected Query source for Search Definition) that concatenates COUNTRY_2CHAR and STATE fields into a single query field.
Next, I created a visualization in Kibana using this field as the Join Field for an 'Administrative region' vector map - 'Region ISO code'.
I look forward to your questions, comments and feedback (please use the comments section below).
No comments:
Post a Comment