|
@@ -222,3 +222,23 @@ Rscript R/clusterviz.R data/test1kbagg.csv -p "_1kb" --img img/
|
222
|
222
|
```
|
223
|
223
|
|
224
|
224
|
Create csv for the pickle created by `clusAssign.py`, then create visualisation plots for all clusters and postfix them with `_1kb` (as in `all_fre_1kb.png`).
|
|
225
|
+
|
|
226
|
+### `fftest.R`
|
|
227
|
+
|
|
228
|
+This is a now-redundant script testing fitting repeating patterns with Fourier transforms.
|
|
229
|
+
|
|
230
|
+### `weathmod.R`
|
|
231
|
+
|
|
232
|
+This script takes the downloaded weather data, (hard-coded path: `../data/2016-18-weather.pkl`) and calculates running last-24-hour minimum and maximum temperatures. It then fits harmonic regressions using the first and second harmonic to de-trend the yearly pattern of each series, saving the resulting dataset at `../data/weatherharm.csv` and stores the models in `../models/weatherMinharmonic.rds` and `../models/weatherMaxharmonic.rds`. These paths can be changed in the source, but there are no command line options.
|
|
233
|
+
|
|
234
|
+Commented out in the source are a number of potentially informative plots showing this process. For example:
|
|
235
|
+
|
|
236
|
+![Detrended maximum daily temperature](img/tempdetrend-max.png)
|
|
237
|
+
|
|
238
|
+Black is observed values; blue is harmonic trend; green is residuals/de-trended data.
|
|
239
|
+
|
|
240
|
+The justification for this is that we want to include the deviation from typical value for that time of year in our model, not the value itself.
|
|
241
|
+
|
|
242
|
+### `combmodels.R`
|
|
243
|
+
|
|
244
|
+This script takes the
|