From edd10f63103da56e971d44b184b5ff0244fb062a Mon Sep 17 00:00:00 2001 From: Peter Dudfield <34686298+peterdudfield@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:00:30 +0000 Subject: [PATCH] Issue/adjuster smooth (#126) * smooth the adjuster results * move location of smoothing * change to 30 mins interval, helps with missing data * adjust values on average per hour * round in sql query --- india_forecast_app/adjuster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/india_forecast_app/adjuster.py b/india_forecast_app/adjuster.py index 398584e..bb18af9 100644 --- a/india_forecast_app/adjuster.py +++ b/india_forecast_app/adjuster.py @@ -63,7 +63,7 @@ def get_me_values( query = session.query( func.avg(ForecastValueSQL.forecast_power_kw - GenerationSQL.generation_power_kw), # create hour column - (cast(ForecastValueSQL.horizon_minutes, INT) / 60).label("horizon_hour"), + (cast(ForecastValueSQL.horizon_minutes / 60, INT)).label("horizon_hour"), ) # join