Skip to content

Commit

Permalink
add code to nb
Browse files Browse the repository at this point in the history
  • Loading branch information
jahnavi-maddhuri committed Dec 13, 2024
1 parent f62eb38 commit 8c4b9b6
Showing 1 changed file with 71 additions and 2 deletions.
73 changes: 71 additions & 2 deletions main_nb.ipynb
Original file line number Diff line number Diff line change
@@ -1,6 +1,75 @@
{
"cells": [],
"metadata": {},
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "073f6ad3-ad8a-490c-a261-89645736ce34",
"metadata": {},
"outputs": [],
"source": [
"# Clone Notebook to access mylib\n",
"!git clone https://github.com/nogibjj/JahnaviM-CloudHostedNotebook.git\n",
"%cd JahnaviM-CloudHostedNotebook"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3423c945-3b92-4feb-9ef0-15b769c2b16b",
"metadata": {},
"outputs": [],
"source": [
"# import libraries/methods\n",
"from IPython.display import display\n",
"from mylib.lib import read_df, summarize_df, hist_time_occ"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8f2fc907-ca25-48a9-8538-631032959d5c",
"metadata": {},
"outputs": [],
"source": [
"# read data\n",
"df = read_df(\"Crime_Data_from_2020_to_Present.csv.zip\")\n",
"print('Crime Dataset Loaded from zipped csv file.')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8fccdfd0-ab75-42b9-a60a-a6a5ca950321",
"metadata": {},
"outputs": [],
"source": [
"# get summary stats\n",
"print('Summary Statistics:')\n",
"display(summarize_df(df))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "aef7b7dc-9b74-4d49-89f8-efd63c2f418a",
"metadata": {},
"outputs": [],
"source": [
"# show hist plot\n",
"print('Histogram Plot:')\n",
"hist_time_occ(df)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "",
"name": ""
},
"language_info": {
"name": ""
}
},
"nbformat": 4,
"nbformat_minor": 5
}

0 comments on commit 8c4b9b6

Please sign in to comment.