bitcoin charts excel

(This article was first published on , and kindly contributed to I am not yet a Bitcoin advocate.Nevertheless, I am impressed with the amount of Bitcoin activity and the progress that advocates are making towards having Bitcoin recognized as a legitimate currency.Right now, I am mostly interested in the technology behind bitcoin and the possibility of working with some interesting data sets., and most of it is easily accessible from R with just a little data munging.In this post, I present some code that may be helpful to someone who wants to get started working with Bitcoin data in R. Transaction data is available in a JSON file from bitstamp.net here.This can be easily read with the fromJSON() function from the RJSONIO package and put into a data frame with the help of do.call().(RJSONIO) <- bs_data <- fromJSON() bs_df <- (,(bs_data,,stringsAsFactors=)) (bs_df) tid price type amount 1 0 2 1 3 1 4 1 5 0 6 0 If you are a newcomer you might find the one-liner using the plyr library more intuitive; but do have a look at the efficiency discussion on stackoverflow.
In the data frame returned above "tid" is the transaction id."date" is the time stamp of the transaction in unix time.(We will see how to work with that below.)"price" is the bitcoin price."amount" the amount of bitcoin, and "type" = 0 for a buy and 1 for a sell.Bitcoincharts has some market data in JSON format here.bitcoin est il une monnaieHowever, applying exactly the same code will most likely result in a very unhelpful error message something like this: Error in data.frame(volume = 0, latest_trade = 1415135720, bid = 342.87015289,  :                       arguments imply differing number of rows: 1, 0 What's going on here is that Nulls in the data will keep R from building a data frame because some rows will have more columns than others.litecoin to rubOn way around it is to use a function like to turn Nulls into NAs on the list returned by fromJSON().bitcoin idaho
nullToNA <- (x) { x[(x, )] <- (x) } url_m <- mkt_data <- fromJSON(url_m) (mkt_data) mkt_data2 <- (mkt_data,nullToNA) mkt_df <- (,(mkt_data2,,stringsAsFactors=)) (mkt_df) latest_trade bid high currency currency_volume ask avg 1 IDR 2 USD 3 USD 4 SGD 5 EUR 6 XRP low 1 btcoidIDR 2 localbtcUSD 3 rippleUSD 4 anxhkSGD 5 zyadoEUR 6 justXRP /v1/csv/.cnn bitcoin taxThe following bit of code downloads the bitstamp transaction data in US dollars, un-zips it and reads all 8 million rows or so into a data frame.bitcoin ransom newsThen the unix timestamp is converted into a date.bitcoin too complicatedbitcoin_file <- URL <- source_file <- (URL,bitcoin_file) dataDir <- dest_file <- (dataDir,bitcoin_file) (source_file,destfile = dest_file) <- ((dest_file),header=) ( V1 V2 V3 1 2 () <- c(,,) $date <- (($unixtime, origin=)) (,2) unixtime price amount 1 1 -09- 2 3 -09- Now for the payoff: we use dplyr functions and xts() to aggregate the transactions into a time series and digraph() visualize the results.
(dplyr) (xts) (dygraphs) <- select(,-unixtime) () <- mutate(,value = price * amount) by_date <- group_by(,) daily <- summarise(by_date,count = n(), m_price <- (price, na.rm = ), m_amount <- (amount, na.rm = ), m_value <- (value, na.rm = )) (daily) <- c(,,,,) (daily,2) Source: [6 x 5] count m_value m_price m_amount () (int) (dbl) (dbl) (dbl) 1 -09- 2 -09- daily_ts <- xts(daily$m_value,order.by=daily$date) dygraph(daily_ts,ylab=, main=) %>% dySeries(,label=) %>% dyRangeSelector(dateWindow = c(,)) This series tells the story of bitcoin so far: a long slow start then a rocket ride to a high followed by a roller coaster ride down to a what looks like it might be a plateau of respectability stability.Finally note that there R some packages to help explore Bitcoin.For a nice example of what the Rbitcoin package can do have a look at Benedikt Koehler's post from earlier this year.Apps & PluginsSeamless integration with all of your favorite softwareCoinigy Mobile - Bitcoin & Altcoin TraderTrade on the go with Coinigy for Android & iOS.Mobile price alerts, high-definition charting, portfolio monitoring and trading available in the palm of your hand, 24/7.Available now for Android (iOS coming soon)!Click here to download:Google Sheets PluginCoinigy integrates directly with Google Sheets, allowing you to interact with your Bitcoin & Cryptocurrency balances in ways never before possible.Simply attach your API keys and our Sheets plugin will do the rest.Click here to view the Coinigy Google Sheets Template and get started!CryptoTicker For Chrome & FirefoxGet price updates and view your favorite charts anytime with CryptoTicker for Chrome & Firefox.Live updating data in your browser, whenever you want it.
Never miss another opportunity!Click here to install CryptoTicker:In-Browser Trading Tools & AppsAccess a huge library of in-browser Coinigy Apps.Identify cross-exchange arbitrage opportunities with ArbMatrix.Find unique trading setups on-the-fly with our proprietary Bitcoin Chart Scanner.Stay up to date on your favorite cryptocurrencies and their social mentions with SocialScanner.We're dedicated to innovation and bringing you the best tools of the trade!Start my free trial nowYou'll wonder how you ever lived without us Copyright ©2017  Coinigy Inc.All rights reserved.Privacy Policy - Terms of Service - Security Policy  xBitcoin & Altcoin TraderThere is a new, better charting website for all alternative cryptocurrencies!Please use www.cryptocoincharts.info LTC/USD data from BTC-e, period 24h, last update: 2017-06-24 12:09:07 GMT Latest trade Volume Low High Bid Ask 44.57000 USD 65,556.6236 LTC 44.05000 USD 45.73419 USD 4.35000 USD 4.35101 USD LTC/USD orderbook LTC/USD long time chart LTC/BTC data from BTC-e, period 24h, last update: 2017-06-24 12:09:06 GMT Latest trade Volume Low High Bid Ask 0.01666 BTC 42,002.8249 LTC 0.01644 BTC 0.01714 BTC 0.01167 BTC 0.01169 BTC LTC/BTC orderbook LTC/BTC long time chart LTC/CNY data from OKCoin, period 24h, last update: 2017-06-24 12:08:48 GMT Latest trade Volume Low High Bid Ask 333.60000 CNY 348,770.9238 LTC 322.00000 CNY 344.60000 CNY 60.90000 CNY 60.91000 CNY LTC/CNY orderbook LTC/CNY long time chart LTC/BTC data from Vircurex, period 24h, last update: 2016-10-01 18:33:23 GMT Latest trade Volume Low High Bid Ask 0.00690 BTC 0.0000 LTC 0.00000 BTC 0.00000 BTC 0.01000 BTC 0.01200 BTC LTC/BTC orderbook LTC/BTC long time chart LTC/USD data from Bitfinex, period 24h, last update: 2017-06-24 11:53:46 GMT Latest trade Volume Low High Bid Ask 44.24900 USD 63,225.8200 LTC 43.75300 USD 46.10500 USD 4.60850 USD 4.62990 USD LTC/USD orderbook LTC/USD long time chart LTC/BTC data from Bitfinex, period 24h, last update: 2017-06-24 11:53:46 GMT Latest trade Volume Low High Bid Ask 0.01655 BTC 42,779.2654 LTC 0.01639 BTC 0.01712 BTC 0.01171 BTC 0.01184 BTC LTC/BTC orderbook LTC/BTC long time chart Partner: LitecoinTalk | Micro invest in litecoin