Skip to content

Commit

Permalink
clear outputs notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
toravest committed May 22, 2025
1 parent 477a10f commit 2955fb9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 708 deletions.
171 changes: 8 additions & 163 deletions notebooks/notebook_current_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,9 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/hanne/Documents/anvendt prosjekt/anvendt_mappe/venv/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020\n",
" warnings.warn(\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Data fetch: ok\n"
]
}
],
"outputs": [],
"source": [
"import sys\n",
"import os\n",
Expand Down Expand Up @@ -73,17 +57,9 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Data has been written to /Users/hanne/Documents/anvendt prosjekt/anvendt_mappe/data/../data/output_current_data/data_ttggs.json\n"
]
}
],
"outputs": [],
"source": [
"# Gets the absolute path to the src folder\n",
"sys.path.append(os.path.abspath(\"../src\"))\n",
Expand All @@ -108,45 +84,9 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'coord': {'lon': 10.7461, 'lat': 59.9127},\n",
" 'weather': [{'id': 800,\n",
" 'main': 'Clear',\n",
" 'description': 'clear sky',\n",
" 'icon': '01d'}],\n",
" 'base': 'stations',\n",
" 'main': {'temp': 15.97,\n",
" 'feels_like': 14.48,\n",
" 'temp_min': 13.64,\n",
" 'temp_max': 16.09,\n",
" 'pressure': 1017,\n",
" 'humidity': 33,\n",
" 'sea_level': 1017,\n",
" 'grnd_level': 993},\n",
" 'visibility': 10000,\n",
" 'wind': {'speed': 2.68, 'deg': 200, 'gust': 4.47},\n",
" 'clouds': {'all': 5},\n",
" 'dt': 1746536672,\n",
" 'sys': {'type': 2,\n",
" 'id': 46775,\n",
" 'country': 'NO',\n",
" 'sunrise': 1746500507,\n",
" 'sunset': 1746559526},\n",
" 'timezone': 7200,\n",
" 'id': 3143244,\n",
" 'name': 'Oslo',\n",
" 'cod': 200}"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"import json\n",
"\n",
Expand Down Expand Up @@ -179,104 +119,9 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>name</th>\n",
" <th>main.temp</th>\n",
" <th>main.feels_like</th>\n",
" <th>main.pressure</th>\n",
" <th>main.humidity</th>\n",
" <th>main.sea_level</th>\n",
" <th>main.grnd_level</th>\n",
" <th>wind.speed</th>\n",
" <th>wind.gust</th>\n",
" <th>clouds.all</th>\n",
" <th>sys.country</th>\n",
" <th>sys.sunrise</th>\n",
" <th>sys.sunset</th>\n",
" </tr>\n",
" <tr>\n",
" <th>dt</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2025-05-06 13:04:32</th>\n",
" <td>Oslo</td>\n",
" <td>15.97</td>\n",
" <td>14.48</td>\n",
" <td>1017</td>\n",
" <td>33</td>\n",
" <td>1017</td>\n",
" <td>993</td>\n",
" <td>2.68</td>\n",
" <td>4.47</td>\n",
" <td>5</td>\n",
" <td>NO</td>\n",
" <td>2025-05-06 03:01:47</td>\n",
" <td>2025-05-06 19:25:26</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" name main.temp main.feels_like main.pressure \\\n",
"dt \n",
"2025-05-06 13:04:32 Oslo 15.97 14.48 1017 \n",
"\n",
" main.humidity main.sea_level main.grnd_level \\\n",
"dt \n",
"2025-05-06 13:04:32 33 1017 993 \n",
"\n",
" wind.speed wind.gust clouds.all sys.country \\\n",
"dt \n",
"2025-05-06 13:04:32 2.68 4.47 5 NO \n",
"\n",
" sys.sunrise sys.sunset \n",
"dt \n",
"2025-05-06 13:04:32 2025-05-06 03:01:47 2025-05-06 19:25:26 "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"import pandas as pd\n",
"\n",
Expand Down
Loading

0 comments on commit 2955fb9

Please sign in to comment.