# Install and use crypto scraper from # https://github.com/JesseVent/crypto # This script is written to be used by running the desired line(s) separately, often one line at a time # Install jessevent/crypto package in Rstudio # If you do not have devtools installed, install devtools first install.packages("devtools") # Now install jessevent/crypto devtools::install_github("jessevent/crypto") library(crypto) # Create dataframe from the getCoins() function # This will get all data for all coins in one dataframe coindata <- getCoins() # If desired, provide the cryptocurrency name as an argument # to limit the scrape to a specific cryptocurrency. bitcoin_data <- getCoins('bitcoin') ethereum_data <- getCoins('ethereum') ripple_data <- getCoins('ripple') # View head of dataframe head(coindata, n=10) head(bitcoin_data, n=10) head(ethereum_data, n=10) head(ripple_data, n=10) # Write to CSV file # Update file name as desired! # All coins # update file name as desired to include desired path, such as "~/CryptoScraper/coindata.csv" write.csv(coindata, "coindata.csv") # Bitcoin write.csv(bitcoin_data, "bitcoin_data.csv") # Ethereum write.csv(ethereum_data, "ethereum_data.csv") # Ripple write.csv(ripple_data, "ripple_data.csv")