From a9a34f8873c90dcedd2cb905df8dc47e3d690d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lafr=C3=A9choux?= Date: Thu, 13 Apr 2023 11:35:05 +0200 Subject: [PATCH] Document "DownloadWeatherData" feature --- source/installation.rst | 3 +++ source/services.rst | 22 ++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/source/installation.rst b/source/installation.rst index 2f63449..5477d39 100644 --- a/source/installation.rst +++ b/source/installation.rst @@ -139,6 +139,9 @@ This file must be a valid Python file. At least a database URI must be provided. SQLALCHEMY_DATABASE_URI = "postgresql+psycopg2://user:password@localhost:5432/bemserver" + # If using weather download feature + WEATHER_DATA_CLIENT_API_KEY = "apikey" + Set an environment variable to point to that file:: $ export BEMSERVER_CORE_SETTINGS_FILE="/path/to/bemserver-core-settings.py" diff --git a/source/services.rst b/source/services.rst index aa340e8..8f75699 100644 --- a/source/services.rst +++ b/source/services.rst @@ -57,7 +57,7 @@ Parameters: - ``period_multiplier``: integer multiplier, must be 1 for periods of day or more - ``timezone``: IANA timezone (defaults to UTC) - ``min_completeness_ratio``: minimum present/expected data to pass check - (default to 0.9) + (defaults to 0.9) This service checks the timeseries data for missing data. Missing data is detected if the expected data interval is known and the amount of data on a @@ -77,9 +77,27 @@ Parameters: - ``period_multiplier``: integer multiplier, must be 1 for periods of day or more - ``timezone``: IANA timezone (defaults to UTC) - ``min_correctness_ratio``: minimum correct/total data to pass check - (default to 0.9) + (defaults to 0.9) This service checks the timeseries data for outliers. Outliers are detected if the minimum and/or maximum bounds are known and the amount of out of bounds data on a given period is such that the correct/total ratio is lower than ``min_correctness_ratio``. + +Download Weather Data Service +============================= + +Task name: "DownloadWeatherDataScheduledTask" + +Parameters; + +- ``period``: one of ``"second"``, ``"minute"``, ``"hour"``, ``"day"``, + ``"week"``, ``"month"``, ``"year"`` +- ``period_multiplier``: integer multiplier, must be 1 for periods of day or more +- ``periods_before``: integer, number of period x multiplier +- ``periods_after``: integer, number of period x multiplier +- ``timezone``: IANA timezone (defaults to UTC) + +This service downloads the weather data for all sites for which it is activated +and weather timeseries have been defined. The data is downloaded for a time +range defined by a number of periods before and after execution time.