With Oracle Analytics 5.6 came the facility to do the following :
- Upload an Image as a Map Background
- Draw Custom Map Layer Shapes on an Uploaded Image
- Associate a Data Set with Map Layer Shapes Drawn on an Uploaded Image
This new set of features can be used to create a custom filter based on an image that you have. I created an example of this as part of my session at the Oracle Analytics Summit, so I thought that I would show it in more detail. I start by creating a simple image showing star ratings which I will use throughout this process.
Load this image up into Analytics via the Console
Now select the Image Backgrounds to add in a new image to use as a background.
Preview it …..
Now we see that my new custom image background layer has been created
Click on the hamburger menu and select Create Map Layer
I am presented with my image in the map editor. I now have the ability to select areas of the image layer and associate them with specific values. By default we have the ability to create polygons ( which are ideal if I want to ringfence associated items ) but for our needs we want to assign a specific value to each of the 3 stars in the image, so we will change the type to Rectangles which will allow me to draw a rectangle around the part of the image with which I wish to interact.
OK, let’s start with the first ONE star rating and draw a rectangle around the portion of the image and associate that with the value ONE.
Now associate the TWO star portion of the graphic with the value TWO
Now associate the THREE star portion of the graphic with the value THREE
We now have a new map layer called StarsLayer, based on a custom image and we have associated parts of that image with specific values. What I want to do now is to use this image in a project. I have a small sample dataset that I used for the Oracle Analytics Summit, which is of delivery drivers for my ficticious restaurant and each delivery driver is awarded a star rating by the customer, from 1 to 3 stars, based on the customer’s satisfaction with the service. So, wouldn’t it be great if I could use my image above to create a visual cue to filter the results in an analytic project? Let’s give it a go.
First, I will load up my data and create a new dataset in Oracle Analytics. This new dataset, CUSTOMER_DELIVERIES_STATS is a record of every delievery (trans_id) for each cutomer (cust_id) performed by each delivery driver. Each record has a start rating, ONE, TWO or THREE based on customer feedback on my delivery drivers’ performance.
If we right click on the hamburger menu, then we see it is now possible to assign a column to a location. If we do this we can assign the STAR_RATING column to our new StarsLayer map layer. When we do this we see the match of data between the data in the column and that in the map layer. We can see how the data in the column 100% matches to that in the map. If it didn’t then we’d have to assess why that was – have we missed a mapping that we need to accommodate in the map or do we have values in the data that need cleaning/tweaking via a dataflow, for example.
Once we OK that, then we see that the STAR_RATING column has been assigned a location icon to show that there is an association with a map layer.
Finish up with the dataset and create a simple project. Here we just select the delivery drivers and the delivery transactions they have been on.
Now drag the STAR_RATING across to the canvas. It will automatically display the star image map as we pre-defined it. Tweak the transparency on the image and finesse the canvas settings and layout to tidy it up as desired. If I click on any of the stars in the image, then brushing will highlight those transactions in the bar chart aligned with the star rating.
We can now make the star map act as a filter so that when we click on a star rating the bar chart (and any other anaytics we had created which were sensitive to the filter) are filtered appropriately.
So now if I click on THREE star ratings graphic, my chart is automtacally filtered to show just the THREE star ratings.
Now if it click on ONE star, then I see all the ONE star deliveries are down to a single delivery driver, Mark.
This is a simple example of how I can use this new map layer functionality to add some custom visual cues to my analytic projects. There are many other sophisticated ways that this functionality can be quickly employed into your own analytics to add some additional user-friendly features.