Commit bcb04e38 authored by rayfrancogrivera's avatar rayfrancogrivera
Browse files

Initial Commit

DAW Group Project
parents
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2019-12-30T07:26:28.998072Z",
"start_time": "2019-12-30T07:25:11.297534Z"
}
},
"outputs": [
{
"data": {
"text/html": [
"<a href='http://localhost:9999' target='_blank'>Open in new tab</a>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
" <iframe\n",
" width=\"900\"\n",
" height=\"700\"\n",
" src=\"http://localhost:9999\"\n",
" frameborder=\"0\"\n",
" allowfullscreen\n",
" ></iframe>\n",
" "
],
"text/plain": [
"<IPython.lib.display.IFrame at 0x242072a2c18>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" * Serving Flask app \"__main__\" (lazy loading)\n",
" * Environment: production\n",
" WARNING: This is a development server. Do not use it in a production deployment.\n",
" Use a production WSGI server instead.\n",
" * Debug mode: off\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
" * Running on http://localhost:9999/ (Press CTRL+C to quit)\n",
"127.0.0.1 - - [30/Dec/2019 15:25:13] \"\u001b[37mGET / HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [30/Dec/2019 15:25:13] \"\u001b[37mGET /_dash-component-suites/dash_renderer/react@16.8.6.min.js?v=1.1.2&m=1571341129 HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [30/Dec/2019 15:25:13] \"\u001b[37mGET /_dash-component-suites/dash_renderer/prop-types@15.7.2.min.js?v=1.1.2&m=1571341129 HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [30/Dec/2019 15:25:13] \"\u001b[37mGET /_dash-component-suites/dash_renderer/react-dom@16.8.6.min.js?v=1.1.2&m=1571341129 HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [30/Dec/2019 15:25:13] \"\u001b[37mGET /_dash-component-suites/dash_core_components/highlight.pack.js?v=1.3.1&m=1571359392 HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [30/Dec/2019 15:25:13] \"\u001b[37mGET /_dash-component-suites/dash_core_components/dash_core_components.min.js?v=1.3.1&m=1571359392 HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [30/Dec/2019 15:25:14] \"\u001b[37mGET /_dash-component-suites/dash_core_components/plotly-1.50.1.min.js?v=1.3.1&m=1571359392 HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [30/Dec/2019 15:25:14] \"\u001b[37mGET /_dash-component-suites/dash_html_components/dash_html_components.min.js?v=1.0.1&m=1566962730 HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [30/Dec/2019 15:25:14] \"\u001b[37mGET /_dash-component-suites/dash_renderer/dash_renderer.min.js?v=1.1.2&m=1571341129 HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [30/Dec/2019 15:25:14] \"\u001b[37mGET /_dash-component-suites/dash_table/bundle.js?v=4.4.1&m=1571349949 HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [30/Dec/2019 15:25:14] \"\u001b[37mGET /_dash-dependencies HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [30/Dec/2019 15:25:14] \"\u001b[37mGET /_dash-layout HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [30/Dec/2019 15:25:15] \"\u001b[37mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 200 -\n"
]
}
],
"source": [
"from IPython.display import display, IFrame, HTML\n",
"import os\n",
"\n",
"def show_app(app, port=9999, width=900, height=700):\n",
" host = 'localhost'\n",
" url = f'http://{host}:{port}'\n",
"\n",
" display(HTML(f\"<a href='{url}' target='_blank'>Open in new tab</a>\"))\n",
" display(IFrame(url, width=width, height=height))\n",
" app.css.config.serve_locally = True\n",
" app.scripts.config.serve_locally = True\n",
" return app.run_server(debug=False, host=host, port=port)\n",
"\n",
"import dash\n",
"import dash_core_components as dcc\n",
"import dash_html_components as html\n",
"import dash_table as dt\n",
"import plotly.graph_objs as go\n",
"import pandas as pd\n",
"import numpy as np\n",
"import pickle\n",
"\n",
"from scipy.spatial.distance import euclidean, cityblock, cosine\n",
"from dash.dependencies import Input, Output, State\n",
"\n",
"app = dash.Dash(assets_folder='web/data', assets_url_path='web/data')\n",
"\n",
"with open('data/models1daw.pickle', 'rb') as fp:\n",
" models1daw = pickle.load(fp)\n",
" \n",
"# Questions mapping\n",
"# Where do you live?\n",
"y5_mapping = {'Rural': 0, 'Urban': 1}\n",
"# What is your marital status?\n",
"a1_mapping = {'Single': 0, 'Married/Live-in': 1}\n",
"# Are you religious?\n",
"a15_mapping = {'Yes': 1, 'No': 0}\n",
"# Do you get along with your siblings well? (Higher is More Prone)\n",
"b2_mapping = {'Yes, all of them': 0, 'Yes, at least one but not all': 1, 'No': 2}\n",
"# Do your parents get along well? (Higher is More Prone)\n",
"b13_mapping = {'Most of the time': 1, \n",
" 'Sometimes': 2, \n",
" 'All the time': 0, \n",
" 'Never': 3}\n",
"# How do you get along with your father? (Higher is More Prone)\n",
"b14_mapping = {'Most of the time': 1, \n",
" 'All the time': 0, \n",
" 'Sometimes': 2, \n",
" 'Never': 3}\n",
"# How do you get along with your mother? (Higher is More Prone)\n",
"b15_mapping = {'Most of the time': 1, \n",
" 'All the time': 0, \n",
" 'Sometimes': 2, \n",
" 'Never': 3}\n",
"# You share your problems more to friends rather than family (Higher is More Prone)\n",
"b28b_mapping = {'Sometimes': 2, 'Once in a while': 1, 'Frequently': 3, \n",
" 'Never': 0, 'Always': 4}\n",
"# Were you disciplined in the family? (Higher is More Prone)\n",
"b28d_mapping = {'Sometimes': 2, 'Once in a while': 3, 'Frequently': 1, \n",
" 'Never': 4, 'Always': 0}\n",
"# Were you verbally abused by your family?\n",
"b31a5_mapping = {'Yes': 1, 'No': 0}\n",
"# Were you physically abused by your family?\n",
"b31a6_mapping = {'Yes': 1, 'No': 0} \n",
"# How would you rate your happpiness? (Higher is better)\n",
"c5_mapping = {'Very happy': 10, 'Not happy at all': 1, '2': 2, '3': 3, '4': 4,\n",
" '5': 5, '6': 6, '7': 7, '8': 8, '9': 9}\n",
"# How is your schooling?\n",
"d1_mapping = {'In school': 0, \n",
" 'Currently not in school': 1, \n",
" 'Never been in school': 2}\n",
"# Are you involved in a fraternity or sorority?\n",
"d214_mapping = {'Yes': 1, 'No': 0}\n",
"# Do you read pornography?\n",
"e18_mapping = {'Yes': 1, 'No': 0}\n",
"# Do you watch pornography?\n",
"e21_mapping = {'Yes': 1, 'No': 0}\n",
"# Do you ever feel depressed?\n",
"g1802_mapping = {'Sometimes': 1, 'Rarely': 0, 'Often': 2}\n",
"# Do you smoke?\n",
"g19_mapping = {'Yes': 1, 'No': 0}\n",
"# Do you drink?\n",
"g30_mapping = {'Yes': 1, 'No': 0}\n",
"# Do you have a family member who uses drugs?\n",
"g73_mapping = {'Yes': 1, 'No': 0}\n",
"# Were you physically abused in general?\n",
"g77_mapping = {'Yes': 1, 'No': 0}\n",
"# Do you have suicidal thoughts?\n",
"g83_mapping = {'No': 0, 'Once': 1, 'More than once': 2}\n",
"# Have you ever been suspended in school?\n",
"d23_mapping = {'Yes': 1, 'No': 0}\n",
" \n",
"app.callback_map = {}\n",
"app.layout = html.Div([\n",
" # Title\n",
" html.Div([\n",
" html.Div('Prevention is Better than Cure:', \n",
" style={'color': '#ffc000', 'font-family': 'Arial', \n",
" 'text-align': 'center', \n",
" 'font-weight': 'bold', 'font-size': '48px', \n",
" 'font-size': '3vw', 'width': '75%',\n",
" 'margin': 'auto'}),\n",
" html.Div('Predicting Illegal Drug Vulnerability among Filipino Youth', \n",
" style={'font-family': 'Arial', 'text-align': 'center', \n",
" 'font-weight': 'bold', 'font-size': '42px', \n",
" 'font-size': '2.5vw', 'width': '75%',\n",
" 'margin': 'auto'})\n",
" ], style={'background-image': 'url(web/data/title.JPG)',\n",
" 'height': '140px',\n",
" 'margin': 'auto'}),\n",
" # Sliders\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Div(['''The problem of illegal drugs is one of the most pressing \n",
" issues in the Philippines for many lives are affected by it. This \n",
" website aims to estimate the propensity for illegal drug use of a \n",
" Filipino young adult using Machine Learning.\n",
" '''], style={'font-size': '22px', 'margin': 'auto', \n",
" 'text-align': 'justify'}),\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Div(['''The dataset was sourced \n",
" from the 2013 Young Adult Fertility and Sexuality Study (YAFS) \n",
" with a total of 19,728 respondents. Among the various machine \n",
" learning models that we evaluated, we found Gradient Boosting \n",
" Classifier to yield the highest accuracy of 95.4%.\n",
" '''], style={'font-size': '22px', 'margin': 'auto', \n",
" 'text-align': 'justify'}),\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Div(['''We envisage that \n",
" with improved identification of vulnerable youth, necessary \n",
" interventions can be introduced more quickly and more accurately.\n",
" '''], style={'font-size': '22px', 'margin': 'auto', \n",
" 'text-align': 'justify'}),\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Div(['''You can now calculate your vulnerability to illegal drugs by\n",
" answering the survey below!\n",
" '''], style={'font-size': '22px', 'margin': 'auto', \n",
" 'text-align': 'justify'}),\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Hr(),\n",
" html.Div('Demographic', style={'font-weight': 'bold',\n",
" 'font-size': '24px',\n",
" 'color': '#ffc000'}),\n",
" html.Div([\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Are you religious?'),\n",
" dcc.Slider(id='c',\n",
" min=0,\n",
" max=1,\n",
" marks={y:x for x, y in a15_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Where do you live?'),\n",
" dcc.Slider(id='a',\n",
" min=0,\n",
" max=1,\n",
" marks={y:x for x, y in y5_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('What is your marital status?'),\n",
" dcc.Slider(id='b',\n",
" min=0,\n",
" max=1,\n",
" marks={y:x for x, y in a1_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Br(),\n",
" html.Br(),\n",
" ])\n",
" ], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Hr(),\n",
" html.Div('Family Relationship', style={'font-weight': 'bold',\n",
" 'font-size': '24px',\n",
" 'color': '#ffc000'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Were you verbally abused by your family?'),\n",
" dcc.Slider(id='j',\n",
" min=0,\n",
" max=1,\n",
" marks={y:x for x, y in b31a5_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Were you physically abused by your family?'),\n",
" dcc.Slider(id='k',\n",
" min=0,\n",
" max=1,\n",
" marks={y:x for x, y in b31a6_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Do you get along with your siblings well?'),\n",
" dcc.Slider(id='d',\n",
" min=0,\n",
" max=2,\n",
" marks={y:x for x, y in b2_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}), \n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Do your parents get along well?'),\n",
" dcc.Slider(id='e',\n",
" min=0,\n",
" max=3,\n",
" marks={y:x for x, y in b13_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Do you get along with your father?'),\n",
" dcc.Slider(id='f',\n",
" min=0,\n",
" max=3,\n",
" marks={y:x for x, y in b14_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Do you get along with your mother?'),\n",
" dcc.Slider(id='g',\n",
" min=0,\n",
" max=3,\n",
" marks={y:x for x, y in b15_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Were you disciplined in the family?'),\n",
" dcc.Slider(id='i',\n",
" min=0,\n",
" max=4,\n",
" marks={y:x for x, y in b28d_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('You share your problems more to friends rather than family'),\n",
" dcc.Slider(id='h',\n",
" min=0,\n",
" max=4,\n",
" marks={y:x for x, y in b28b_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Hr() \n",
" ], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Div('Activity', style={'font-weight': 'bold',\n",
" 'font-size': '24px',\n",
" 'color': '#ffc000'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Do you smoke?'),\n",
" dcc.Slider(id='r',\n",
" min=0,\n",
" max=1,\n",
" marks={y:x for x, y in g19_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Do you drink?'),\n",
" dcc.Slider(id='s',\n",
" min=0,\n",
" max=1,\n",
" marks={y:x for x, y in g30_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Do you read pornography?'),\n",
" dcc.Slider(id='o',\n",
" min=0,\n",
" max=1,\n",
" marks={y:x for x, y in e18_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Do you watch pornography?'),\n",
" dcc.Slider(id='p',\n",
" min=0,\n",
" max=1,\n",
" marks={y:x for x, y in e21_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Are you involved in a fraternity or sorority?'),\n",
" dcc.Slider(id='n',\n",
" min=0,\n",
" max=1,\n",
" marks={y:x for x, y in d214_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('How is your schooling?'),\n",
" dcc.Slider(id='m',\n",
" min=0,\n",
" max=2,\n",
" marks={y:x for x, y in d1_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Do you ever feel depressed?'),\n",
" dcc.Slider(id='q',\n",
" min=0,\n",
" max=2,\n",
" marks={y:x for x, y in g1802_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('How would you rate your happpiness?'),\n",
" dcc.Slider(id='l',\n",
" min=1,\n",
" max=10,\n",
" marks={y:x for x, y in c5_mapping.items()},\n",
" value=1,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" ], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Hr(),\n",
" html.Div('History', style={'font-weight': 'bold',\n",
" 'font-size': '24px',\n",
" 'color': '#ffc000'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Do you have a family member who uses drugs?'),\n",
" dcc.Slider(id='t',\n",
" min=0,\n",
" max=1,\n",
" marks={y:x for x, y in g73_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Were you physically abused in general?'),\n",
" dcc.Slider(id='u',\n",
" min=0,\n",
" max=1,\n",
" marks={y:x for x, y in g77_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Have you ever been suspended in school?'),\n",
" dcc.Slider(id='w',\n",
" min=0,\n",
" max=1,\n",
" marks={y:x for x, y in d23_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Div([\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Label('Do you have suicidal thoughts?'),\n",
" dcc.Slider(id='v',\n",
" min=0,\n",
" max=2,\n",
" marks={y:x for x, y in g83_mapping.items()},\n",
" value=0,\n",
" updatemode='mouseup'\n",
" )], style={'width': '75%', 'margin': 'auto'}),\n",
" ], style={'width': '75%', 'margin': 'auto'}),\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Br(),\n",
" # Check button\n",
" html.Div(\n",
" [html.Button('Calculate!', id='button')], \n",
" style={'text-align': 'center'}),\n",
" html.Br(),\n",
" # Prediction\n",
" html.Div(id='pred', style={'text-align': 'center', 'font-size': '36px',\n",
" 'font-weight': 'bold', 'color': '#ffc000'}),\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Div(html.Hr(), style={'margin': 'auto', 'width': '75%'}),\n",
" html.Br(),\n",
" html.Br(),\n",
" html.Div('Our Methodology', style={'text-align': 'center',\n",
" 'font-size': '36px',\n",
" 'font-weight': 'bold',\n",
" 'color': 'white'}),\n",
" html.Br(),\n",
" html.Div([\n",
" html.Img(src=app.get_asset_url('methodology.JPG'),\n",
" style={'max-width': '65%', 'max-height': '100%'})\n",
" ], style={'text-align': 'center'})\n",
" ], style={'font-family': 'Arial', 'color': 'white', \n",
" 'background-color': 'black', 'padding': '0px'})\n",
"\n",
"@app.callback(Output('pred', 'children'),\n",
" [Input('button', 'n_clicks')],\n",
" [State('a', 'value'), State('b', 'value'), State('c', 'value'), \n",
" State('d', 'value'), State('e', 'value'), State('f', 'value'),\n",
" State('g', 'value'), State('h', 'value'), State('i', 'value'),\n",
" State('j', 'value'), State('k', 'value'), State('l', 'value'),\n",
" State('m', 'value'), State('n', 'value'), State('o', 'value'),\n",
" State('p', 'value'), State('q', 'value'), State('r', 'value'),\n",
" State('s', 'value'), State('t', 'value'), State('u', 'value'),\n",
" State('v', 'value'), State('w', 'value')])\n",
"def display_prediction(n_clicks, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o,\n",
" p, q, r, s, t, u, v, w):\n",
" if n_clicks:\n",
" return 'You are {:.2f}% vulnerable to drugs!'.format(models1daw['Gradient Boosting Classifier'].best_estimator_.\\\n",
" predict_proba([[a, b, c, d, e, f, g, h, i, j, k, l, m, n, \n",
" o, p, q, r, s, t, u, v, w]])[0][1]*100)\n",
"\n",
"if __name__ == '__main__':\n",
" app.run_server(debug=False)\n",
" \n",
"show_app(app)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": false,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
},
"varInspector": {
"cols": {
"lenName": 16,
"lenType": 16,
"lenVar": 40
},
"kernels_config": {
"python": {
"delete_cmd_postfix": "",
"delete_cmd_prefix": "del ",
"library": "var_list.py",
"varRefreshCmd": "print(var_dic_list())"
},
"r": {
"delete_cmd_postfix": ") ",
"delete_cmd_prefix": "rm(",
"library": "var_list.r",
"varRefreshCmd": "cat(var_dic_list()) "
}
},
"types_to_exclude": [
"module",
"function",
"builtin_function_or_method",
"instance",
"_Feature"
],
"window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}
{
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"ExecuteTime": {
"end_time": "2019-12-19T10:15:24.861244Z",
"start_time": "2019-12-19T10:15:10.181098Z"