-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.Rmd
67 lines (47 loc) · 5.18 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
title: "Energy Data Analysis with R"
author: "Reto Marek"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
output: bookdown::gitbook
documentclass: book
#bibliography: [book.bib, packages.bib]
biblio-style: apalike
link-citations: yes
github-repo: hslu-ige-laes/edar
description: "Introduction into energy data analysis and visualization with R."
papersize: a4paper
---
# Preface {#preface}
```{r fig.align='center', echo=FALSE, include=identical(knitr:::pandoc_to(), 'html')}
knitr::include_graphics('images/cover.jpg', dpi = NA)
```
This short book gives you an overview of the statistical software R and its ability to analyze and visualize time series in the context of building energy and comfort.
The aim of this book is to provide additional specific recipes for energy and comfort related tasks and to make your entry into R smooth and easy.
It is aimed at R beginners as well as exerienced R users and is inspired by the [R Graphics Cookbook](https://r-graphics.org/){target="_blank"} and [Engineering Data Analysis in R](https://smogdr.github.io/edar_coursebook/){target="_blank"}.
## Content
The book is structured in the following main parts:
1. R Basics
1. Data Visualizations
The part "R Basics" covers general data analysis tasks like data loading, wrangling and aggregation. Mostly this part deals with number juggling and table viewing.
> "Numerical quantities focus on expected values, graphical summaries on unexpected values." - John W. Tukey
Such so called "graphical summaries" are covered in the part "Data Visualizations" which brings the calculated numbers to life. Visualizations are good to identify patterns, changes over time, unusual readings, and relationships between variables. The presented code makes the creation of common and useful plots for energy and comfort data fast and easy.
The recipes in this part will show you how to complete certain specific tasks. Examples are shown so that you can understand the basic principle and reproduce the analysis or visualization with your own data. Simply copy the code into your R-script, run it and if you like the visualization replace the sample data with your own.
## Why R and RStudio?
In the [EVISU](https://github.com/hslu-ige-laes/evisu){target="_blank"}study of the Lucerne University of Applied Sciences and Arts, experts from the field were asked how and where they perform energy analyses and create visualizations. The result was that many people today either need Excel or use a building monitoring software to execute analysis and as well for making visualizations.
Excel users are pushing the program to its limits with the ever-increasing data sets. Also the interactive ability of the graphics there is limited. Switching to an analysis environment like "R" seems unavoidable for more complex tasks, but apparently causes problems for many people. In the market there are numerous books which make the start in "R" easier. There are also packages for various fields which support the discipline-specific analysis and visualization tasks.
However, experts from the energy and building services engineering industry lack a corresponding work and corresponding packages. The present book is intended to close the first gap, the second gets closed by the package [redutils - Energy Data Utilities for R](https://github.com/hslu-ige-laes/redutils){target="_blank"}.
You might also wonder why R and not Python. Well, this is a question of faith and the author seems to prefer R.
## Further Reading
A really good source is [R for Data Science](http://r4ds.had.co.nz){target="_blank"} by Garrett Grolemund and Hadley Wickham. The entire book is freely available online through the same format of this book.
There are a number of other recommendable and free online books available, including:
- [R Graphics Cookbook](https://r-graphics.org/){target="_blank"} by Winston Chang
- [Introduction to Data Science - Data Analysis and Prediction Algorithms with R](https://rafalab.github.io/dsbook/){target="_blank"} by Rafael A. Irizarry
- [Hands-On Programming with R](https://rstudio-education.github.io/hopr/){target="_blank"} by Garrett Grolemund
- [Engineering Data Analysis in R](https://smogdr.github.io/edar_coursebook/){target="_blank"} by John Volckens and Kathleen E. Wendt
- [Forecasting: Principles and Practice](https://otexts.com/fpp2/){target="_blank"} by Rob J Hyndman and George Athanasopoulos
\newpage
## Acknowledgements
The author would like to express his sincere thank to the Swiss Federal Office of Energy, as the launch of this book was part of a project of the research program ["Buildings and Cities 2018"](https://www.bfe.admin.ch/bfe/de/home/forschung-und-cleantech/forschungsprogramme/gebaeude-und-staedte.html){target="_blank"}.
This book was developed using Yihui Xie's [bookdown](https://bookdown.org){target="_blank"} framework. The book is built using code that combines R code, data, and text to create a book for which R code and examples can be re-executed every time the book is re-built.
The online book is hosted using GitHub's free [GitHub Pages](https://pages.github.com){target="_blank"}. All material for this book is available and can be explored at the book's [GitHub repository](https://github.com/hslu-ige-laes/edar){target="_blank"}.