I am trying to create competency level heatmap for a manufacturing plant.I have tried both the HEATMAP as well as GGPLOT. I have couple of questions when it comes to using GGPLOT- here is the sample data. I am still not sure which will yield me the best result.
GROUP ProcessName EmployeeName Level
Furnace Machining Alex 4
Furnace Machining Bobby 1
Furnace Milling Alex 3
Repair Heat Chris 2
Repair Heat Bobby 3
Basically the data will have competency level of 100 of employees with different process and groups. I would like to show a heatmap of the entire manufacturing and also by groups and if possible by shifts which are in one more column.
so far I have tried HEATMAP, HEATMAP.2 - I am missing something but I am not getting what I wanted here
So I went with GGPLOT ,
ggplot(test_data, aes(factor(Name),factor(ProcessName),factor(level)) +
geom_tile() +
theme(axis.text.x = element_text(angle=45, hjust = 1,vjust=1,face = "bold"),)
In the resulting plot, the squares are coloured in all places.
I am looking for
- Where each square is coloured based on the level
- specific colours for each level ( here I tried scale_color_manual - but it's not changing)
- one square for the employee and that particular process.
Please suggest if I need to look at anything different.