Title: | Functions to Convert Between Weather Metrics |
---|---|
Description: | Functions to convert between weather metrics, including conversions for metrics of temperature, air moisture, wind speed, and precipitation. This package also includes functions to calculate the heat index from air temperature and air moisture. |
Authors: | Brooke Anderson [aut, cre], Roger Peng [aut], Joshua Ferreri [aut], Doug Friedman [ctb] |
Maintainer: | Brooke Anderson <[email protected]> |
License: | GPL-2 |
Version: | 1.2.2.9000 |
Built: | 2024-11-01 11:15:47 UTC |
Source: | https://github.com/geanders/weathermetrics |
Daily values of mean temperature (Kelvin) and mean dew point temperature (Kelvin) for the week of December 19, 2010, in Los Angeles, CA.
angeles
angeles
A data frame 7 rows and 3 variables:
Date of weather observation
Daily mean temperature in Kelvin
Daily mean dewpoint temperature in Kelvin
A dataset containing daily values of mean temperature (Fahrenheit) and mean wind speed (in miles per hour, meters per second, feet per seconds, and kilometers per hour) for the week of January 10, 2015, in Beijing, China.
beijing
beijing
A data frame with 7 rows and 3 variables:
Date of weather observation
Daily mean temperature in Fahrenheit
Daily mean wind speed in miles per hour
Daily mean wind speed in meters per second
Daily mean wind speed in feet per second
Daily mean wind speed in kilometers per hour
Daily values of precipitation (inches) for the week of June 28, 2015, in Breckenridge, CO.
breck
breck
A data frame 7 rows and 2 variables:
Date of weather observation
Daily precipitation in inches
celsius.to.fahrenheit
creates a numeric vector of temperatures in
Fahrenheit from a numeric vector of temperatures in Celsius.
celsius.to.fahrenheit(T.celsius, round = 2)
celsius.to.fahrenheit(T.celsius, round = 2)
T.celsius |
Numeric vector of temperatures in Celsius. |
round |
An integer indicating the number of decimal places to round the converted value. |
A numeric vector of temperature values in Fahrenheit.
Equations are from the source code for the US National Weather Service's online heat index calculator.
Brooke Anderson [email protected], Roger Peng [email protected]
# Convert from Celsius to Fahrenheit. data(lyon) lyon$TemperatureF <- celsius.to.fahrenheit(lyon$TemperatureC) lyon
# Convert from Celsius to Fahrenheit. data(lyon) lyon$TemperatureF <- celsius.to.fahrenheit(lyon$TemperatureC) lyon
celsius.to.kelvin
creates a numeric vector of temperatures in
Kelvin from a numeric vector of temperatures in Celsius.
celsius.to.kelvin(T.celsius, round = 2)
celsius.to.kelvin(T.celsius, round = 2)
T.celsius |
Numeric vector of temperatures in Celsius. |
round |
An integer indicating the number of decimal places to round the converted value. |
A numeric vector of temperature values in Kelvin.
Equations are from the source code for the National Oceanic and Atmospheric Association's online temperature converter.
Joshua Ferreri [email protected], Brooke Anderson [email protected]
# Convert from Celsius to Kelvin. data(lyon) lyon$TemperatureK <- celsius.to.kelvin(lyon$TemperatureC) lyon
# Convert from Celsius to Kelvin. data(lyon) lyon$TemperatureK <- celsius.to.kelvin(lyon$TemperatureC) lyon
This function allows you to convert among the following precipitation metrics: inches, millimeters, and centimeters.
convert_precip(precip, old_metric, new_metric, round = 2)
convert_precip(precip, old_metric, new_metric, round = 2)
precip |
A numerical vector of precipitation to be converted. |
old_metric |
The metric from which you want to convert. Possible options are:
|
new_metric |
The metric to which you want to convert. The same options
are possible as for |
round |
An integer indicating the number of decimal places to round the converted value. |
A numeric vector with precipitation converted to the metric specified
by the argument new_metric
.
Joshua Ferreri [email protected], Brooke Anderson [email protected]
data(breck) breck$Precip.mm <- convert_precip(breck$Precip.in, old_metric = "inches", new_metric = "mm", round = 2) breck data(loveland) loveland$Precip.in <- convert_precip(loveland$Precip.mm, old_metric = "mm", new_metric = "inches", round = NULL) loveland$Precip.cm <- convert_precip(loveland$Precip.mm, old_metric = "mm", new_metric = "cm", round = 3) loveland
data(breck) breck$Precip.mm <- convert_precip(breck$Precip.in, old_metric = "inches", new_metric = "mm", round = 2) breck data(loveland) loveland$Precip.in <- convert_precip(loveland$Precip.mm, old_metric = "mm", new_metric = "inches", round = NULL) loveland$Precip.cm <- convert_precip(loveland$Precip.mm, old_metric = "mm", new_metric = "cm", round = 3) loveland
This function allows you to convert a vector of temperature values between Fahrenheit, Celsius, and degrees Kelvin.
convert_temperature(temperature, old_metric, new_metric, round = 2)
convert_temperature(temperature, old_metric, new_metric, round = 2)
temperature |
A numeric vector of temperatures to be converted. |
old_metric |
The metric from which you want to convert. Possible options are:
|
new_metric |
The metric to which you want to convert. The same options
are possible as for |
round |
An integer indicating the number of decimal places to round the converted value. |
A numeric vector with temperature converted to the metric specified
by the argument new_metric
.
#' Joshua Ferreri [email protected], Brooke Anderson [email protected]
data(lyon) lyon$TemperatureF <- convert_temperature(lyon$TemperatureC, old_metric = "c", new_metric = "f") lyon data(norfolk) norfolk$TempC <- convert_temperature(norfolk$TemperatureF, old_metric = "f", new_metric = "c") norfolk data(angeles) angeles$TemperatureC <- convert_temperature(angeles$TemperatureK, old_metric = "kelvin", new_metric = "celsius") angeles
data(lyon) lyon$TemperatureF <- convert_temperature(lyon$TemperatureC, old_metric = "c", new_metric = "f") lyon data(norfolk) norfolk$TempC <- convert_temperature(norfolk$TemperatureF, old_metric = "f", new_metric = "c") norfolk data(angeles) angeles$TemperatureC <- convert_temperature(angeles$TemperatureK, old_metric = "kelvin", new_metric = "celsius") angeles
This function allows you to convert among the following wind speed metrics: knots, miles per hour, meters per second, feet per second, and kilometers per hour.
convert_wind_speed(wind_speed, old_metric, new_metric, round = 1)
convert_wind_speed(wind_speed, old_metric, new_metric, round = 1)
wind_speed |
A numerical vector of wind speeds to be converted. |
old_metric |
The metric from which you want to convert. Possible options are:
|
new_metric |
The metric to which you want to convert. The same options
are possible as for |
round |
An integer indicating the number of decimal places to round the converted value. |
A numeric vector with wind speed converted to the metric specified
by the argument new_metric
.
Joshua Ferreri [email protected], Brooke Anderson [email protected]
data(beijing) beijing$knots <- convert_wind_speed(beijing$kmph, old_metric = "kmph", new_metric = "knots") beijing data(foco) foco$mph <- convert_wind_speed(foco$knots, old_metric = "knots", new_metric = "mph", round = 0) foco$mph <- convert_wind_speed(foco$knots, old_metric = "knots", new_metric = "mps", round = NULL) foco$kmph <- convert_wind_speed(foco$mph, old_metric = "mph", new_metric = "kmph") foco
data(beijing) beijing$knots <- convert_wind_speed(beijing$kmph, old_metric = "kmph", new_metric = "knots") beijing data(foco) foco$mph <- convert_wind_speed(foco$knots, old_metric = "knots", new_metric = "mph", round = 0) foco$mph <- convert_wind_speed(foco$knots, old_metric = "knots", new_metric = "mps", round = NULL) foco$kmph <- convert_wind_speed(foco$mph, old_metric = "mph", new_metric = "kmph") foco
dewpoint.to.humidity
creates a numeric vector of relative humidity
from numerical vectors of air temperature and dew point temperature.
dewpoint.to.humidity(dp = NA, t = NA, temperature.metric = "fahrenheit")
dewpoint.to.humidity(dp = NA, t = NA, temperature.metric = "fahrenheit")
dp |
Numeric vector of dew point temperatures. |
t |
Numeric vector of air temperatures. |
temperature.metric |
Character string indicating the temperature
metric of air temperature and dew point temperature. Possible values
are |
Dew point temperature and temperature must be in the same
metric (i.e., either both in Celsius or both in Fahrenheit). If
necessary, use convert_temperature
to convert before
using this function.
A numeric vector of relative humidity (in %)
Equations are from the source code for the US National Weather Service's online heat index calculator.
Brooke Anderson [email protected], Roger Peng [email protected]
National Weather Service Hydrometeorological Prediction Center Web Team. Heat Index Calculator. 30 Jan 2015. http://www.wpc.ncep.noaa.gov/html/heatindex.shtml. Accessed 18 Dec 2015.
humidity.to.dewpoint,
fahrenheit.to.celsius,
celsius.to.fahrenheit
,
convert_temperature
# Calculate relative humidity from air temperature and # dew point temperature. data(lyon) lyon$RH <- dewpoint.to.humidity(t = lyon$TemperatureC, dp = lyon$DewpointC, temperature.metric = 'celsius') lyon
# Calculate relative humidity from air temperature and # dew point temperature. data(lyon) lyon$RH <- dewpoint.to.humidity(t = lyon$TemperatureC, dp = lyon$DewpointC, temperature.metric = 'celsius') lyon
fahrenheit.to.celsius
creates a numeric vector of temperatures in
Celsius from a numeric vector of temperatures in Fahrenheit.
fahrenheit.to.celsius(T.fahrenheit, round = 2)
fahrenheit.to.celsius(T.fahrenheit, round = 2)
T.fahrenheit |
Numeric vector of temperatures in Fahrenheit. |
round |
An integer indicating the number of decimal places to round the converted value. |
A numeric vector of temperature values in Celsius.
Equations are from the source code for the US National Weather Service's online heat index calculator.
Brooke Anderson [email protected], Roger Peng [email protected]
# Convert from Fahrenheit to Celsius. data(norfolk) norfolk$TempC <- fahrenheit.to.celsius(norfolk$TemperatureF) norfolk
# Convert from Fahrenheit to Celsius. data(norfolk) norfolk$TempC <- fahrenheit.to.celsius(norfolk$TemperatureF) norfolk
fahrenheit.to.kelvin
creates a numeric vector of temperatures in
Kelvin from a numeric vector of temperatures in Fahrenheit.
fahrenheit.to.kelvin(T.fahrenheit, round = 2)
fahrenheit.to.kelvin(T.fahrenheit, round = 2)
T.fahrenheit |
Numeric vector of temperatures in Fahrenheit. |
round |
An integer indicating the number of decimal places to round the converted value. |
A numeric vector of temperature values in Kelvin.
Equations are from the source code for the National Oceanic and Atmospheric Association's online temperature converter.
#' Joshua Ferreri [email protected], Brooke Anderson [email protected]
# Convert from Fahrenheit to Kelvin. data(norfolk) norfolk$TemperatureK <- fahrenheit.to.kelvin(norfolk$TemperatureF) norfolk
# Convert from Fahrenheit to Kelvin. data(norfolk) norfolk$TemperatureK <- fahrenheit.to.kelvin(norfolk$TemperatureF) norfolk
A dataset containing daily values of mean temperature (Fahrenheit) and mean wind speed (in knots) for the week of October 11, 2015, in Fort Collins, CO.
foco
foco
A data frame with 7 rows and 3 variables:
Date of weather observation
Daily mean temperature in Fahrenheit
Daily mean wind speed in knots
heat.index
creates a numeric vector of heat index values from
numeric vectors of air temperature and either relative humidity or
dew point temperature.
heat.index(t = NA, dp = c(), rh = c(), temperature.metric = "fahrenheit", output.metric = NULL, round = 0)
heat.index(t = NA, dp = c(), rh = c(), temperature.metric = "fahrenheit", output.metric = NULL, round = 0)
t |
Numeric vector of air temperatures. |
dp |
Numeric vector of dew point temperatures. |
rh |
Numeric vector of relative humidity (in %). |
temperature.metric |
Character string indicating the temperature metric of air temperature and dew point temperature. Possible values are 'fahrenheit' or 'celsius'. |
output.metric |
Character string indicating the metric into which heat index should be calculated. Possible values are 'fahrenheit' or 'celsius'. |
round |
Integer indicating the number of decimal places to round converted value. |
Include air temperature (t
) and either dew point
temperature (dp
) or relative humdity (rh
). You cannot
specify both dew point temperature and relative humidity– this will
return an error. Heat index is calculated as NA
when impossible
values of dew point temperature or humidity are input (e.g., humidity
above 100% or below 0%, dew point temperature above air temperature).
A numeric vector of heat index values in the metric specified
by output.metric
. (If output.metric
is not specified,
heat index will be returned in the same metric in which air
temperature was input, specified by temperature.metric
.)
Equations are from the source code for the US National Weather Service's online heat index calculator.
Brooke Anderson [email protected], Roger Peng [email protected]
Anderson GB, Bell ML, Peng RD. 2013. Methods to calculate the heat index as an exposure metric in environmental health research. Environmental Health Perspectives 121(10):1111-1119.
National Weather Service Hydrometeorological Prediction Center Web Team. Heat Index Calculator. 30 Jan 2015. http://www.wpc.ncep.noaa.gov/html/heatindex.shtml. Accessed 18 Dec 2015.
Rothfusz L. 1990. The heat index (or, more than you ever wanted to know about heat index) (Technical Attachment SR 90-23). Fort Worth: Scientific Services Division, National Weather Service.
R. Steadman, 1979. The assessment of sultriness. Part I: A temperature-humidity index based on human physiology and clothing science. Journal of Applied Meteorology, 18(7):861–873.
# Calculate heat index from temperature (in Fahrenheit) # and relative humidity. data(suffolk) suffolk$heat.index <- heat.index(t = suffolk$TemperatureF, rh = suffolk$Relative.Humidity) suffolk # Calculate heat index (in Celsius) from temperature (in # Celsius) and dew point temperature (in Celsius). data(lyon) lyon$heat.index <- heat.index(t = lyon$TemperatureC, dp = lyon$DewpointC, temperature.metric = 'celsius', output.metric = 'celsius') lyon
# Calculate heat index from temperature (in Fahrenheit) # and relative humidity. data(suffolk) suffolk$heat.index <- heat.index(t = suffolk$TemperatureF, rh = suffolk$Relative.Humidity) suffolk # Calculate heat index (in Celsius) from temperature (in # Celsius) and dew point temperature (in Celsius). data(lyon) lyon$heat.index <- heat.index(t = lyon$TemperatureC, dp = lyon$DewpointC, temperature.metric = 'celsius', output.metric = 'celsius') lyon
heat.index.algorithm
converts a numeric scalar of temperature
(in Fahrenheit) and a numeric scalar of relative humidity (in %)
to heat index (in Fahrenheit). This function is not meant to be used
outside of the heat.index
function.
heat.index.algorithm(t = NA, rh = NA)
heat.index.algorithm(t = NA, rh = NA)
t |
Numeric scalar of air temperature, in Fahrenheit. |
rh |
Numeric scalar of relative humidity, in %. |
If an impossible value of relative humidity is given
(below 0% or above 100%), heat index is returned as NA
.
A numeric scalar of heat index, in Fahrenheit.
Equations are from the source code for the US National Weather Service's online heat index calculator.
Brooke Anderson [email protected], Roger Peng [email protected]
Anderson GB, Bell ML, Peng RD. 2013. Methods to calculate the heat index as an exposure Metric in environmental health research. Environmental Health Perspectives 121(10):1111-1119.
National Weather Service Hydrometeorological Prediction Center Web Team. Heat Index Calculator. 30 Jan 2015. http://www.wpc.ncep.noaa.gov/html/heatindex.shtml. Accessed 18 Dec 2015.
Rothfusz L. 1990. The heat index (or, more than you ever wanted to know about heat index) (Technical Attachment SR 90-23). Fort Worth: Scientific Services Division, National Weather Service.
R. Steadman, 1979. The assessment of sultriness. Part I: A temperature-humidity index based on human physiology and clothing science. Journal of Applied Meteorology, 18(7):861–873.
humidity.to.dewpoint
creates a numeric vector of dew point
temperature from numeric vectors of air temperature and relative
humidity.
humidity.to.dewpoint(rh = NA, t = NA, temperature.metric = "fahrenheit")
humidity.to.dewpoint(rh = NA, t = NA, temperature.metric = "fahrenheit")
rh |
Numeric vector of relative humidity (in %). |
t |
Numeric vector of air temperatures. |
temperature.metric |
Character string indicating the temperature
metric of air temperature. Possible values are |
Dew point temperature will be calculated in the same metric as
the temperature vector (as specified by the temperature.metric
option). If you'd like dew point temperature in a different metric,
use the function celsius.to.fahrenheit
or
fahrenheit.to.celsius
on the output from this function.
A numeric vector of dew point temperature, in the same metric
as the temperature vector (as specified by the temperature.metric
option).
Equations are from the source code for the US National Weather Service's online heat index calculator.
Brooke Anderson [email protected], Roger Peng [email protected]
National Weather Service Hydrometeorological Prediction Center Web Team. Heat Index Calculator. 30 Jan 2015. http://www.wpc.ncep.noaa.gov/html/heatindex.shtml. Accessed 18 Dec 2015.
dewpoint.to.humidity,
fahrenheit.to.celsius,
celsius.to.fahrenheit
# Calculate dew point temperature from relative humidity and # air temperature. data(newhaven) newhaven$DP <- humidity.to.dewpoint(t = newhaven$TemperatureF, rh = newhaven$Relative.Humidity, temperature.metric = 'fahrenheit') newhaven
# Calculate dew point temperature from relative humidity and # air temperature. data(newhaven) newhaven$DP <- humidity.to.dewpoint(t = newhaven$TemperatureF, rh = newhaven$Relative.Humidity, temperature.metric = 'fahrenheit') newhaven
inches_to_metric
creates a numeric vector of precipitation in
common metric units (millimeters or centimeters) from a numeric vector of
precipitation in inches.
inches_to_metric(inches, unit, round = 2)
inches_to_metric(inches, unit, round = 2)
inches |
Numeric vector of precipitation (in inches) |
unit |
Character specifying the metric precipitation unit besides inches. Possible values are:
|
round |
An integer indicating the number of decimal places to round the converted value. |
A numeric vector of precipitation (in specified metric unit)
Equations are from the source code for the National Weather Service Forecast Office http://www.srh.noaa.gov/ama/?n=conversions
Joshua Ferreri [email protected], Brooke Anderson [email protected]
http://www.srh.noaa.gov/ama/?n=conversions
data(breck) breck$Precip.mm <- inches_to_metric(breck$Precip.in, unit = "mm", round = 2) breck
data(breck) breck$Precip.mm <- inches_to_metric(breck$Precip.in, unit = "mm", round = 2) breck
kelvin.to.celsius
creates a numeric vector of temperatures in
Celsius from a numeric vector of temperatures in Kelvin.
kelvin.to.celsius(T.kelvin, round = 2)
kelvin.to.celsius(T.kelvin, round = 2)
T.kelvin |
Numeric vector of temperatures in Kelvin. |
round |
An integer indicating the number of decimal places to round the converted value. |
A numeric vector of temperature values in Celsius.
Equations are from the source code for the National Oceanic and Atmospheric Association's online temperature converter.
Joshua Ferreri [email protected], Brooke Anderson [email protected]
# Convert from Kelvin to Celsius. data(angeles) angeles$TemperatureC <- kelvin.to.celsius(angeles$TemperatureK) angeles
# Convert from Kelvin to Celsius. data(angeles) angeles$TemperatureC <- kelvin.to.celsius(angeles$TemperatureK) angeles
kelvin.to.fahrenheit
creates a numeric vector of temperatures in
Fahrenheit from a numeric vector of temperatures in Kelvin.
kelvin.to.fahrenheit(T.kelvin, round = 2)
kelvin.to.fahrenheit(T.kelvin, round = 2)
T.kelvin |
Numeric vector of temperatures in Kelvin. |
round |
An integer indicating the number of decimal places to round the converted value. |
A numeric vector of temperature values in Fahrenheit.
Equations are from the source code for the National Oceanic and Atmospheric Association's online temperature converter.
Joshua Ferreri [email protected], Brooke Anderson [email protected]
# Convert from Kelvin to Fahrenheit. data(angeles) angeles$TemperatureF <- kelvin.to.fahrenheit(angeles$TemperatureK) angeles
# Convert from Kelvin to Fahrenheit. data(angeles) angeles$TemperatureF <- kelvin.to.fahrenheit(angeles$TemperatureK) angeles
knots_to_speed
creates a numeric vector of speed, in units
specified by unit
, from a numeric vector of speed in knots.
knots_to_speed(knots, unit, round = 1)
knots_to_speed(knots, unit, round = 1)
knots |
Numeric vector of speeds in knots |
unit |
Character specifying the speed unit other than knots. Possible values are:
|
round |
An integer indicating the number of decimal places to round the converted value. |
Output will be in the speed units specified by unit
.
A numeric vector of speeds (in the specified unit)
Equations are from the source code for the National Oceanic and and Atmospheric Administration's online wind speed converter
Joshua Ferreri [email protected], Brooke Anderson [email protected]
http://www.srh.noaa.gov/epz/?n=wxcalc_windconvert
data(foco) foco$mph <- knots_to_speed(foco$knots, unit = "mph", round = 0) foco$mps <- knots_to_speed(foco$knots, unit = "mps", round = NULL) foco$ftps <- knots_to_speed(foco$knots, unit = "ftps") foco$kmph <- knots_to_speed(foco$knots, unit = "kmph") foco
data(foco) foco$mph <- knots_to_speed(foco$knots, unit = "mph", round = 0) foco$mps <- knots_to_speed(foco$knots, unit = "mps", round = NULL) foco$ftps <- knots_to_speed(foco$knots, unit = "ftps") foco$kmph <- knots_to_speed(foco$knots, unit = "kmph") foco
Daily values of precipitation (millimeters) for the week of September 8, 2013, in Loveland, CO.
loveland
loveland
A data frame 7 rows and 2 variables:
Date of weather observation
Daily precipitation in millimeters
Daily values of mean temperature (Celsius) and mean dew point temperature (Celsius) for the week of June 18, 2000, in Lyon, France.
lyon
lyon
A data frame with columns:
Date of weather observation
Daily mean temperature in Celsius
Daily mean dewpoint temperature in Celsius
metric_to_inches
creates a numeric vector of precipitation measures in
inches from a numeric vector of precipitation in common metric units
(millimeters or centimeters).
metric_to_inches(metric, unit.from, round = 2)
metric_to_inches(metric, unit.from, round = 2)
metric |
Numeric vector of precipitation (in millimeters or centimeters) |
unit.from |
A character string with the current units of the observations (i.e., the units from which you want to convert) |
round |
An integer indicating the number of decimal places to round the converted value. |
A numeric vector of precipitation in inches.
Equations are from the source code for the National Weather Service Forecast Office http://www.srh.noaa.gov/ama/?n=conversions
Joshua Ferreri [email protected], Brooke Anderson [email protected]
http://www.srh.noaa.gov/ama/?n=conversions
data(loveland) loveland$Precip.in <- metric_to_inches(loveland$Precip.mm, unit.from = "mm", round = 2) loveland
data(loveland) loveland$Precip.in <- metric_to_inches(loveland$Precip.mm, unit.from = "mm", round = 2) loveland
Daily values of mean temperature (Fahrenheit) and mean relative humidity (%) for the week of October 19, 2008, in New Haven, CT.
newhaven
newhaven
A data frame with columns:
Date of weather observation
Daily mean temperature in Fahrenheit
Daily relative humidity in %
Daily values of mean temperature (Fahrenheit) and mean dew point temperature (Fahrenheit) for the week of March 12, 2006, in Norfolk, VA.
norfolk
norfolk
A data frame with columns:
Date of weather observation
Daily mean temperature in Fahrenheit
Daily mean dewpoint temperature in Fahrenheit
Daily values of mean temperature (Fahrenheit) and mean wind speed (miles per hour) for the week of August 02, 2015, in San Jose, Costa Rica.
puravida
puravida
A data frame 7 rows and 3 variables:
Date of weather observation
Daily mean temperature in Fahrenheit
Daily mean wind speed in miles per hour
speed_to_knots
creates a numeric vector of speed in knots from a
numeric vector of speed in the specified unit.
speed_to_knots(x, unit, round = 1)
speed_to_knots(x, unit, round = 1)
x |
Numeric vector of wind speeds, in units specified by |
unit |
Character specifying the speed unit other than knots. Possible values are:
|
round |
An integer indicating the number of decimal places to round the converted value. |
A numeric vector of speeds (in knots)
Equations are from the source code for the National Oceanic and and Atmospheric Administration's online wind speed converter
Joshua Ferreri [email protected], Brooke Anderson [email protected]
http://www.srh.noaa.gov/epz/?n=wxcalc_windconvert
data(beijing) beijing$knots <- speed_to_knots(beijing$kmph, unit = "kmph", round = 2) beijing
data(beijing) beijing$knots <- speed_to_knots(beijing$kmph, unit = "kmph", round = 2) beijing
Daily values of mean temperature (Fahrenheit) and mean relative humidity (%) for the week of July 12, 1998, in Suffolk, VA.
suffolk
suffolk
A data frame with columns:
Date of weather observation
Daily mean temperature in Fahrenheit
Daily relative humidity in %
The weathermetics package provides functions to convert between Celsius and Fahrenheit, to convert between dew point temperature and relative humidity, and to calculate heat index.
This package includes the following functions to calculate vectors of
weather metrics: celsius.to.fahrenheit
,
fahrenheit.to.celsius
,
dewpoint.to.humidity
,
humidity.to.dewpoint
, and
heat.index
.
Brooke Anderson [email protected], Joshua Ferreri [email protected], Roger Peng [email protected]
Anderson GB, Bell ML, Peng RD. 2013. Methods to calculate the heat index as an exposure Metric in environmental health research. Environmental Health Perspectives 121(10):1111-1119.
National Weather Service Hydrometeorological Prediction Center Web Team. Heat Index Calculator. 30 Jan 2015. http://www.wpc.ncep.noaa.gov/html/heatindex.shtml. Accessed 18 Dec 2015.