Weather | R Documentation |
2016-17 weather in several cities
data(Weather)
A data frame with weather-related variables for several world cities.
City name.
Date.
Numeric year.
Numeric month.
Numeric day.
High, average, and low temperature for the day in degrees F.
High, average, and low dew point for the day in degrees F.
High, average, and low relative humidity.
High, average, and low sea level pressure in inches of mercury.
High, average, and low visability for the day in miles.
High, average, and low wind speed for the day in mph.
Precipitation for the day – a character vale; T
means "trace amount".
Character string naming weather events on the day (Rain, Fog, Snow, etc.)
These data were downloaded from WeatherUnderground in January 2018.
if (require(dplyr)) {
Weather |>
group_by(city, year) |>
summarise(
min_temp = min(low_temp),
max_temp = max(high_temp)
)
}
if (require(ggformula)) {
Weather |>
gf_linerange(low_temp + high_temp ~ date | city ~ .,
color = ~ (high_temp + low_temp) / 2, show.legend = FALSE) |>
gf_refine(scale_color_gradientn(colors = rev(rainbow(5))))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.