Code
library(dplyr)
library(tsibble)
library(ggplot2)
url <- "https://raw.githubusercontent.com/ctruciosm/ctruciosm.github.io/master/datasets/BTCUSDT.csv"
btc <- read.csv(url)
btc <- btc |>
select(timestamp, close) |>
mutate(timestamp = as.Date(timestamp)) |>
as_tsibble(index = timestamp)
btc |> ggplot() + geom_line(aes(x = timestamp, y = close), color = "green4") +
ylab("Preço de fechamento") + xlab("Tempo")