# What is this distribution?

This is a plot of temperature against wind speed using R's weather data (nycflights13 package). The question asks what is the distribution of temperature as a function of windspeed? Honestly, I don't see any distribution.

• One reason you cannot see a distribution is that this plot isn't able to show it correctly due to the extensive overplotting of points. Use a visualization that enables you to see the actual bivariate distribution the data (jitter the points, use transparency, make hex plots, use sunflowers, etc).
– whuber
Oct 26 '19 at 14:10

First, the data you are using is an hourly time series covering one complete year (2013). So in your plot there is a lot of overplotting, which hides structure. One way of avoiding it is

Code for this plot:

library(ggplot2)
ggplot(weather, aes(x=wind_speed, y=temp)) + geom_hex() +
xlim(0, 50) + xlab("wind_speed (mph)") +
ylab("temp (F)")


But this is still hiding a lot of variation, we would expect both monthly variation, and hourly variation (and time series correlations we do not go into.)

EDIT


Faceting first by month, then by hours, separately:

Then this graphical investigation can continue in this way ... Below is a plot from an earlier version, kept for documentation. Wasn't a very good idea:

One try is to show hourly variation by color and monthly by faceting:

It is clearly a lot of seasonal variation, while it is not easy from this plot to understand the hourly variation, at least not for me. Maybe there are better ideas. Code for this plot:

mypal <- RColorBrewer::brewer.pal(6, "Greens")
mypal <- c(mypal,  rev(mypal))

ggplot(weather, aes(x=wind_speed, y=temp,  col=hour)) +
geom_jitter() +x lim(0, 50) +