Hi there. In this post, I would like to showcase a dashboard that I have built in the R programming language along with RShiny and with the `flexdashboard` package. The link for the crypto prices dashboard is [here](https://dkmathstats.shinyapps.io/cryptoPrices_R/) This dashboard project is something that I am proud of and do like. In the dashboard, I extract crypto prices from Coinbase and Kraken. There is also a section for the crypto fear and greed index. The details and code are very technical in nature as it does use RShiny for dashboards. With that in mind, I do not display much code here. If interested you can find articles on using R's flexdashboard package [here](https://pkgs.rstudio.com/flexdashboard/) and [here](https://blog.rstudio.com/2016/05/17/flexdashboard-easy-interactive-dashboards-for-r/). <center><img src="https://cdn.pixabay.com/photo/2018/08/18/13/26/interface-3614766_960_720.png" /></center> <center><a href="https://cdn.pixabay.com/photo/2018/08/18/13/26/interface-3614766_960_720.png">Pixabay Image Source</a></center> ## Topics --- * Obtaining Crypto Price Data From Coinbase & Kraken * The Interactive Sidebar For Inputs * Price Charts In Plotly * Crypto Fear & Greed Index ## Obtaining Data From Coinbase & Kraken --- The main resources I used were these two blog posts from Cryptodownload.com. Link One: https://www.cryptodatadownload.com/blog/how-to-download-coinbase-price-data-R.html Link Two: https://www.cryptodatadownload.com/blog/how-to-download-kraken-data-R.html In both the two posts, they save the extracted data from the crypto exchange into a .csv file. I have modified the code the not save the data into a .csv file. The extracted data is used to produce plots in plotly for R based on user inputs. <center><img src="https://cdn.pixabay.com/photo/2021/05/11/17/21/charts-6246450_960_720.png" /></center> <center><a href="https://cdn.pixabay.com/photo/2021/05/11/17/21/charts-6246450_960_720.png">Pixabay Image Source</a></center> ## The Interactive Sidebar For Inputs --- Having interactive elements on a dashboard allows for users to choose what data they want. Outputs and plots change as you change inputs. **Choosing Crypto Pair** The top left area contains a dropdown list menu for choosing a crypto trading pair from either Coinbase or Kraken. The lists do vary depending on if the user is obtaining crypto data from Coinbase or Kraken. I don't have all the crypto pairs from the exchanges but I do have fairly large selection. Popular cryptos are there along with a good amount of altcoins to choose from. **Select Timeframe** Users can select one of two timeframes for the crypto price data. The choices are hourly data or daily data. **Select Moving Average** With the moving average, users can choose to have a simple moving average, an exponential moving average (default) or no moving average. There is a colour picker for choosing the line colour for the moving average. A slider is there for the user to customize the number of days for the moving average.  **Relative Strength (RSI) Indicator** A second subplot is on the bottom below the crypto prices plot. This second subplot is for the Relative Strength Indicator (RSI). The RSI indicator can be used as a signal if something is oversold or overbought. RSI values above 70 indicates an asset being overbought and RSI values below 30 signals an underbought asset. The RSI indicator is turned on by default. Users can change the line colour for the RSI as well as change the number of periods for the RSI with the slider.  ## Price Charts In Plotly --- I had the option to have price charts in R's `ggplot2`. The thing was that there was no interactive features with `ggplot2`. It made sense to use `plotly` for R. (Plotly is also available for Python users.) What is nice about plotly is that you can hover over the candles on the candlestick plot to see prices at a given point in time. I used subplots to have a main candlestick chart at the top with the Relative Strength Indicator (RSI) on the second bottom subplot. The main code reference was from this [link](https://quantnomad.com/2019/04/22/example-of-candlestick-chart-in-r-using-plotly/). From the bottom of the left side bar, the user can change the colour of the moving average curve/line for the candlestick chart. The RSI line colour can also be changed with the colour picker as well as change the number of RSI periods.  ## Crypto Fear & Greed Index --- In a previous post I talked about importing crypto fear and greed index values into R (and I think Python as well). In this dashboard, I really want to add the crypto fear and greed index section here. This Crypto Fear & Greed Index section features the latest crypto fear and greed index value in the form of a meter with colour. I have included in the top middle part a small table of index values for the last 5 days. On the bottom part, there is a large line plot for the crypto fear and greed index values over time. The timeframe is from around February 2018 to now (Oct 2021).   <center>Thank you for reading.</center> Posted with [STEMGeeks](https://stemgeeks.net)
author | dkmathstats |
---|---|
permlink | r-programming-crypto-prices-dashboard-with-crypto-fear-and-greed-index |
category | hive-163521 |
json_metadata | {"tags":["programming","stem","coding","leofinance","data","datascience","crypto","dashboard","prices"],"image":["https://cdn.pixabay.com/photo/2018/08/18/13/26/interface-3614766_960_720.png","https://cdn.pixabay.com/photo/2021/05/11/17/21/charts-6246450_960_720.png","https://images.hive.blog/DQmRrkS1BAc3BhtaMiUxVZywrmjLzcz2tMhkAQmu7uxGmLG/coinbase1.PNG","https://images.hive.blog/DQmcwBhMYqUba1YwvmmTphogN48CkcLFQDHB4zirSeTCUBG/coinbase2.PNG","https://images.hive.blog/DQmNfSGapCjpdTFYtrHYPGgK3TfnFuneJNEpgKxoHfD6ZCP/plotly_image.PNG","https://images.hive.blog/DQmWDWPAA5SKQQPXQJgXkv9ydsALdSKhkdi3p5D4V4o8E2A/cryptofearGreed_01.PNG","https://images.hive.blog/DQmYPwDosJjsCAjidrZVAkoLnq45gdFsguroE6AhToKXEbR/cryptofearGreed_02.PNG"],"links":["https://dkmathstats.shinyapps.io/cryptoPrices_R/"],"app":"stemgeeks/0.1","format":"markdown","canonical_url":"https://stemgeeks.net/@dkmathstats/r-programming-crypto-prices-dashboard-with-crypto-fear-and-greed-index"} |
created | 2021-10-28 18:31:54 |
last_update | 2021-10-28 18:31:54 |
depth | 0 |
children | 0 |
last_payout | 2021-11-04 18:31:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 7.066 HBD |
curator_payout_value | 7.045 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 5,810 |
author_reputation | 150,966,630,461,411 |
root_title | "R Programming - Crypto Prices Dashboard With Crypto Fear & Greed Index" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 107,353,436 |
net_rshares | 12,338,908,502,623 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
onealfa | 0 | 495,289,245,069 | 5% | ||
slider2990 | 0 | 1,601,161,835 | 20% | ||
trans-juanmi | 0 | 453,270,708 | 20% | ||
itinerantph | 0 | 436,735,502 | 5% | ||
freebornsociety | 0 | 770,212,836 | 5% | ||
bearbear613 | 0 | 88,864,287,911 | 100% | ||
coffeelovers | 0 | 7,104,346,840 | 100% | ||
themarkymark | 0 | 3,401,131,854,184 | 10% | ||
buildawhale | 0 | 7,111,969,061,935 | 10% | ||
makerhacks | 0 | 32,619,749,005 | 10% | ||
upmyvote | 0 | 6,635,314,288 | 10% | ||
tobias-g | 0 | 1,904,860,855 | 7.5% | ||
upfundme | 0 | 908,440,761 | 3% | ||
nenya | 0 | 774,771,619 | 100% | ||
movement19 | 0 | 731,699,939 | 2.5% | ||
tonimontana | 0 | 5,414,082,187 | 100% | ||
enforcer48 | 0 | 135,181,313,939 | 15% | ||
acont | 0 | 96,249,693,089 | 100% | ||
smartvote | 0 | 84,417,764,021 | 4% | ||
parsavel | 0 | 673,302,186 | 100% | ||
harpreetjanda | 0 | 571,090,944 | 2% | ||
nijn | 0 | 731,312,948 | 100% | ||
quenty | 0 | 1,793,874,918 | 100% | ||
nimloth | 0 | 1,157,840,551 | 100% | ||
ctime | 0 | 130,230,401,347 | 2.5% | ||
limka | 0 | 73,558,761 | 72.95% | ||
memehub | 0 | 87,067,683,473 | 100% | ||
morwen | 0 | 49,847,185,083 | 100% | ||
haxxdump | 0 | 124,450,449 | 10% | ||
aninsidejob | 0 | 6,318,324,457 | 100% | ||
klima | 0 | 1,824,581,141 | 100% | ||
stemgeeks | 0 | 75,924,254,565 | 70% | ||
stemcuration | 0 | 1,429,276,748 | 70% | ||
babytarazkp | 0 | 4,213,332,507 | 40% | ||
abh12345.stem | 0 | 1,177,027,089 | 35% | ||
stem.alfa | 0 | 110,397,706 | 100% | ||
stemd | 0 | 313,515,015 | 100% | ||
khalstem | 0 | 1,871,615,749 | 100% | ||
yggdrasil.laguna | 0 | 162,354,713 | 35% | ||
cd-stem | 0 | 522,494,568 | 100% | ||
toni.curation | 0 | 16,624,287 | 1% | ||
chapmain | 0 | 122,486,314 | 100% | ||
stuntman.mike | 0 | 7,865,751,971 | 35% | ||
recoveryinc | 0 | 2,968,224,174 | 5% | ||
dying | 0 | 1,507,733,163 | 5% | ||
discohedge | 0 | 4,118,976,544 | 4% | ||
pfwaus | 0 | 786,647,428 | 100% | ||
dorkpower | 0 | 1,140,680,893 | 35% | ||
stemcur | 0 | 1,041,606,119 | 100% | ||
brofund-stem | 0 | 1,289,117,834 | 35% | ||
rikarivka | 0 | 5,480,729,782 | 100% | ||
rupinder | 0 | 138,846,357 | 2% | ||
stemline | 0 | 4,360,445,408 | 35% | ||
he-index | 0 | 6,054,592,037 | 15% | ||
academiccuration | 0 | 838,146,753 | 100% | ||
scooter77.stem | 0 | 717,906,627 | 70% | ||
mundo.curioso | 0 | 388,810,394 | 100% | ||
krishu.stem | 0 | 904,585,129 | 100% | ||
samrisso | 0 | 5,928,928,204 | 5% | ||
tfranzini | 0 | 4,476,988,422 | 32% | ||
scholaris.stem | 0 | 1,496,506,721 | 100% | ||
dronegirl | 0 | 323,229,279 | 100% | ||
adamada.stem | 0 | 1,181,150,808 | 100% | ||
zdigital222 | 0 | 85,302,903 | 100% | ||
brofi | 0 | 306,503,852,291 | 4% | ||
memecurator | 0 | 754,458,718 | 100% | ||
anusrimollick | 0 | 16,863,199,642 | 100% | ||
memesupport | 0 | 3,875,154,229 | 100% | ||
holovision.stem | 0 | 128,929,888 | 50% | ||
star.stem | 0 | 1,740,417,847 | 50% | ||
solominer.stem | 0 | 677,355,950 | 100% | ||
apeminingclub | 0 | 116,021,625,248 | 10% | ||
tyrnis.curation | 0 | 513,749,818 | 50% |