{"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":"markdown","source":"","metadata":{}},{"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":"2023-04-15T12:31:09.925307Z","iopub.execute_input":"2023-04-15T12:31:09.926146Z","iopub.status.idle":"2023-04-15T12:31:09.936645Z","shell.execute_reply.started":"2023-04-15T12:31:09.926098Z","shell.execute_reply":"2023-04-15T12:31:09.935607Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt","metadata":{"execution":{"iopub.status.busy":"2023-04-15T12:31:09.979314Z","iopub.execute_input":"2023-04-15T12:31:09.980181Z","iopub.status.idle":"2023-04-15T12:31:09.985157Z","shell.execute_reply.started":"2023-04-15T12:31:09.980135Z","shell.execute_reply":"2023-04-15T12:31:09.983854Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train  = pd.read_csv('/kaggle/input/predict-student-performance-from-game-play/train.csv'\n                    , nrows = 10000)\ntrain.head()","metadata":{"execution":{"iopub.status.busy":"2023-04-15T12:31:10.035527Z","iopub.execute_input":"2023-04-15T12:31:10.036368Z","iopub.status.idle":"2023-04-15T12:31:10.092306Z","shell.execute_reply.started":"2023-04-15T12:31:10.036324Z","shell.execute_reply":"2023-04-15T12:31:10.091291Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train.shape","metadata":{"execution":{"iopub.status.busy":"2023-04-15T12:31:10.093957Z","iopub.execute_input":"2023-04-15T12:31:10.094536Z","iopub.status.idle":"2023-04-15T12:31:10.100434Z","shell.execute_reply.started":"2023-04-15T12:31:10.094501Z","shell.execute_reply":"2023-04-15T12:31:10.099388Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train.columns","metadata":{"execution":{"iopub.status.busy":"2023-04-15T12:31:10.139633Z","iopub.execute_input":"2023-04-15T12:31:10.140331Z","iopub.status.idle":"2023-04-15T12:31:10.146551Z","shell.execute_reply.started":"2023-04-15T12:31:10.140283Z","shell.execute_reply":"2023-04-15T12:31:10.145711Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**What each column represents**\n\n*session_id* : Session ID\n\n*elapsed_time* : Time elapsed between the start of the session and when it was recorded\n\n*event_name* : Event type name\n\n*name* : Event name\n\n*level* : Game level for the event\n\n*page* : Page number (for notebook related events)\n\n*room_coor_x, room_coor_y* : Coordinates of click wrt in-game room\n\n*screen_coor_x, screen_coor_y* : Coordinates of click wrt to player's room size\n\n*hover_duration* : Duration for which the hover exists\n\n*text* : Text seen by the player during the event\n\n*fqid* : Fully qualified event ID\n\n*room_fqid* : fqid for the room\n\n*text_fqid* : fquid for the text\n\n*fullscreen* : Label to denote if the player uses full screen mode\n\n*hq*: Label to denote if the game is in HQ\n\n*music* : Label to denote if the music is on or off while playing\n\n*level_group* : Which group of levels out of 0-4, 5-12 and 13-22 the current row belings to","metadata":{}},{"cell_type":"code","source":"plt.plot(train['level'], train['hover_duration'])","metadata":{"execution":{"iopub.status.busy":"2023-04-15T12:41:10.483509Z","iopub.execute_input":"2023-04-15T12:41:10.483912Z","iopub.status.idle":"2023-04-15T12:41:10.646052Z","shell.execute_reply.started":"2023-04-15T12:41:10.483877Z","shell.execute_reply":"2023-04-15T12:41:10.645088Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.catplot(\n    data=train, x=\"hover_duration\", y=\"level_group\", hue=\"fullscreen\", kind=\"violin\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-04-15T12:56:45.872127Z","iopub.execute_input":"2023-04-15T12:56:45.872596Z","iopub.status.idle":"2023-04-15T12:56:46.394988Z","shell.execute_reply.started":"2023-04-15T12:56:45.872557Z","shell.execute_reply":"2023-04-15T12:56:46.393879Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.catplot(data=train, x=\"elapsed_time\", y=\"level_group\", hue=\"music\", kind=\"violin\")","metadata":{"execution":{"iopub.status.busy":"2023-04-15T12:57:02.703254Z","iopub.execute_input":"2023-04-15T12:57:02.703689Z","iopub.status.idle":"2023-04-15T12:57:03.209134Z","shell.execute_reply.started":"2023-04-15T12:57:02.703644Z","shell.execute_reply":"2023-04-15T12:57:03.207864Z"},"trusted":true},"execution_count":null,"outputs":[]}]}