0

I am trying to figure out if there is a way to create heat map on the top of an screenshot image.

So, I have a web page screenshot JPEG image. I also have monthly click rates data for each UI elements in the page. Now I want to use R to create heatmap (translucent) so that it will be easier for people to know where end users are clicking more and vice-versa.

I can create simple heatmaps and graphs using R, but it seems to be far from where I want to be.

Tomasz Kowalczyk
  • 10,472
  • 6
  • 52
  • 68
silwal
  • 3
  • 2

1 Answers1

1

This is my first post, so be gentle.

First, I'm going to assume that you have the x,y,height,width for each element, and some form of score in a datatable like:

X | H | Y | W  | SCORE
0 | 5 | 0 | 5  | 5
0 | 5 | 0 | 5  | 5
5 | 5 | 5 | 35 | 50

I think you can do it by plotting rectangles over the image.
See ggplot2 docs here for how to plot recs:

http://docs.ggplot2.org/current/geom_rect.html

See prior SO post here for how to plot on top of an image:

Plot data over background image with ggplot

Community
  • 1
  • 1
Andy
  • 26
  • 2