eia$date <- as.Date(substr(eia$period, 1, 10)) # "2025-06-24T19-04" -> 2025-06-24
eia$hour <- as.numeric(substr(eia$period, 12, 13)) # -> 19
par(mar = c(4, 6, 3, 1)) # room for the y-axis numbers
plot(eia$date + eia$hour / 24, eia$demand, type = "l", lwd = 0.5, yaxt = "n",
xlab = "2025, New York time", ylab = "",
main = "Hourly electricity demand, New York's grid (NYISO), 2025. Data: EIA")
at <- seq(0, 30000, 5000)
axis(2, at = at, labels = format(at, big.mark = ","), las = 1) # commas in the numbers
title(ylab = "Demand (megawatt-hours)", line = 4.5)