Script for extracting, merging and comparing ISU weather data with IRRI's
- R (version 3.5.0 was used for this project)
- R packages (please install the following using
install.packages()
if they are not yet installed):readxl
stringr
-
weatherfile.R
A utility object for managing IRRI's individual weather data files -
isuirriweather.R
A utility object for managing ISU's individual weather data files -
main.R
Main script for processing ISU's and IRRI's weather data files -
main.bat
Windows batch script for runningmain.R
without opening in RStudio. (see Usage #4)
- Clone this repository into your local PC.
- ISU's and IRRI's weather files are confidential— please contact us for further details if you need to use it. Put the files in their respective directories in
/data/irri/*
or/data/isu/*
and read the README's for each data set regarding cleaning and preparing data. - In RStudio,
- Set the working directory to the cloned repository, i.e.:
setwd(setwd("D:/LAB/R/ciat-isuirriweather")
- Run
source("main.R")
. - Alternatively, you can do #4 instead.
- Set the working directory to the cloned repository, i.e.:
- Open main.bat in a text editor and set
pathtorexe
to your R's\bin
installation directory. For example,
set pathtorexe="C:\Program Files\R\R-3.5.0\bin\"
- Click main.bat to run
- Wait for (5) csv files to be generated in the
/extracted
directory:- export_irri_014.csv
- export_irri_015.csv
- export_irri_016.csv
- export_isu_2014.csv
- export_isu_2015.csv
- Trello project board (private)
Date Created: 20180911
Date Modified: 20180913