I am trying to don't loose the order of dataframe, the information has order in the dataframe. But since the data is duplicated into the dataframe, I am obtaining error message or introducing NA. I didnt find a solution similar for this, I tried with this How to preserve the order of tiles in geom_tile ggplot, but it didn't work
library(readr)
library(ggplot2)
library(RColorBrewer)
url_soccer <- 'https://raw.githubusercontent.com/frm1789/soccer_ea/master/tableau.m.csv'
tableau.m <- read_csv(url_soccer)
tableau.m <- tableau.m[,-1]
(p <- ggplot(tableau.m, aes(Team, variable)) +
geom_tile(aes(fill = rescale), colour = "white") +
scale_fill_gradient(low = "white", high = "steelblue"))