geoms()
in
ggplot2
leaflet()
We will again work with the meteorological data presented in lecture.
The objective of the lab is to examine the association between weekly average dew point temperature and wind speed in four regions of the US and by elevation.
First download and then read in with data.table:fread()
as.Date()
(hint: You will need the following to create a date
paste(year, month, day, sep = "-")
).data.table::week
function, keep the
observations of the first week of the month.temp
,
rh
, wind.sp
, vis.dist
,
dew.point
, lat
,lon
, and
elev
.geom_violin
to examine the wind speed and dew
point temperature by regionYou saw how to use geom_boxplot
in class. Try using
geom_violin
instead (take a look at the help). (hint: You
will need to set the x
aesthetic to 1)
NA
categorygeom_jitter
with stat_smooth
to
examine the association between dew point temperature and wind speed by
regionNA
categorygeom_bar
to create barplots of the weather
stations by elevation category coloured by regionposition = "dodge"
scale_fill_brewer
see thisNA
stat_summary
to examine mean dew point and wind
speed by region with standard deviation error barsMake sure to remove NA
Use fun.data=“mean_sdl” in stat_summary
Add another layer of stats_summary
but change the
geom to "errorbar"
(see the help).
Describe the graph and what you observe
Dew point temperature is…
Wind speed is…
rh
) in the USNA
leaflet()
addMarkers
to include the top 10 places in relative
h (hint: this will be useful rank(-rh) <= 10
)met
data (or
met_avg
)ggtech
, gganimate
,
ggforce
)