Site Loader

Build Your Own Custom Maps With Einstein Analytics

We at Tengo work with many clients in building out integrative dashboards and analytics using Salesforce’s proprietary Einstein Analytics (EA) technology. This technology is a powerful tool that uses Artificial Intelligence to generate advanced analytics, provide more descriptive and diagnostic information, and personalize the data to complement the distinct requirements of the user organization. Within the Analytics application there are three main functions: Prediction Builder, Einstein Discovery, and Einstein Analytics. In this article, we will focus on Einstein Analytics and the distinct solutions it can provide for businesses.

Einstein Analytics is an amazingly useful tool to integrate within dashboards as it provides the possibility to incorporate third party data, customize layouts, and optimize report displays across devices and functionalities. A strong feature within the application is maps customization, a function that enables you to create a representation of your operational geo data to not only increase territory and control visibility, but also maximize resources and drive productivity. While Salesforce has geographical maps available by default, the maps have some limitations that disable users from generating detailed data analysis. Through Analytics, the user has the option to work with custom GeoJSON functionality, meaning that custom maps can be developed beyond the limitations of geographical maps. The only requirement for this development is that the maps must be sketched polygonally. Pictured below are two examples of how EA dashboards can be configured with custom maps and the versatility that is included within these functions.

Image 1. Colombia map. This country map is not available in Analytics by default at this level of detail, so customization is necessary. This dashboard shows the Closed Opportunities by State. The darker green area in the map portrays the zone with the highest number of close opportunities, and the more clear areas highlight the places where the close opportunities are less representative. The bar on top provides a filter that enables you to choose what region you want to see and which stage (closed won, close lost). Displayed on the left side is the amount of Closed and Won Opportunities.
Image 2. Stadium Arena map. This Stadium map is not available in Analytics by default, so customization is necessary here. This dashboard shows the percentage of sold tickets for three separate events: An American Football game, a Madonna Concert and a Lady Gaga Concert. The darker areas help illustrate the higher concentration of people by zone. The bar charts display the sum of Reserved Seats for each event, and is shown in descending order.

As shown in images 1 and 2, the varied shades of colors symbolize the percentage of data represented. These maps provide strong visual representations of distinct data points and analytics necessary for business insights. This maps customization function helps seamlessly consolidate information in a visually appealing and easily-understandable fashion.

The Analytics tool can be customized in ways that go beyond the use of just color to portray statistical analysis. Other customization features include: Text Widgets, Number Widgets, Over 30 Different Types of Charts, Images, Tables, Filters, Dashboard Interactions, and more!

Stadium Seating Map Example

A good example of a process requiring the use of maps customization is when consolidating data on stadium seating. First, it is necessary to describe the context of our Stadium map. Let’s suppose that a company who sells stadium tickets needs to generate better analytics and visualization for their ticket sales. Their data model in Salesforce is currently structured as shown in image 3.

Image 3. Data Architecture at Salesforce. Stadium Tickets Sold.

Within the data architecture we can identify one standard object and four custom objects. Let’s first pay attention to the Stadium Seating zone object. The ID of each seating area is stored within the Zone ID field. This field will be very important because, when making the GeoJSON file, the IDs you assign to each zone should match with this field in order to get the right location on the stadium map.

Our stadium dashboard contains bar charts showing up to three events, with each bar representing the number of people attending that event. By clicking on a specific bar you can then see the stadium for that event, and moving your mouse over the zones provides extra information such as capacity percentage of the zone, the zone ID, and the name of the event. The information portrayed on the dashboard is completely customizable as the chart can portray the number of tickets sold by age, sex, or the type of payment (Cash or Card). The customization capabilities will depend on the statistics and analytics most useful to your business.

How to Create a Customized Map

1. Create a GeoJSON File

First, make sure you have the image you want to convert into a map. Use whatever software you feel most comfortable with when converting your image into a GeoJSON format. There are multiple ways to do this, most popular being the inskape or QGIS software, both of which are open source. Using the QGIS software will immediately convert the image to GeoJSON format, but inkscape will require extra effort. First, it is necessary to convert your image to .svg format, the dxf and finally use a convertor to GeoJSON. The decision between inkscape or QGIS is fully dependent on the software you feel most comfortable using. In summary, this step involves converting a pixel image into a polygonal shape image. This will provide us with well-defined shape boundaries and enable us to assign an ID to each polygon. Make sure that each area has an ID that can match the custom map with a field that is in Salesforce.

Image 4. Jpg format. Image made of pixels. ——————————> Image 5. GeoJSON format. Polygonal.

Once the image has been converted to GeoJSON format, the field can be opened with a text editor and you will have a JSON object with the next structure.

Image 6. GeoJSON Format Structure

Take into account if you want to use GeoJSON in Salesforce as it does not support point or line type geometry and only works in the context of multipolygon or polygon geometry. It is also important to consider that once the GeoJSON file is created, the ID should be at the same level as “type”: “Feature”, and can’t be the child of the properties elements. For example, in Image 6 above, the ID is a child of properties, and thus the code must be manipulated and the ID adjusted.

2. Create a Dataset

The next step involves preparing your data. If you have the data in Salesforce, go to App Launcher →  Analytics Studio App →  Create (button on the top right) →  Dataset → then give your dataset a name.

Image 7. Create a Dataset.

Then select the option to create a new Dataflow, like the image above.

Image 8. Creating a New Dataflow

A window should then be displayed which allows the objects and fields to be selected, which should be included within the dataflow.

Image 9. Dataflow Architecture

Finally, you will click Next → Create Dataset → OK Button and wait for the data to sync. Depending on how much information is being loaded, this process may take a few minutes.

3. Steps to Display the Data in the Stadium Custom Map

Go to the Analytics Sutdio Home Page and click on All Items → DATASETS to find the data set you just created. Click on the data set and it will open a lens similar to the image below.

Image 10. Creating the Dataset

Within the lens, configure the Bar Length with Sum of Capacity Percentage, and assign Event Seating Zone in the bars option. Select the chart icon, pick Map chart, then click formatting.

Image 11. Steps to Create Custom Map.

Look for the picklist map type and click on the “+” button. Then, click on Upload GeoJSON and select the file you created, give it a name and select Done.

Image 12. Uploading the GeoJSON File

Now you should have the Stadium map portraying all of your events. You can customize the Event Name by clicking on the Left Panel in the Trellis option. From there your map should look something like the image below.

Image 13. Stadium Map View with Events

Summary

Now that you understand how to implement your own maps customizations within Einstein Analytics, the capabilities for data analysis and analytics become endless. This tool provides immense versatility and high customization capabilities. With this solution, you can turn basically any image into a map that displays complex analytical insights. This feature enables you to bypass traditional charts and spreadsheets and dig even deeper through visually appealing map integrations. The possibilities are endless! If you are interested in learning more about Einstein Analytics and map customizations, give us a call! We at Tengo specialize in these solutions and would be more than happy to help you improve your analytical capabilities and operational efficiencies.

References

Resources

Post Author: Diana Serna

Leave a Reply

Your email address will not be published. Required fields are marked *