{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.14","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"nvidiaTeslaT4","dataSources":[{"sourceId":81933,"databundleVersionId":9643020,"sourceType":"competition"}],"dockerImageVersionId":30762,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# **Data Collection**","metadata":{}},{"cell_type":"markdown","source":"**1.0- Using RAPIDS cuDF for best speed**","metadata":{}},{"cell_type":"code","source":"%load_ext cudf.pandas","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-22T12:23:59.980898Z","iopub.execute_input":"2024-11-22T12:23:59.981153Z","iopub.status.idle":"2024-11-22T12:24:05.598261Z","shell.execute_reply.started":"2024-11-22T12:23:59.981127Z","shell.execute_reply":"2024-11-22T12:24:05.597535Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**1.1- Importing File formats**","metadata":{}},{"cell_type":"code","source":"import pandas as pd\n\n# Importing CSV files\ntrain_df = pd.read_csv('/kaggle/input/child-mind-institute-problematic-internet-use/train.csv')\ntest_df = pd.read_csv('/kaggle/input/child-mind-institute-problematic-internet-use/test.csv')\ndata_dict = pd.read_csv('/kaggle/input/child-mind-institute-problematic-internet-use/data_dictionary.csv')","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:07.850348Z","iopub.execute_input":"2024-11-22T12:25:07.850867Z","iopub.status.idle":"2024-11-22T12:25:08.711431Z","shell.execute_reply.started":"2024-11-22T12:25:07.850835Z","shell.execute_reply":"2024-11-22T12:25:08.710626Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**1.21- Checking Data Types**","metadata":{}},{"cell_type":"code","source":"train_df.dtypes","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:09.976233Z","iopub.execute_input":"2024-11-22T12:25:09.976565Z","iopub.status.idle":"2024-11-22T12:25:10.004577Z","shell.execute_reply.started":"2024-11-22T12:25:09.976537Z","shell.execute_reply":"2024-11-22T12:25:10.003593Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"test_df.dtypes","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:10.074504Z","iopub.execute_input":"2024-11-22T12:25:10.074803Z","iopub.status.idle":"2024-11-22T12:25:10.092298Z","shell.execute_reply.started":"2024-11-22T12:25:10.074778Z","shell.execute_reply":"2024-11-22T12:25:10.091474Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"data_dict.dtypes","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:10.096872Z","iopub.execute_input":"2024-11-22T12:25:10.097131Z","iopub.status.idle":"2024-11-22T12:25:10.111740Z","shell.execute_reply.started":"2024-11-22T12:25:10.097108Z","shell.execute_reply":"2024-11-22T12:25:10.110886Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**1.3- Checking Duplicates**","metadata":{}},{"cell_type":"code","source":"train_df.duplicated().sum()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:10.113304Z","iopub.execute_input":"2024-11-22T12:25:10.114074Z","iopub.status.idle":"2024-11-22T12:25:10.268560Z","shell.execute_reply.started":"2024-11-22T12:25:10.114037Z","shell.execute_reply":"2024-11-22T12:25:10.267517Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"test_df.duplicated().sum()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:10.269743Z","iopub.execute_input":"2024-11-22T12:25:10.270300Z","iopub.status.idle":"2024-11-22T12:25:10.284406Z","shell.execute_reply.started":"2024-11-22T12:25:10.270261Z","shell.execute_reply":"2024-11-22T12:25:10.283505Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"data_dict.duplicated().sum()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:10.286263Z","iopub.execute_input":"2024-11-22T12:25:10.286573Z","iopub.status.idle":"2024-11-22T12:25:10.296129Z","shell.execute_reply.started":"2024-11-22T12:25:10.286539Z","shell.execute_reply":"2024-11-22T12:25:10.295327Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# **2. Data Exploration**","metadata":{}},{"cell_type":"markdown","source":"**2.1- Understanding the Structure**","metadata":{}},{"cell_type":"markdown","source":"**2.1.1- View the First Few Rows**","metadata":{}},{"cell_type":"code","source":"train_df.head()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:10.297312Z","iopub.execute_input":"2024-11-22T12:25:10.297860Z","iopub.status.idle":"2024-11-22T12:25:11.740984Z","shell.execute_reply.started":"2024-11-22T12:25:10.297824Z","shell.execute_reply":"2024-11-22T12:25:11.740010Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"test_df.head()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:11.743069Z","iopub.execute_input":"2024-11-22T12:25:11.743386Z","iopub.status.idle":"2024-11-22T12:25:12.781648Z","shell.execute_reply.started":"2024-11-22T12:25:11.743356Z","shell.execute_reply":"2024-11-22T12:25:12.780763Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"data_dict.head()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:12.782897Z","iopub.execute_input":"2024-11-22T12:25:12.783542Z","iopub.status.idle":"2024-11-22T12:25:12.998315Z","shell.execute_reply.started":"2024-11-22T12:25:12.783487Z","shell.execute_reply":"2024-11-22T12:25:12.997509Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**2.1.2- View DataFrame Information**","metadata":{}},{"cell_type":"code","source":"train_df.info()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:12.999410Z","iopub.execute_input":"2024-11-22T12:25:12.999741Z","iopub.status.idle":"2024-11-22T12:25:13.043115Z","shell.execute_reply.started":"2024-11-22T12:25:12.999681Z","shell.execute_reply":"2024-11-22T12:25:13.042311Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"test_df.info()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:13.044168Z","iopub.execute_input":"2024-11-22T12:25:13.044836Z","iopub.status.idle":"2024-11-22T12:25:13.076464Z","shell.execute_reply.started":"2024-11-22T12:25:13.044795Z","shell.execute_reply":"2024-11-22T12:25:13.075676Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"data_dict.info()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:13.077359Z","iopub.execute_input":"2024-11-22T12:25:13.077561Z","iopub.status.idle":"2024-11-22T12:25:13.089422Z","shell.execute_reply.started":"2024-11-22T12:25:13.077540Z","shell.execute_reply":"2024-11-22T12:25:13.088579Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**2.1.3- Summary Statistics**","metadata":{}},{"cell_type":"code","source":"train_df.describe()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:13.092078Z","iopub.execute_input":"2024-11-22T12:25:13.092314Z","iopub.status.idle":"2024-11-22T12:25:16.691536Z","shell.execute_reply.started":"2024-11-22T12:25:13.092291Z","shell.execute_reply":"2024-11-22T12:25:16.690610Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"test_df.describe()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:16.692731Z","iopub.execute_input":"2024-11-22T12:25:16.693025Z","iopub.status.idle":"2024-11-22T12:25:18.325050Z","shell.execute_reply.started":"2024-11-22T12:25:16.692998Z","shell.execute_reply":"2024-11-22T12:25:18.324146Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"data_dict.describe()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:18.326140Z","iopub.execute_input":"2024-11-22T12:25:18.326446Z","iopub.status.idle":"2024-11-22T12:25:18.378825Z","shell.execute_reply.started":"2024-11-22T12:25:18.326417Z","shell.execute_reply":"2024-11-22T12:25:18.377861Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**2.1.4- View Column Names**","metadata":{}},{"cell_type":"code","source":"train_df.columns","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:18.379928Z","iopub.execute_input":"2024-11-22T12:25:18.380232Z","iopub.status.idle":"2024-11-22T12:25:18.388935Z","shell.execute_reply.started":"2024-11-22T12:25:18.380204Z","shell.execute_reply":"2024-11-22T12:25:18.387981Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"test_df.columns","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:18.389994Z","iopub.execute_input":"2024-11-22T12:25:18.390267Z","iopub.status.idle":"2024-11-22T12:25:18.401296Z","shell.execute_reply.started":"2024-11-22T12:25:18.390242Z","shell.execute_reply":"2024-11-22T12:25:18.400285Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"data_dict.columns","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:18.402410Z","iopub.execute_input":"2024-11-22T12:25:18.402855Z","iopub.status.idle":"2024-11-22T12:25:18.416970Z","shell.execute_reply.started":"2024-11-22T12:25:18.402820Z","shell.execute_reply":"2024-11-22T12:25:18.416211Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**2.1.5- Shape of the Data**","metadata":{}},{"cell_type":"code","source":"train_df.shape","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:18.417994Z","iopub.execute_input":"2024-11-22T12:25:18.418254Z","iopub.status.idle":"2024-11-22T12:25:18.424186Z","shell.execute_reply.started":"2024-11-22T12:25:18.418222Z","shell.execute_reply":"2024-11-22T12:25:18.423274Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"test_df.shape","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:18.425246Z","iopub.execute_input":"2024-11-22T12:25:18.425522Z","iopub.status.idle":"2024-11-22T12:25:18.433948Z","shell.execute_reply.started":"2024-11-22T12:25:18.425499Z","shell.execute_reply":"2024-11-22T12:25:18.433118Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"data_dict.shape","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:18.434938Z","iopub.execute_input":"2024-11-22T12:25:18.435242Z","iopub.status.idle":"2024-11-22T12:25:18.447946Z","shell.execute_reply.started":"2024-11-22T12:25:18.435206Z","shell.execute_reply":"2024-11-22T12:25:18.447160Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**2.2- Missing Values**","metadata":{}},{"cell_type":"markdown","source":"**2.2.1- Identifying Missing Values**","metadata":{}},{"cell_type":"code","source":"missing_values_train = train_df.isnull().sum()\nmissing_values_test = test_df.isnull().sum()\nmissing_values_data_dict = data_dict.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:18.448976Z","iopub.execute_input":"2024-11-22T12:25:18.449254Z","iopub.status.idle":"2024-11-22T12:25:18.567617Z","shell.execute_reply.started":"2024-11-22T12:25:18.449230Z","shell.execute_reply":"2024-11-22T12:25:18.566732Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**2.2.2- Dropping Rows or Columns with Missing Values**","metadata":{}},{"cell_type":"code","source":"# Drop rows with any missing values\ntrain_cleaned = train_df.dropna()\ntest_cleaned = test_df.dropna()\n\n# Drop columns with any missing values\ntrain_cleaned_cols = train_df.dropna(axis=1)\ntest_cleaned_cols = test_df.dropna(axis=1)","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:18.568613Z","iopub.execute_input":"2024-11-22T12:25:18.568937Z","iopub.status.idle":"2024-11-22T12:25:18.584789Z","shell.execute_reply.started":"2024-11-22T12:25:18.568913Z","shell.execute_reply":"2024-11-22T12:25:18.584166Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# **3. Data Cleaning**","metadata":{}},{"cell_type":"markdown","source":"**3.1- Identifying Outliers using Z-Score**","metadata":{}},{"cell_type":"code","source":"from scipy import stats\n\n# Calculate Z-scores of each value in the DataFrame\nz_scores_train = stats.zscore(train_cleaned.select_dtypes(include=['float64', 'int64']))\nz_scores_test = stats.zscore(test_cleaned.select_dtypes(include=['float64', 'int64']))\n\n# Identify outliers (Z-score > 3 or < -3)\ndf_outliers_train = train_cleaned[(z_scores_train > 3).any(axis=1) | (z_scores_train < -3).any(axis=1)]\ndf_outliers_test = test_cleaned[(z_scores_test > 3).any(axis=1) | (z_scores_test < -3).any(axis=1)]","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:18.585789Z","iopub.execute_input":"2024-11-22T12:25:18.586116Z","iopub.status.idle":"2024-11-22T12:25:19.039594Z","shell.execute_reply.started":"2024-11-22T12:25:18.586079Z","shell.execute_reply":"2024-11-22T12:25:19.038881Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**3.2- Remove Outliers**","metadata":{}},{"cell_type":"code","source":"# Remove rows with outliers based on Z-score\ndf_no_outliers_train = train_cleaned[(z_scores_train < 3).all(axis=1) & (z_scores_train > -3).all(axis=1)]\ndf_no_outliers_test = test_cleaned[(z_scores_test < 3).all(axis=1) & (z_scores_test > -3).all(axis=1)]","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:19.040633Z","iopub.execute_input":"2024-11-22T12:25:19.041015Z","iopub.status.idle":"2024-11-22T12:25:19.055296Z","shell.execute_reply.started":"2024-11-22T12:25:19.040989Z","shell.execute_reply":"2024-11-22T12:25:19.054446Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# **Problematic Internet Use detailed Breakdown**","metadata":{}},{"cell_type":"markdown","source":"**Visualizing Age Distribution**","metadata":{}},{"cell_type":"code","source":"import plotly.express as px\n\nfig_train_age = px.histogram(train_df, x='Basic_Demos-Age', title='Age Distribution of Participants (Train)')\nfig_train_age.show()\n\nfig_test_age = px.histogram(test_df, x='Basic_Demos-Age', title='Age Distribution of Participants (Test)')\nfig_test_age.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:19.056191Z","iopub.execute_input":"2024-11-22T12:25:19.056412Z","iopub.status.idle":"2024-11-22T12:25:21.126137Z","shell.execute_reply.started":"2024-11-22T12:25:19.056376Z","shell.execute_reply":"2024-11-22T12:25:21.125278Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**Visualizing Internet Use Hours**","metadata":{}},{"cell_type":"code","source":"fig_train_internet_use = px.histogram(train_df, x='PreInt_EduHx-computerinternet_hoursday', title='Internet Use Hours per Day (Train)')\nfig_train_internet_use.show()\n\nfig_test_internet_use = px.histogram(test_df, x='PreInt_EduHx-computerinternet_hoursday', title='Internet Use Hours per Day (Test)')\nfig_test_internet_use.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:21.127335Z","iopub.execute_input":"2024-11-22T12:25:21.128054Z","iopub.status.idle":"2024-11-22T12:25:21.234549Z","shell.execute_reply.started":"2024-11-22T12:25:21.128011Z","shell.execute_reply":"2024-11-22T12:25:21.233755Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**Exploring the Relationship between Age and Internet Use**","metadata":{}},{"cell_type":"code","source":"fig_age_vs_internet_use = px.scatter(train_df, x='Basic_Demos-Age', y='PreInt_EduHx-computerinternet_hoursday', \n                                      title='Age vs Internet Use Hours (Train)', \n                                      labels={'Basic_Demos-Age': 'Age', 'PreInt_EduHx-computerinternet_hoursday': 'Internet Use Hours'})\nfig_age_vs_internet_use.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:21.238956Z","iopub.execute_input":"2024-11-22T12:25:21.239236Z","iopub.status.idle":"2024-11-22T12:25:21.327514Z","shell.execute_reply.started":"2024-11-22T12:25:21.239201Z","shell.execute_reply":"2024-11-22T12:25:21.326663Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**Distribution of Severity Impairment Index (sii)**","metadata":{}},{"cell_type":"code","source":"fig_train_sii = px.histogram(train_df, x='sii', title='Distribution of Severity Impairment Index (Train)')\nfig_train_sii.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:21.328631Z","iopub.execute_input":"2024-11-22T12:25:21.328978Z","iopub.status.idle":"2024-11-22T12:25:21.386803Z","shell.execute_reply.started":"2024-11-22T12:25:21.328941Z","shell.execute_reply":"2024-11-22T12:25:21.385907Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**Comparing Age by Severity Impairment Index**","metadata":{}},{"cell_type":"code","source":"fig_age_by_sii = px.box(train_df, x='sii', y='Basic_Demos-Age', title='Age Distribution by Severity Impairment Index (Train)')\nfig_age_by_sii.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:21.388031Z","iopub.execute_input":"2024-11-22T12:25:21.388297Z","iopub.status.idle":"2024-11-22T12:25:21.474588Z","shell.execute_reply.started":"2024-11-22T12:25:21.388274Z","shell.execute_reply":"2024-11-22T12:25:21.473745Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the average number of internet hours used by different age groups?**","metadata":{}},{"cell_type":"code","source":"average_internet_use = train_df.groupby('Basic_Demos-Age')['PreInt_EduHx-computerinternet_hoursday'].mean()\naverage_internet_use","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:21.475863Z","iopub.execute_input":"2024-11-22T12:25:21.476099Z","iopub.status.idle":"2024-11-22T12:25:21.552230Z","shell.execute_reply.started":"2024-11-22T12:25:21.476075Z","shell.execute_reply":"2024-11-22T12:25:21.551505Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**Is there a correlation between BMI and Severity Impairment Index?**","metadata":{}},{"cell_type":"code","source":"correlation_bmi_sii = train_df[['Physical-BMI', 'sii']].corr()\ncorrelation_bmi_sii","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:21.553172Z","iopub.execute_input":"2024-11-22T12:25:21.553411Z","iopub.status.idle":"2024-11-22T12:25:21.637599Z","shell.execute_reply.started":"2024-11-22T12:25:21.553387Z","shell.execute_reply":"2024-11-22T12:25:21.636870Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How does physical activity (e.g., heart rate) relate to internet usage?**","metadata":{}},{"cell_type":"code","source":"fig_physical_activity = px.scatter(train_df, x='Physical-HeartRate', y='PreInt_EduHx-computerinternet_hoursday',\n                                    title='Heart Rate vs Internet Use Hours (Train)')\nfig_physical_activity.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:21.638529Z","iopub.execute_input":"2024-11-22T12:25:21.638806Z","iopub.status.idle":"2024-11-22T12:25:21.700219Z","shell.execute_reply.started":"2024-11-22T12:25:21.638779Z","shell.execute_reply":"2024-11-22T12:25:21.699428Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What demographic factors are associated with higher severity impairment index scores?**","metadata":{}},{"cell_type":"code","source":"fig_demo_factors = px.bar(train_df, x='Basic_Demos-Sex', y='sii', title='Severity Impairment Index by Sex (Train)')\nfig_demo_factors.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:21.701266Z","iopub.execute_input":"2024-11-22T12:25:21.702031Z","iopub.status.idle":"2024-11-22T12:25:21.776060Z","shell.execute_reply.started":"2024-11-22T12:25:21.701993Z","shell.execute_reply":"2024-11-22T12:25:21.775224Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the Distribution of Internet Use Hours by Sex?**","metadata":{}},{"cell_type":"code","source":"import plotly.express as px\n\nfig = px.histogram(\n    train_df,\n    x='PreInt_EduHx-computerinternet_hoursday',\n    color='Basic_Demos-Sex',\n    title='Distribution of Internet Use Hours by Sex',\n    labels={'PreInt_EduHx-computerinternet_hoursday': 'Hours per Day'},\n    color_discrete_sequence=px.colors.qualitative.Set1\n)\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:21.777194Z","iopub.execute_input":"2024-11-22T12:25:21.777505Z","iopub.status.idle":"2024-11-22T12:25:21.907552Z","shell.execute_reply.started":"2024-11-22T12:25:21.777471Z","shell.execute_reply":"2024-11-22T12:25:21.906771Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How Does the Distribution of BMI Vary by Sex?**","metadata":{}},{"cell_type":"code","source":"fig_bmi = px.histogram(\n    train_df,\n    x='Physical-BMI',\n    color='Basic_Demos-Sex',\n    title='Distribution of BMI by Sex',\n    labels={'Physical-BMI': 'Body Mass Index (BMI)'},\n    color_discrete_sequence=px.colors.qualitative.Set2\n)\nfig_bmi.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:21.908712Z","iopub.execute_input":"2024-11-22T12:25:21.909035Z","iopub.status.idle":"2024-11-22T12:25:21.988312Z","shell.execute_reply.started":"2024-11-22T12:25:21.908996Z","shell.execute_reply":"2024-11-22T12:25:21.987425Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the Distribution of CGAS Scores Across Different Ages?**","metadata":{}},{"cell_type":"code","source":"fig_cgas = px.histogram(\n    train_df,\n    x='CGAS-CGAS_Score',\n    color='Basic_Demos-Age',\n    title='Distribution of CGAS Scores by Age',\n    labels={'CGAS-CGAS_Score': 'CGAS Score'},\n    color_discrete_sequence=px.colors.qualitative.Set3\n)\nfig_cgas.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:21.989207Z","iopub.execute_input":"2024-11-22T12:25:21.989462Z","iopub.status.idle":"2024-11-22T12:25:22.228066Z","shell.execute_reply.started":"2024-11-22T12:25:21.989437Z","shell.execute_reply":"2024-11-22T12:25:22.227251Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How Does the Distribution of Sleep Disturbance Scores Vary by Age?**","metadata":{}},{"cell_type":"code","source":"fig_sleep = px.histogram(\n    train_df,\n    x='SDS-SDS_Total_Raw',\n    color='Basic_Demos-Age',\n    title='Distribution of Sleep Disturbance Scores by Age',\n    labels={'SDS-SDS_Total_Raw': 'Sleep Disturbance Score'}\n)\nfig_sleep.show()\n","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:22.229214Z","iopub.execute_input":"2024-11-22T12:25:22.229539Z","iopub.status.idle":"2024-11-22T12:25:22.476932Z","shell.execute_reply.started":"2024-11-22T12:25:22.229500Z","shell.execute_reply":"2024-11-22T12:25:22.476137Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the Relationship Between BMI and CGAS Scores?**","metadata":{}},{"cell_type":"code","source":"fig_bmi_cgas = px.scatter(\n    train_df,\n    x='Physical-BMI',\n    y='CGAS-CGAS_Score',\n    color='Basic_Demos-Sex',\n    title='Relationship Between BMI and CGAS Scores',\n    labels={'Physical-BMI': 'Body Mass Index (BMI)', 'CGAS-CGAS_Score': 'CGAS Score'},\n    color_discrete_sequence=px.colors.qualitative.Set1\n)\nfig_bmi_cgas.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:22.478040Z","iopub.execute_input":"2024-11-22T12:25:22.478357Z","iopub.status.idle":"2024-11-22T12:25:22.562800Z","shell.execute_reply.started":"2024-11-22T12:25:22.478320Z","shell.execute_reply":"2024-11-22T12:25:22.561988Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What Patterns Are Observed in Internet Use Hours Across Different CGAS Scores?**","metadata":{}},{"cell_type":"code","source":"fig_internet_cgas = px.box(\n    train_df,\n    x='CGAS-CGAS_Score',\n    y='PreInt_EduHx-computerinternet_hoursday',\n    color='CGAS-CGAS_Score',\n    title='Internet Use Hours Across Different CGAS Scores',\n    labels={'CGAS-CGAS_Score': 'CGAS Score', 'PreInt_EduHx-computerinternet_hoursday': 'Hours per Day'},\n    color_discrete_sequence=px.colors.qualitative.Set2\n)\nfig_internet_cgas.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:22.563848Z","iopub.execute_input":"2024-11-22T12:25:22.564164Z","iopub.status.idle":"2024-11-22T12:25:23.454801Z","shell.execute_reply.started":"2024-11-22T12:25:22.564129Z","shell.execute_reply":"2024-11-22T12:25:23.453482Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the Distribution of Physical Activity Scores Across Different Seasons?**","metadata":{}},{"cell_type":"code","source":"fig_pa_season = px.histogram(\n    train_df,\n    x='PAQ_A-Season',\n    color='Basic_Demos-Sex',\n    title='Distribution of Physical Activity Scores by Season',\n    labels={'PAQ_A-Season': 'Physical Activity Score'},\n    color_discrete_sequence=px.colors.qualitative.Set1\n)\nfig_pa_season.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:23.455975Z","iopub.execute_input":"2024-11-22T12:25:23.456242Z","iopub.status.idle":"2024-11-22T12:25:23.662394Z","shell.execute_reply.started":"2024-11-22T12:25:23.456216Z","shell.execute_reply":"2024-11-22T12:25:23.661625Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How Does the Distribution of Body Fat Percentage Vary by Age?**","metadata":{}},{"cell_type":"code","source":"fig_body_fat = px.histogram(\n    train_df,\n    x='BIA-BIA_Fat',\n    color='Basic_Demos-Age',\n    title='Distribution of Body Fat Percentage by Age',\n    labels={'BIA-BIA_Fat': 'Body Fat Percentage'},\n    color_discrete_sequence=px.colors.qualitative.Set2\n)\nfig_body_fat.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:23.663439Z","iopub.execute_input":"2024-11-22T12:25:23.663796Z","iopub.status.idle":"2024-11-22T12:25:23.902357Z","shell.execute_reply.started":"2024-11-22T12:25:23.663758Z","shell.execute_reply":"2024-11-22T12:25:23.901566Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the Distribution of Systolic Blood Pressure Across Participants?**","metadata":{}},{"cell_type":"code","source":"fig_sbp = px.histogram(\n    train_df,\n    x='Physical-Systolic_BP',\n    color='Basic_Demos-Sex',\n    title='Distribution of Systolic Blood Pressure by Sex',\n    labels={'Physical-Systolic_BP': 'Systolic Blood Pressure (mmHg)'},\n    color_discrete_sequence=px.colors.qualitative.Set3\n)\nfig_sbp.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:23.903571Z","iopub.execute_input":"2024-11-22T12:25:23.903917Z","iopub.status.idle":"2024-11-22T12:25:23.981019Z","shell.execute_reply.started":"2024-11-22T12:25:23.903881Z","shell.execute_reply":"2024-11-22T12:25:23.980222Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How Does the Distribution of Diastolic Blood Pressure Vary by Fitness Endurance Stages?**","metadata":{}},{"cell_type":"code","source":"fig_dbp = px.histogram(\n    train_df,\n    x='Physical-Diastolic_BP',\n    color='Fitness_Endurance-Max_Stage',\n    title='Distribution of Diastolic Blood Pressure by Fitness Endurance Stage',\n    labels={'Physical-Diastolic_BP': 'Diastolic Blood Pressure (mmHg)'}\n)\nfig_dbp.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:23.982164Z","iopub.execute_input":"2024-11-22T12:25:23.982490Z","iopub.status.idle":"2024-11-22T12:25:24.199045Z","shell.execute_reply.started":"2024-11-22T12:25:23.982446Z","shell.execute_reply":"2024-11-22T12:25:24.198138Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the Distribution of Total Sleep Disturbance Scores Across Different Seasons?**","metadata":{}},{"cell_type":"code","source":"fig_sleep_season = px.histogram(\n    train_df,\n    x='SDS-Season',\n    color='Basic_Demos-Sex',\n    title='Distribution of Total Sleep Disturbance Scores by Season',\n    labels={'SDS-Season': 'Sleep Disturbance Score'}\n)\nfig_sleep_season.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:24.200155Z","iopub.execute_input":"2024-11-22T12:25:24.200465Z","iopub.status.idle":"2024-11-22T12:25:24.335508Z","shell.execute_reply.started":"2024-11-22T12:25:24.200438Z","shell.execute_reply":"2024-11-22T12:25:24.334715Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the Distribution of Children's Global Assessment Scale Scores?**","metadata":{}},{"cell_type":"code","source":"fig_cgas = px.histogram(\n    train_df,\n    x='CGAS-CGAS_Score',\n    color='Basic_Demos-Sex',\n    title='Distribution of Children\\'s Global Assessment Scale Scores by Sex',\n    labels={'CGAS-CGAS_Score': 'CGAS Score'}\n)\nfig_cgas.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:24.336651Z","iopub.execute_input":"2024-11-22T12:25:24.337014Z","iopub.status.idle":"2024-11-22T12:25:24.420646Z","shell.execute_reply.started":"2024-11-22T12:25:24.336975Z","shell.execute_reply":"2024-11-22T12:25:24.419678Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How Does the Distribution of Computer/Internet Hours Per Day Vary by Age?**","metadata":{}},{"cell_type":"code","source":"fig_internet_hours = px.histogram(\n    train_df,\n    x='PreInt_EduHx-computerinternet_hoursday',\n    color='Basic_Demos-Age',\n    title='Distribution of Internet Usage Hours Per Day by Age',\n    labels={'PreInt_EduHx-computerinternet_hoursday': 'Hours of Internet Use'}\n)\nfig_internet_hours.show()\n","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:24.421847Z","iopub.execute_input":"2024-11-22T12:25:24.422583Z","iopub.status.idle":"2024-11-22T12:25:24.680484Z","shell.execute_reply.started":"2024-11-22T12:25:24.422543Z","shell.execute_reply":"2024-11-22T12:25:24.679750Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the Distribution of Maximum Stage Achieved in Fitness Endurance Tests?**","metadata":{}},{"cell_type":"code","source":"fig_max_stage = px.histogram(\n    train_df,\n    x='Fitness_Endurance-Max_Stage',\n    color='Basic_Demos-Sex',\n    title='Distribution of Maximum Stage in Fitness Endurance Tests by Sex',\n    labels={'Fitness_Endurance-Max_Stage': 'Maximum Stage'}\n)\nfig_max_stage.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:24.681686Z","iopub.execute_input":"2024-11-22T12:25:24.682050Z","iopub.status.idle":"2024-11-22T12:25:24.770385Z","shell.execute_reply.started":"2024-11-22T12:25:24.682011Z","shell.execute_reply":"2024-11-22T12:25:24.769528Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the Distribution of Total Raw Sleep Disturbance Scores?**","metadata":{}},{"cell_type":"code","source":"fig_total_sleep_disturbance = px.histogram(\n    train_df,\n    x='SDS-SDS_Total_Raw',\n    color='Basic_Demos-Sex',\n    title='Distribution of Total Sleep Disturbance Scores by Sex',\n    labels={'SDS-SDS_Total_Raw': 'Total Sleep Disturbance Score'}\n)\nfig_total_sleep_disturbance.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:24.771325Z","iopub.execute_input":"2024-11-22T12:25:24.771534Z","iopub.status.idle":"2024-11-22T12:25:24.848533Z","shell.execute_reply.started":"2024-11-22T12:25:24.771512Z","shell.execute_reply":"2024-11-22T12:25:24.847750Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the relationship between Age and BMI, colored by Sex?**","metadata":{}},{"cell_type":"code","source":"import plotly.express as px\n\n# Scatter plot of Age vs. BMI colored by Sex\nfig = px.scatter(train_df, x='Basic_Demos-Age', y='Physical-BMI', \n                 color='Basic_Demos-Sex', \n                 title=\"Age vs BMI by Sex\",\n                 labels={\"Basic_Demos-Age\": \"Age\", \"Physical-BMI\": \"BMI\"})\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:24.849479Z","iopub.execute_input":"2024-11-22T12:25:24.849750Z","iopub.status.idle":"2024-11-22T12:25:24.916998Z","shell.execute_reply.started":"2024-11-22T12:25:24.849711Z","shell.execute_reply":"2024-11-22T12:25:24.916251Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How does Internet Usage (Hours per Day) vary with Age and Gender?**","metadata":{}},{"cell_type":"code","source":"fig = px.scatter(train_df, x='Basic_Demos-Age', y='PreInt_EduHx-computerinternet_hoursday',\n                 color='Basic_Demos-Sex', \n                 title=\"Age vs Internet Usage Hours per Day by Gender\",\n                 labels={\"Basic_Demos-Age\": \"Age\", \"PreInt_EduHx-computerinternet_hoursday\": \"Internet Usage (hours/day)\"})\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:24.918047Z","iopub.execute_input":"2024-11-22T12:25:24.918365Z","iopub.status.idle":"2024-11-22T12:25:24.985520Z","shell.execute_reply.started":"2024-11-22T12:25:24.918327Z","shell.execute_reply":"2024-11-22T12:25:24.984687Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the distribution of PCIAT Total Score across Age and Gender?**","metadata":{}},{"cell_type":"code","source":"fig = px.scatter(train_df, x='Basic_Demos-Age', y='PCIAT-PCIAT_Total',\n                 color='Basic_Demos-Sex',\n                 title=\"Age vs PCIAT Total Score by Gender\",\n                 labels={\"Basic_Demos-Age\": \"Age\", \"PCIAT-PCIAT_Total\": \"PCIAT Total Score\"})\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:24.986492Z","iopub.execute_input":"2024-11-22T12:25:24.986774Z","iopub.status.idle":"2024-11-22T12:25:25.059271Z","shell.execute_reply.started":"2024-11-22T12:25:24.986749Z","shell.execute_reply":"2024-11-22T12:25:25.058499Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How do physical measures like Heart Rate and BMI interact across different ages?**","metadata":{}},{"cell_type":"code","source":"fig = px.scatter(train_df, x='Basic_Demos-Age', y='Physical-HeartRate',\n                 color='Physical-BMI',\n                 title=\"Heart Rate vs BMI by Age\",\n                 labels={\"Basic_Demos-Age\": \"Age\", \"Physical-HeartRate\": \"Heart Rate\", \"Physical-BMI\": \"BMI\"})\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:25.060308Z","iopub.execute_input":"2024-11-22T12:25:25.060634Z","iopub.status.idle":"2024-11-22T12:25:25.134607Z","shell.execute_reply.started":"2024-11-22T12:25:25.060599Z","shell.execute_reply":"2024-11-22T12:25:25.133862Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the relationship between PCIAT Total Score and SDS Total Raw Score?**","metadata":{}},{"cell_type":"code","source":"fig = px.scatter(train_df, x='PCIAT-PCIAT_Total', y='SDS-SDS_Total_Raw',\n                 color='Basic_Demos-Sex',\n                 title=\"PCIAT Total Score vs SDS Total Raw Score\",\n                 labels={\"PCIAT-PCIAT_Total\": \"PCIAT Total Score\", \"SDS-SDS_Total_Raw\": \"SDS Total Raw Score\"})\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:25.135613Z","iopub.execute_input":"2024-11-22T12:25:25.135871Z","iopub.status.idle":"2024-11-22T12:25:25.204272Z","shell.execute_reply.started":"2024-11-22T12:25:25.135847Z","shell.execute_reply":"2024-11-22T12:25:25.203418Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How does BMI relate to the PCIAT Total Score?**","metadata":{}},{"cell_type":"code","source":"fig = px.scatter(train_df, x='Physical-BMI', y='PCIAT-PCIAT_Total',\n                 color='Basic_Demos-Sex',\n                 title=\"BMI vs PCIAT Total Score by Sex\",\n                 labels={\"Physical-BMI\": \"BMI\", \"PCIAT-PCIAT_Total\": \"PCIAT Total Score\"})\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:25.205286Z","iopub.execute_input":"2024-11-22T12:25:25.205545Z","iopub.status.idle":"2024-11-22T12:25:25.273187Z","shell.execute_reply.started":"2024-11-22T12:25:25.205511Z","shell.execute_reply":"2024-11-22T12:25:25.272404Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How does SDS Total Raw Score vary with age?**","metadata":{}},{"cell_type":"code","source":"fig = px.scatter(train_df, x='Basic_Demos-Age', y='SDS-SDS_Total_Raw',\n                 color='Basic_Demos-Sex',\n                 title=\"SDS Total Raw Score vs Age by Sex\",\n                 labels={\"Basic_Demos-Age\": \"Age\", \"SDS-SDS_Total_Raw\": \"SDS Total Raw Score\"})\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:25.274283Z","iopub.execute_input":"2024-11-22T12:25:25.274881Z","iopub.status.idle":"2024-11-22T12:25:25.348509Z","shell.execute_reply.started":"2024-11-22T12:25:25.274844Z","shell.execute_reply":"2024-11-22T12:25:25.347521Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How does heart rate vary across different BMI categories?**","metadata":{}},{"cell_type":"code","source":"# Defining BMI categories\ntrain_df['BMI_Category'] = pd.cut(train_df['Physical-BMI'], \n                                  bins=[0, 18.5, 24.9, 29.9, 100],\n                                  labels=['Underweight', 'Normal', 'Overweight', 'Obese'])\n\n# Plotting heart rate against BMI categories\nfig = px.box(train_df, x='BMI_Category', y='Physical-HeartRate',\n             color='Basic_Demos-Sex',\n             title=\"Heart Rate by BMI Category and Sex\",\n             labels={\"BMI_Category\": \"BMI Category\", \"Physical-HeartRate\": \"Heart Rate\"})\nfig.show()\n","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:25.349511Z","iopub.execute_input":"2024-11-22T12:25:25.349793Z","iopub.status.idle":"2024-11-22T12:25:25.506241Z","shell.execute_reply.started":"2024-11-22T12:25:25.349768Z","shell.execute_reply":"2024-11-22T12:25:25.505439Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How does PCIAT Total Score relate to age?**","metadata":{}},{"cell_type":"code","source":"fig = px.scatter(train_df, x='Basic_Demos-Age', y='PCIAT-PCIAT_Total',\n                 color='Basic_Demos-Sex',\n                 title=\"PCIAT Total Score vs Age by Sex\",\n                 labels={\"Basic_Demos-Age\": \"Age\", \"PCIAT-PCIAT_Total\": \"PCIAT Total Score\"})\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:25.507433Z","iopub.execute_input":"2024-11-22T12:25:25.507780Z","iopub.status.idle":"2024-11-22T12:25:25.575711Z","shell.execute_reply.started":"2024-11-22T12:25:25.507742Z","shell.execute_reply":"2024-11-22T12:25:25.574987Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**What is the relationship between SDS Total Raw Score and BMI?**","metadata":{}},{"cell_type":"code","source":"fig = px.scatter(train_df, x='Physical-BMI', y='SDS-SDS_Total_Raw',\n                 color='Basic_Demos-Sex',\n                 title=\"SDS Total Raw Score vs BMI by Sex\",\n                 labels={\"Physical-BMI\": \"BMI\", \"SDS-SDS_Total_Raw\": \"SDS Total Raw Score\"})\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:25.576981Z","iopub.execute_input":"2024-11-22T12:25:25.577526Z","iopub.status.idle":"2024-11-22T12:25:25.650735Z","shell.execute_reply.started":"2024-11-22T12:25:25.577487Z","shell.execute_reply":"2024-11-22T12:25:25.649952Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How does heart rate change with age?**","metadata":{}},{"cell_type":"code","source":"fig = px.scatter(train_df, x='Basic_Demos-Age', y='Physical-HeartRate',\n                 color='Basic_Demos-Sex',\n                 title=\"Heart Rate vs Age by Sex\",\n                 labels={\"Basic_Demos-Age\": \"Age\", \"Physical-HeartRate\": \"Heart Rate\"})\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:25.651852Z","iopub.execute_input":"2024-11-22T12:25:25.652255Z","iopub.status.idle":"2024-11-22T12:25:25.722192Z","shell.execute_reply.started":"2024-11-22T12:25:25.652213Z","shell.execute_reply":"2024-11-22T12:25:25.721143Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How does SDS Total Raw Score vary with heart rate?**","metadata":{}},{"cell_type":"code","source":"fig = px.scatter(train_df, x='Physical-HeartRate', y='SDS-SDS_Total_Raw',\n                 color='Basic_Demos-Sex',\n                 title=\"SDS Total Raw Score vs Heart Rate by Sex\",\n                 labels={\"Physical-HeartRate\": \"Heart Rate\", \"SDS-SDS_Total_Raw\": \"SDS Total Raw Score\"})\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:25.723133Z","iopub.execute_input":"2024-11-22T12:25:25.723378Z","iopub.status.idle":"2024-11-22T12:25:25.791858Z","shell.execute_reply.started":"2024-11-22T12:25:25.723354Z","shell.execute_reply":"2024-11-22T12:25:25.791038Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"**How does PCIAT Total Score relate to heart rate?**","metadata":{}},{"cell_type":"code","source":"fig = px.scatter(train_df, x='Physical-HeartRate', y='PCIAT-PCIAT_Total',\n                 color='Basic_Demos-Sex',\n                 title=\"PCIAT Total Score vs Heart Rate by Sex\",\n                 labels={\"Physical-HeartRate\": \"Heart Rate\", \"PCIAT-PCIAT_Total\": \"PCIAT Total Score\"})\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2024-11-22T12:25:25.792861Z","iopub.execute_input":"2024-11-22T12:25:25.793126Z","iopub.status.idle":"2024-11-22T12:25:25.865002Z","shell.execute_reply.started":"2024-11-22T12:25:25.793087Z","shell.execute_reply":"2024-11-22T12:25:25.864175Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{},"outputs":[],"execution_count":null}]}