|
@@ -205,5 +205,19 @@ install.packages(c("dplyr", "tidyr", "ggplot2", "forecast", "TSA", "reticulate",
|
205
|
205
|
|
206
|
206
|
### `clusterviz.R`
|
207
|
207
|
|
208
|
|
-This script visualises the patterns of each cluster in an aggregated file.
|
|
208
|
+This script visualises the patterns of each cluster in an aggregated file, saving plots in a directory. Unfortunately, when loading directly from a pickle (with the `--pkl` option) this requires the python module `pandas` to have been installed outside of a virtual environment, with `pip install --user pandas`. The script is called with `Rscript clusterviz.R [options]`.
|
209
|
209
|
|
|
210
|
+* `cluster_file`: Source csv or pickle for visualisation.
|
|
211
|
+* `-i IMG_PATH`: Path for directory to store plots; default: `../img/`.
|
|
212
|
+* `-p POSTFIX`: Postfix for image files, identifying this "batch" of clusters; default: `_plot`.
|
|
213
|
+* `--width WIDTH`: Width of plot output in cm
|
|
214
|
+* `--height HEIGHT`: Height of plot output in cm
|
|
215
|
+* `--pkl`: Load directly from a pickle instead of a csv file.
|
|
216
|
+
|
|
217
|
+Example:
|
|
218
|
+
|
|
219
|
+```bash
|
|
220
|
+Rscript clusterviz.R ../data/5k-ag.csv -p "_5k"
|
|
221
|
+```
|
|
222
|
+
|
|
223
|
+Create plots for a csv (created with `pickletocsv.py`) located at `../data/5k-ag.csv` and postfix them with `_5k` (as in `all_fre_5k.png`).
|