| Type: | Package | 
| Title: | Collect, Assemble and Model Air Pollution, Weather and Health Data | 
| Version: | 0.1 | 
| Date: | 2016-06-09 | 
| Author: | Claudia Vitolo [aut, cre], Allan Tucker [aut], Andrew Russell [aut] | 
| Maintainer: | Claudia Vitolo <cvitolodev@gmail.com> | 
| URL: | https://github.com/kehraProject/r_kehra | 
| BugReports: | https://github.com/kehraProject/r_kehra/issues | 
| Description: | Collection of utility functions used in the KEHRA project (see http://www.brunel.ac.uk/ife/britishcouncil). It refers to the multidimensional analysis of air pollution, weather and health data. | 
| Depends: | R (≥ 2.14.0) | 
| Imports: | Hmisc, raster, reshape2, stringr, sp, xts, zoo | 
| License: | GPL-3 | 
| Repository: | CRAN | 
| RoxygenNote: | 5.0.1 | 
| NeedsCompilation: | no | 
| Packaged: | 2016-06-10 11:07:52 UTC; claudia | 
| Date/Publication: | 2016-06-10 13:48:43 | 
Collect, Assemble and Model Air Pollution, Weather and Health Data
Description
Collection of utility functions used in the KEHRA project (see http://www.brunel.ac.uk/ife/britishcouncil). It refers to the multidimensional analysis of air pollution, weather and health data.
Details
The DESCRIPTION file:
| Package: | kehra | 
| Type: | Package | 
| Title: | Collect, Assemble and Model Air Pollution, Weather and Health Data | 
| Version: | 0.1 | 
| Date: | 2016-06-09 | 
| Author: | Claudia Vitolo [aut, cre], Allan Tucker [aut], Andrew Russell [aut] | 
| Maintainer: | Claudia Vitolo <cvitolodev@gmail.com> | 
| URL: | https://github.com/kehraProject/r_kehra | 
| BugReports: | https://github.com/kehraProject/r_kehra/issues | 
| Description: | Collection of utility functions used in the KEHRA project (see http://www.brunel.ac.uk/ife/britishcouncil). It refers to the multidimensional analysis of air pollution, weather and health data. | 
| Depends: | R (>= 2.14.0) | 
| Imports: | Hmisc, raster, reshape2, stringr, sp, xts, zoo | 
| License: | GPL-3 | 
| Repository: | CRAN | 
| RoxygenNote: | 5.0.1 | 
Index of help topics:
fillMissingValues       Fill missing values
getSeason               Get season a date belongs to
kehra-package           Collect, Assemble and Model Air Pollution,
                        Weather and Health Data
pointInspection         Get data from ECMWF ERA_Interim
windDirection           Wind Direction
windSpeed               Wind Speed
Collection of utility functions used in the KEHRA project
Author(s)
Claudia Vitolo [aut, cre], Allan Tucker [aut], Andrew Russell [aut] Maintainer: Claudia Vitolo <cvitolodev@gmail.com>
Fill missing values
Description
Fill missing values
Usage
fillMissingValues(ids, df, maxgap = 12, parallel = FALSE,
  formatDT = "%Y-%m-%d %H:%M")
Arguments
| ids | site identification codes | 
| df | dataframe containing the timeseries in columns separated by ID (header must follow this convention: column 1 = "datetime", column 2 = "SiteID", column 3 = "variable name"). df can be the result of GetDataFromECMWF(). | 
| maxgap | maximum gap to interpolate (e.g. 6 hours) | 
| parallel | Bolean, if TRUE parallel jobs are allowed | 
| formatDT | format of the datetime variable | 
Value
updated df with infilled values
Examples
# fillMissingValues(clima)
Get season a date belongs to
Description
Get season a date belongs to. This function was taken from the following stackoverflow post: http://stackoverflow.com/questions/9500114/find-which-season-a-particular-date-belongs-to.
Usage
getSeason(DATES)
Arguments
| DATES | a date. | 
Value
returns the name of the season (e.g. "Fall")
Examples
# my.dates <- as.Date("2011-12-01", format = "%Y-%m-%d") + 0:60
# getSeason(my.dates)
Get data from ECMWF ERA_Interim
Description
Get data from ECMWF ERA_Interim
Usage
pointInspection(years, points, var, prefix = "", path = "~",
  parallel = FALSE)
Arguments
| years | years to retrieve data for | 
| points | are lat/lon coordinates of points (e.g. stations) | 
| var | variable to retrieve | 
| prefix | string starting netcdf file name | 
| path | folder path where netcdf files are stored | 
| parallel | Bolean, if TRUE parallel jobs are allowed | 
Details
Possible variables names are: "t2m" (2m temperature, in K), "u10" (10 metres wind U component, in m/s), "v10" (10 metres wind V component, in m/s), "tp" (total precipitation, in m), "blh" (boundary layer height, in m), "ssr" (surface net solar radiation, in W/m2s).
Value
time series variable
Examples
# pointInspection(years = 1981:2014, points, var = "t2m")
Wind Direction
Description
Calculate wind direction in degrees from u & v components
Usage
windDirection(u, v)
Arguments
| u | first component of wind speed | 
| v | second component of wind speed | 
Value
direction in degrees from u & v components
Examples
# windDirection(u, v)
Wind Speed
Description
Calculate wind speed in m/s from u & v components
Usage
windSpeed(u, v)
Arguments
| u | first component of wind speed | 
| v | second component of wind speed | 
Value
Speed in m/s
Examples
# windSpeed(u, v)