{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "c:\\Users\\elikl\\Documents\\Uni\\yr3\\ML for industry\\utrecht-pollution-prediction\\.venv\\Lib\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n" ] } ], "source": [ "from src.predict import get_data_and_predictions\n", "from src.data_api_calls import get_combined_data\n", "from src.past_data_api_calls import get_past_combined_data" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Data is already up to date.\n", "Data is already up to date.\n", "Number of rows with missing values dropped: 7\n", "Data is already up to date.\n", "Number of rows with missing values dropped: 7\n" ] } ], "source": [ "week_data, predictions_O3, predictions_NO2 = get_data_and_predictions()" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
dateNO2O3wind_speedmean_tempglobal_radiationpercipitationpressureminimum_visibilityhumidityweekday
02024-10-1722.80460522.769160511694361010037186Thursday
12024-10-1823.26850023.307332211554239101404597Friday
22024-10-1923.91006423.1717144114743161014122889Saturday
32024-10-2022.57323823.53784581155051016041583Sunday
42024-10-2121.14570024.0206965814427431020622092Monday
52024-10-2221.77658023.3358865311457491026922692Tuesday
62024-10-2321.97479422.21468936112120103286597Wednesday
72024-10-2425.51256820.913710561046201024713094Thursday
\n", "
" ], "text/plain": [ " date NO2 O3 wind_speed mean_temp global_radiation \\\n", "0 2024-10-17 22.804605 22.769160 51 169 43 \n", "1 2024-10-18 23.268500 23.307332 21 155 42 \n", "2 2024-10-19 23.910064 23.171714 41 147 43 \n", "3 2024-10-20 22.573238 23.537845 81 155 0 \n", "4 2024-10-21 21.145700 24.020696 58 144 27 \n", "5 2024-10-22 21.776580 23.335886 53 114 57 \n", "6 2024-10-23 21.974794 22.214689 36 112 12 \n", "7 2024-10-24 25.512568 20.913710 56 104 62 \n", "\n", " percipitation pressure minimum_visibility humidity weekday \n", "0 6 10100 371 86 Thursday \n", "1 39 10140 45 97 Friday \n", "2 16 10141 228 89 Saturday \n", "3 5 10160 415 83 Sunday \n", "4 43 10206 220 92 Monday \n", "5 49 10269 226 92 Tuesday \n", "6 0 10328 65 97 Wednesday \n", "7 0 10247 130 94 Thursday " ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "week_data" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "array([[10.33808859, 16.00098432, 19.64377496]])" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "predictions_O3" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "array([[25.68519992, 25.76030745, 31.21057679]])" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "predictions_NO2" ] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.8" } }, "nbformat": 4, "nbformat_minor": 2 }