Last active
January 10, 2018 14:13
-
-
Save data-enhanced/16f5bfd9626f774c95636c4709b8d328 to your computer and use it in GitHub Desktop.
Revisions
-
David Cochran revised this gist
Jan 10, 2018 . 1 changed file with 6 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,16 +3,19 @@ # 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') -
David Cochran created this gist
Jan 10, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ # 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 package in Rstudio install.packages("devtools") devtools::install_github("jessevent/crypto") library(crypto) # Create dataframe from the getCoins() function # Get all coins coindata <- getCoins() # If desired, provide the cryptocurrency name as an argument to limit scrape 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")