I have two data sets which I'd like to compare in one graph (Ethereum price and transaction volume). I plotted a graph but I think it is sth wrong with the scale of the y-axis:
ETH_price <- read.table(file = '~/R/export-EtherPrice.csv' , header = T, sep=";")
transaction_volume <- read.csv(file = '~/R/export-TxGrowth.csv', header = T, sep=";")
head(ETH_price)
head(transaction_volume)
ETH_price$Date.UTC. <- as.Date(ETH_price$Date.UTC., format = "%m/%d/%Y")
str(ETH_price) # verify the date format
transaction_volume$Date.UTC. <- as.Date(transaction_volume$Date.UTC., format = "%m/%d/%Y")
str(transaction_volume) # verify the date format
ggplot(ETH_price,aes(x = Date.UTC.,y = Value)) +
geom_point()+
geom_line(aes(color="ETH_price")) +
geom_line(data=transaction_volume,aes(x = Date.UTC.,y = Value, color="transaction_volume")) +
labs(color="Legend") +
scale_colour_manual("", breaks = c("ETH_price", "transaction_volume"),
values = c("blue", "brown")) +
ggtitle("Correlation of ETH price and transaction volume") +
theme(plot.title = element_text(lineheight=.7, face="bold"))
The following error occurs:
Error in seq.int(0, to0 - from, by) : 'to' must be a finite number
The data looks like this (ETH_price):
> head(transaction_volume)
Date.UTC. UnixTimeStamp Value
1 03.03.2017 1488499200 64294
2 04.03.2017 1488585600 58756
3 05.03.2017 1488672000 57031
4 06.03.2017 1488758400 57020
5 07.03.2017 1488844800 62589
6 08.03.2017 1488931200 55386
The plot looks like this:
Does someone have an idea what could be wrong?
I'm happy about every hint!:)
MAiniak
/Code updated