Skip to content

Commit

Permalink
Document "DownloadWeatherData" feature
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrech committed Apr 13, 2023
1 parent 66baae4 commit a9a34f8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
3 changes: 3 additions & 0 deletions source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
22 changes: 20 additions & 2 deletions source/services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

0 comments on commit a9a34f8

Please sign in to comment.