alan-turing-institute / CROP

CROP is a Research Observation Platform
MIT License
25 stars 4 forks source link

Adding temperature forecasting model #115

Open meljsingh opened 3 years ago

meljsingh commented 3 years ago

Aim is to add temperature forecasting model onto platform, visualise outputs, and provide relevant warnings.

Explanation of the model

Output table for 1 sensor location:

  Forecast hour h h+1 h+2 h+… h+24
Sensor 16B1 Mean temperature - static        
Sensor 16B1 Upper bound - static model        
Sensor 16B1 Lower bound - static model        
Sensor 16B1 Mean temperature - dynamic        
Sensor 16B1 Upper bound - dynamic model        
Sensor 16B1 Lower bound - dynamic model        

In addition, there are the following four outputs:

Further information:

Further analysis

The error from the previous day's forecast can provide further information

meljsingh commented 3 years ago

Workflow of forecasting model

in Python

  1. Download latest data in R:
  2. Clean latest data:
    • take hourly average
    • make sure temperature and energy data is aligned (clock change)
    • construct lights algorithm
    • identify date and time of forecast
    • create training dataset (1 year)
  3. Fit model:
    • BSTS dynamic model
    • seasonal ARIMA static model
  4. Predict temperatures
    • output mean forecast, upper and lower bounds for each model
    • output probability too hot/ too cold
  5. Save outputs in format readable by Python
meljsingh commented 3 years ago

To dos (in order of priority