General measurement method of an average sunlight power at a given location. The method is used to improve low-energy houses built by Dworek Polski.
Data source: ftp://ftp-cdc.dwd.de/pub/CDC/observations_germany/climate/hourly/solar
Source code: https://github.com/marycha/solar-data-analysis
Sample input and output data for Potsdam (Berlin) station is kept together with the source code.
run.R- invokes main source codesolar.R- main source codetest.R- tests codetests/*- sample inputs and outputs used by testsdatabase/*- input directory with zip files downloaded from ftp serveroutput/*- output directoryunzip/*- intermediate input directory (once filled with unzipped files, we can reuse it and skip unzip phase)
-
Install R: https://www.r-project.org/
-
Clone or download the code from GitHub repository to your working directory
. -
Save zip files from datasource to
./database(or use sample Potsdam data) -
Open R console and set working directory (it should contain
solar.R,run.Randtest.Rscripts)setwd("path/to/your/working/directory") -
Install required packages (first run only)
install.packages("reshape") install.packages("ggplot2") install.packages("lubridate") -
Run tests
source("test.R") -
Run the code
source("run.R") -
Your results will be in
./outputdirectory