From 3d117c49ebe0ae39f568301bfebf2724b04bbcf9 Mon Sep 17 00:00:00 2001 From: "martin.raetz@rwth-aachen.de" Date: Fri, 13 Dec 2024 12:00:58 +0000 Subject: [PATCH] chore(examples): Automatic commit of example files in Markdown and Jupyter Notebook format. --- ...DWD_historical_to_all_output_formats.ipynb | 250 +++++++++--------- 1 file changed, 125 insertions(+), 125 deletions(-) diff --git a/docs/jupyter_notebooks/e1_pull_DWD_historical_to_all_output_formats.ipynb b/docs/jupyter_notebooks/e1_pull_DWD_historical_to_all_output_formats.ipynb index b2707ea..96f5148 100644 --- a/docs/jupyter_notebooks/e1_pull_DWD_historical_to_all_output_formats.ipynb +++ b/docs/jupyter_notebooks/e1_pull_DWD_historical_to_all_output_formats.ipynb @@ -1,126 +1,126 @@ { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": "# AixWeather Tutorial\n" - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": "Enable logging, this is just get more feedback through the terminal\n" - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": "import logging\nlogging.basicConfig(level=\"DEBUG\")\n" - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": "Choose the project class according to the desired weather data origin.\nCheck the project classes file or the API documentation to see which classes are available.\n" - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": "from aixweather.project_class import ProjectClassDWDHistorical\n" - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": "Step 0: Initiate the project class which contains or creates all variables and functions.\nFor this, we use the datetime module to specify dates.\n" - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": "import datetime as dt\nDWD_pull_project = ProjectClassDWDHistorical(\n start=dt.datetime(2022, 1, 1),\n end=dt.datetime(2023, 1, 1),\n station=15000,\n # specify whether nan-values should be filled when exporting\n fillna=True,\n # define results path if desired\n abs_result_folder_path=None,\n)\n" - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": "Step 1: Import historical weather from the DWD open access database\n" - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": "DWD_pull_project.import_data()\nprint(\n f\"\\nHow the imported data looks like:\\n{DWD_pull_project.imported_data.head()}\\n\"\n)\n" - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": "Step 2: Convert this imported data to the core format\n" - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": "DWD_pull_project.data_2_core_data()\nprint(f\"\\nHow the core data looks like:\\n{DWD_pull_project.core_data.head()}\\n\")\n" - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": "you may also use data quality check utils, like:\n" - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": "from aixweather.data_quality_checks import plot_heatmap_missing_values\n" - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": "plot data quality\n" - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": "plot = plot_heatmap_missing_values(DWD_pull_project.core_data)\nplot.show()\n" - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": "Step 3: Convert this core data to an output data format of your choice\n" - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": "DWD_pull_project.core_2_csv()\nDWD_pull_project.core_2_json()\nDWD_pull_project.core_2_pickle()\nDWD_pull_project.core_2_mos()\nDWD_pull_project.core_2_epw()\n" - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "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.6.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": "# AixWeather Tutorial\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "Enable logging, this is just get more feedback through the terminal\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": "import logging\nlogging.basicConfig(level=\"DEBUG\")\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "Choose the project class according to the desired weather data origin.\nCheck the project classes file or the API documentation to see which classes are available.\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": "from aixweather.project_class import ProjectClassDWDHistorical\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "Step 0: Initiate the project class which contains or creates all variables and functions.\nFor this, we use the datetime module to specify dates.\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": "import datetime as dt\nDWD_pull_project = ProjectClassDWDHistorical(\n start=dt.datetime(2022, 1, 1),\n end=dt.datetime(2023, 1, 1),\n station=15000,\n # specify whether nan-values should be filled when exporting\n fillna=True,\n # define results path if desired\n abs_result_folder_path=None,\n)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "Step 1: Import historical weather from the DWD open access database\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": "DWD_pull_project.import_data()\nprint(\n f\"\\nHow the imported data looks like:\\n{DWD_pull_project.imported_data.head()}\\n\"\n)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "Step 2: Convert this imported data to the core format\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": "DWD_pull_project.data_2_core_data()\nprint(f\"\\nHow the core data looks like:\\n{DWD_pull_project.core_data.head()}\\n\")\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "you may also use data quality check utils, like:\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": "from aixweather.data_quality_checks import plot_heatmap_missing_values\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "plot data quality\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": "plot = plot_heatmap_missing_values(DWD_pull_project.core_data)\nplot.show()\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "Step 3: Convert this core data to an output data format of your choice\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": "DWD_pull_project.core_2_csv()\nDWD_pull_project.core_2_json()\nDWD_pull_project.core_2_pickle()\nDWD_pull_project.core_2_mos()\nDWD_pull_project.core_2_epw()\n" + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "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.6.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} \ No newline at end of file