Q:

Data frame error, trying to create heatmap

I am trying to create a heatmap, similar to here. I'm using the same code. https://nitinahuja.github.io/2017/heatmaps-in-r/
Here's some example of the data:
    Date        Change  Hour    Day
1   2020-01-22  -0.01   02:00   Wednesday
2   2020-01-22  -0.24   01:00   Wednesday
3   2020-01-22  0.12    00:00   Wednesday
4   2020-01-21  0.16    23:00   Tuesday
5   2020-01-21  -0.12   22:00   Tuesday
6   2020-01-21  -0.02   21:00   Tuesday
7   2020-01-21  2.46    20:00   Tuesday
8   2020-01-21  -1.22   19:00   Tuesday
9   2020-01-21  -0.26   18:00   Tuesday
10  2020-01-21  0.1    17:00    Tuesday
11  2020-01-21  -0.07   16:00   Tuesday
12  2020-01-21  -0.1054 15:00   Tuesday
13  2020-01-21  -0.069  14:00   Tuesday
14  2020-01-21  0.0477  13:00   Tuesday
15  2020-01-21  -0.02   12:00   Tuesday
16  2020-01-21  -0.02   11:00   Tuesday
17  2020-01-21  0.34    10:00   Tuesday
18  2020-01-21  -0.22   09:00   Tuesday
19  2020-01-21  0.21    08:00   Tuesday
20  2020-01-21  -0.11   07:00   Tuesday
21  2020-01-21  -0.12   06:00   Tuesday
22  2020-01-21  -0.19329 5:00   Tuesday
23  2020-01-21  0.0213  4:00    Tuesday
24  2020-01-21  0.09    3:00    Tuesday
25  2020-01-21  0.1306  2:00    Tuesday
26  2020-01-21  0.1960  1:00    Tuesday
27  2020-01-21  -0.09   0:00    Tuesday
28  2020-01-20  -0.23   23:00   Monday

I have run the following code:
ggplot(Change , aes(x=Hour, y=Day, fill = Change)) + 
    geom_tile(color = "white", size = 0.1) + 
    scale_x_discrete(expand=c(0,0)) + 
    scale_y_discrete(expand=c(0,0)) + 
    scale_fill_viridis(name="Price Change", option = "plasma") + 
    coord_equal() + 
    labs(x="Call hour", y=NULL, title=sprintf("price change by hr", vendor)) + 
    theme_tufte(base_family="Helvetica") +
    theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1))'''

I've managed to get teh ggplot function working but the chart it produces is completely wrong.
Since I've got the same data essentially as given in the linked example and followed the same commands, I'm unsure where it has gone wrong. See image below:
enter image description here

A:

Is it the heatmap you are looking for ? 
library(ggplot2)
library(ggthemes)
ggplot(df , aes(x=Hour, y=Day, fill = Change)) + 
  geom_tile(color = "white", size = 0.1) + 
  scale_x_discrete(expand=c(0,0)) + 
  scale_y_discrete(expand=c(0,0)) + 
  scale_fill_viridis_c(name="Price Change", option = "plasma") + 
  coord_equal() + 
  #labs(x="Call hour", y=NULL, title=sprintf("price change by hr", vendor)) + 
  theme_tufte(base_family="Helvetica") +
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1))

The only modification, I made is to replace scale_fill_viridis by scale_fill_viridis_c. 
The dataframe (called df here) that I used as the following structure:
Classes ‘data.table’ and 'data.frame':  28 obs. of  5 variables:
 $ ROw   : int  1 2 3 4 5 6 7 8 9 10 ...
 $ Date  : chr  "2020-01-22" "2020-01-22" "2020-01-22" "2020-01-21" ...
 $ Change: num  -0.01 -0.24 0.12 0.16 -0.12 -0.02 2.46 -1.22 -0.26 0.1 ...
 $ Hour  : chr  "02:00" "01:00" "00:00" "23:00" ...
 $ Day   : chr  "Wednesday" "Wednesday" "Wednesday" "Tuesday" ...
 - attr(*, ".internal.selfref")=<externalptr> 

You can compare with your own data.frame by doing:
str(Change)

If you see that the column "change" is marked as "chr", convert it to a numerical format by doing:
Change$Change <- as.numeric(Change$Change)

If is is marked as a factor, convert it to a numeric format by doing:
Change$Change <- as.numeric(as.character(Change$Change))

Data example:
structure(list(ROw = 1:28, Date = c("2020-01-22", "2020-01-22", 
"2020-01-22", "2020-01-21", "2020-01-21", "2020-01-21", "2020-01-21", 
"2020-01-21", "2020-01-21", "2020-01-21", "2020-01-21", "2020-01-21", 
"2020-01-21", "2020-01-21", "2020-01-21", "2020-01-21", "2020-01-21", 
"2020-01-21", "2020-01-21", "2020-01-21", "2020-01-21", "2020-01-21", 
"2020-01-21", "2020-01-21", "2020-01-21", "2020-01-21", "2020-01-21", 
"2020-01-20"), Change = c(-0.01, -0.24, 0.12, 0.16, -0.12, -0.02, 
2.46, -1.22, -0.26, 0.1, -0.07, -0.1054, -0.069, 0.0477, -0.02, 
-0.02, 0.34, -0.22, 0.21, -0.11, -0.12, -0.19329, 0.0213, 0.09, 
0.1306, 0.196, -0.09, -0.23), Hour = c("02:00", "01:00", "00:00", 
"23:00", "22:00", "21:00", "20:00", "19:00", "18:00", "17:00", 
"16:00", "15:00", "14:00", "13:00", "12:00", "11:00", "10:00", 
"09:00", "08:00", "07:00", "06:00", "5:00", "4:00", "3:00", "2:00", 
"1:00", "0:00", "23:00"), Day = c("Wednesday", "Wednesday", "Wednesday", 
"Tuesday", "Tuesday", "Tuesday", "Tuesday", "Tuesday", "Tuesday", 
"Tuesday", "Tuesday", "Tuesday", "Tuesday", "Tuesday", "Tuesday", 
"Tuesday", "Tuesday", "Tuesday", "Tuesday", "Tuesday", "Tuesday", 
"Tuesday", "Tuesday", "Tuesday", "Tuesday", "Tuesday", "Tuesday", 
"Monday")), row.names = c(NA, -28L), class = c("data.table", 
"data.frame"), .internal.selfref = <pointer: 0x55aee5c44350>)

