Skip to content

Commit

Permalink
clean up notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
Hussein-Mahfouz committed Feb 15, 2024
1 parent 520176f commit 1785547
Showing 1 changed file with 2 additions and 135 deletions.
137 changes: 2 additions & 135 deletions notebooks/synthpop.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -138,21 +138,9 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": null,
"metadata": {},
"outputs": [
{
"ename": "",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[1;31mThe Kernel crashed while executing code in the current cell or a previous cell. \n",
"\u001b[1;31mPlease review the code in the cell(s) to identify a possible cause of the failure. \n",
"\u001b[1;31mClick <a href='https://aka.ms/vscodeJupyterKernelCrash'>here</a> for more info. \n",
"\u001b[1;31mView Jupyter <a href='command:jupyter.viewOutput'>log</a> for further details."
]
}
],
"outputs": [],
"source": [
"\n",
"# Subset of (non-time-use) features to include and unnest\n",
Expand Down Expand Up @@ -200,127 +188,6 @@
"# save the output\n",
"spc_people_tu.write_parquet('../data/spc_output/' + region + '_people_tu.parquet')"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['id',\n",
" 'household',\n",
" 'bmi',\n",
" 'has_cardiovascular_disease',\n",
" 'has_diabetes',\n",
" 'has_high_blood_pressure',\n",
" 'self_assessed_health',\n",
" 'life_satisfaction',\n",
" 'age_years',\n",
" 'sex',\n",
" 'nssec8',\n",
" 'pwkstat',\n",
" 'salary_yearly',\n",
" 'weekday_diaries',\n",
" 'uid',\n",
" 'weekday',\n",
" 'day_type',\n",
" 'month',\n",
" 'pworkhome',\n",
" 'phomeother',\n",
" 'pwork',\n",
" 'pschool',\n",
" 'pshop',\n",
" 'pservices',\n",
" 'pleisure',\n",
" 'pescort',\n",
" 'ptransport',\n",
" 'phome_total',\n",
" 'pnothome_total',\n",
" 'punknown_total',\n",
" 'pmwalk',\n",
" 'pmcycle',\n",
" 'pmprivate',\n",
" 'pmpublic',\n",
" 'pmunknown',\n",
" 'age35g']"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spc_people_tu.columns\n"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><style>\n",
".dataframe > thead > tr,\n",
".dataframe > tbody > tr {\n",
" text-align: right;\n",
" white-space: pre-wrap;\n",
"}\n",
"</style>\n",
"<small>shape: (2_339_931,)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>health</th></tr><tr><td>struct[7]</td></tr></thead><tbody><tr><td>{24.879356,false,false,false,null,3,2}</td></tr><tr><td>{27.491207,false,false,true,null,3,null}</td></tr><tr><td>{17.310829,false,true,true,null,2,4}</td></tr><tr><td>{20.852091,false,false,false,null,2,1}</td></tr><tr><td>{20.032526,false,false,false,1,2,3}</td></tr><tr><td>{29.106817,false,false,true,null,1,3}</td></tr><tr><td>{25.621599,false,false,false,3,3,3}</td></tr><tr><td>{33.893459,true,false,true,3,1,3}</td></tr><tr><td>{null,false,false,false,null,1,null}</td></tr><tr><td>{24.492905,false,false,false,null,4,2}</td></tr><tr><td>{31.561234,true,false,true,4,2,4}</td></tr><tr><td>{28.171663,false,true,true,null,3,3}</td></tr><tr><td>&hellip;</td></tr><tr><td>{22.046501,false,false,false,2,1,3}</td></tr><tr><td>{14.627893,false,false,false,1,1,1}</td></tr><tr><td>{25.986469,false,false,false,0,1,null}</td></tr><tr><td>{23.44569,false,false,false,1,3,1}</td></tr><tr><td>{26.506229,false,false,true,null,3,3}</td></tr><tr><td>{25.481789,false,false,false,null,3,2}</td></tr><tr><td>{14.997225,false,false,false,2,3,2}</td></tr><tr><td>{22.199043,false,false,false,0,2,2}</td></tr><tr><td>{23.534786,false,false,false,null,3,2}</td></tr><tr><td>{18.523956,true,false,true,7,4,4}</td></tr><tr><td>{28.988529,false,false,false,null,1,3}</td></tr><tr><td>{18.38345,false,false,false,1,1,3}</td></tr></tbody></table></div>"
],
"text/plain": [
"shape: (2_339_931,)\n",
"Series: 'health' [struct[7]]\n",
"[\n",
"\t{24.879356,false,false,false,null,3,2}\n",
"\t{27.491207,false,false,true,null,3,null}\n",
"\t{17.310829,false,true,true,null,2,4}\n",
"\t{20.852091,false,false,false,null,2,1}\n",
"\t{20.032526,false,false,false,1,2,3}\n",
"\t{29.106817,false,false,true,null,1,3}\n",
"\t{25.621599,false,false,false,3,3,3}\n",
"\t{33.893459,true,false,true,3,1,3}\n",
"\t{null,false,false,false,null,1,null}\n",
"\t{24.492905,false,false,false,null,4,2}\n",
"\t{31.561234,true,false,true,4,2,4}\n",
"\t{28.171663,false,true,true,null,3,3}\n",
"\t\n",
"\t{27.222017,false,false,false,null,2,4}\n",
"\t{22.046501,false,false,false,2,1,3}\n",
"\t{14.627893,false,false,false,1,1,1}\n",
"\t{25.986469,false,false,false,0,1,null}\n",
"\t{23.44569,false,false,false,1,3,1}\n",
"\t{26.506229,false,false,true,null,3,3}\n",
"\t{25.481789,false,false,false,null,3,2}\n",
"\t{14.997225,false,false,false,2,3,2}\n",
"\t{22.199043,false,false,false,0,2,2}\n",
"\t{23.534786,false,false,false,null,3,2}\n",
"\t{18.523956,true,false,true,7,4,4}\n",
"\t{28.988529,false,false,false,null,1,3}\n",
"\t{18.38345,false,false,false,1,1,3}\n",
"]"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spc_people_hh['health']"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 1785547

Please sign in to comment.