A repo supporting analysis of NZ GREEN Grid electricity demand data for EECA.
Best viewed at https://cfsotago.github.io/GREENGridEECA/
This repo is structured as an R package. This means you (should) be able to install it using:
devtools::install_github("CfSOtago/GREENGridEECA")
If you try to do so and it fails, please check you have all the R packages that it depends on. This includes the GREENGridData package (to save wheel re-invention).
Note that to run the code you will need to register with the UK Data Service, agree to the re-use conditions and download the data.
setup()
at the start of a .R or .Rmd script as it sources ./repoParams.R
which sets a range of parameters, including data file paths. setup()
, set other parameters and load or pre-process data. Then call render()
to generate your output from a .Rmd file that uses the pre-loaded data. This means you only need to re-run the report not the whole data loading process each time you change the .Rmd. You will find various examples of this approach in the reports code. If you are feeling adventerous we recommend using drake to further streamline your analysis.GREENGridEEECA
package functions should be called using the GREENGridEEECA::function()
form so future users can identify when a function from this package is being used. Code for these functions is in /R.lubridate::date()
.functionName()
. They should also be listed at the top of the file so they are easy to find!Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.