{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2021-11-03T05:36:20.897899Z","iopub.execute_input":"2021-11-03T05:36:20.898305Z","iopub.status.idle":"2021-11-03T05:36:20.933814Z","shell.execute_reply.started":"2021-11-03T05:36:20.898208Z","shell.execute_reply":"2021-11-03T05:36:20.932950Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install dataprep","metadata":{"execution":{"iopub.status.busy":"2021-11-03T06:04:17.869837Z","iopub.execute_input":"2021-11-03T06:04:17.870207Z","iopub.status.idle":"2021-11-03T06:04:20.200128Z","shell.execute_reply.started":"2021-11-03T06:04:17.870172Z","shell.execute_reply":"2021-11-03T06:04:20.198872Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import pandas as pd\nfrom dataprep.clean import clean_text\nfrom dataprep.eda import plot, plot_diff, plot_correlation, create_report","metadata":{"execution":{"iopub.status.busy":"2021-11-03T05:36:44.133010Z","iopub.execute_input":"2021-11-03T05:36:44.133298Z","iopub.status.idle":"2021-11-03T05:36:47.438696Z","shell.execute_reply.started":"2021-11-03T05:36:44.133260Z","shell.execute_reply":"2021-11-03T05:36:47.437840Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_full = pd.read_csv(\"/kaggle/input/g-research-crypto-forecasting/train.csv\")\n\n\nprint('Training Set Shape = {}'.format(train_full.shape))\nprint('Training Set Memory Usage = {:.2f}MB'.format(train_full.memory_usage().sum()/2**20))","metadata":{"execution":{"iopub.status.busy":"2021-11-03T05:36:47.439991Z","iopub.execute_input":"2021-11-03T05:36:47.440255Z","iopub.status.idle":"2021-11-03T05:37:49.389548Z","shell.execute_reply.started":"2021-11-03T05:36:47.440225Z","shell.execute_reply":"2021-11-03T05:37:49.387718Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_full.head()","metadata":{"execution":{"iopub.status.busy":"2021-11-03T05:37:49.396114Z","iopub.execute_input":"2021-11-03T05:37:49.396436Z","iopub.status.idle":"2021-11-03T05:37:49.426992Z","shell.execute_reply.started":"2021-11-03T05:37:49.396392Z","shell.execute_reply":"2021-11-03T05:37:49.425847Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plot(train_full)","metadata":{"execution":{"iopub.status.busy":"2021-11-03T05:37:49.428691Z","iopub.execute_input":"2021-11-03T05:37:49.429063Z","iopub.status.idle":"2021-11-03T05:41:52.946909Z","shell.execute_reply.started":"2021-11-03T05:37:49.429016Z","shell.execute_reply":"2021-11-03T05:41:52.945692Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Visualiztion of a slice of Ethinium Classic Price (CandleStick)","metadata":{}},{"cell_type":"code","source":"asset_df = pd.read_csv('/kaggle/input/g-research-crypto-forecasting/asset_details.csv')\nasset_df","metadata":{"execution":{"iopub.status.busy":"2021-11-03T05:47:40.758019Z","iopub.execute_input":"2021-11-03T05:47:40.758427Z","iopub.status.idle":"2021-11-03T05:47:40.778624Z","shell.execute_reply.started":"2021-11-03T05:47:40.758388Z","shell.execute_reply":"2021-11-03T05:47:40.777985Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"etc = train_full[train_full[\"Asset_ID\"]==7].set_index(\"timestamp\") # Asset_ID = 7 for Ethereum Classic\netc_slice = etc[:200]\netc_slice","metadata":{"execution":{"iopub.status.busy":"2021-11-03T05:53:56.500393Z","iopub.execute_input":"2021-11-03T05:53:56.500721Z","iopub.status.idle":"2021-11-03T05:53:57.054353Z","shell.execute_reply.started":"2021-11-03T05:53:56.500690Z","shell.execute_reply":"2021-11-03T05:53:57.053140Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import plotly.graph_objects as go\n\nfig = go.Figure(data=[go.Candlestick(x=etc_slice.index, \n                                     open=etc_slice['Open'], \n                                     high=etc_slice['High'], \n                                     low=etc_slice['Low'], \n                                     close=etc_slice['Close'])])\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2021-11-03T05:54:01.658772Z","iopub.execute_input":"2021-11-03T05:54:01.659144Z","iopub.status.idle":"2021-11-03T05:54:01.673810Z","shell.execute_reply.started":"2021-11-03T05:54:01.659099Z","shell.execute_reply":"2021-11-03T05:54:01.672706Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"create_report(etc)","metadata":{"execution":{"iopub.status.busy":"2021-11-03T05:58:16.739483Z","iopub.execute_input":"2021-11-03T05:58:16.739832Z","iopub.status.idle":"2021-11-03T05:59:13.915278Z","shell.execute_reply.started":"2021-11-03T05:58:16.739796Z","shell.execute_reply":"2021-11-03T05:59:13.909521Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# If you find this notebook useful, support with an upvote👍","metadata":{}}]}