class: center, middle, inverse, title-slide # R Markdown Output ## Last run on: 2022-11-15 06:08:52 --- # Overview This document has code embedded throughout. In the next section we will create a visualization using the already loaded dataset `eth_data`: ```r datatable(eth_data, options = list(lengthMenu = c(3, 5, 10))) ```
--- # Price Chart - Ethereum <!-- --> --- # Python Code Example removed for now because of package install automation issues <!-- ```{python} --> <!-- import pandas as pd --> <!-- # Create the Python object from R --> <!-- df = r.cryptodata --> <!-- # Show the new Python dataframe --> <!-- df --> <!-- ``` --> <!-- --- --> <!-- # One more Python example --> <!-- The code below creates a new column `price_percentile` that specifies if the price for the row was in the upper or lower 50th percentile of prices (BTC should be upper and ETH lower): --> <!-- ```{python} --> <!-- import numpy as np --> <!-- # Create a new column based on the ask_1_price value: --> <!-- df['price_percentile'] = np.where(df['ask_1_price'] > --> <!-- np.percentile(df['ask_1_price'], 50), --> <!-- 'upper 50th percentile of prices', --> <!-- 'lower 50th percentile of prices') --> <!-- # Show modified dataframe: --> <!-- df[['symbol', 'ask_1_price', 'price_percentile']] --> <!-- ``` --> <!-- --- -->