Question: Let's make a somewhat more interesting scatterplot ```{r} weather_df |> ggplot(aes(x = tmin, y = tmax, color = name, shape = name)) + geom_point(aes(size =
Let's make a somewhat more interesting scatterplot ```{r} weather_df |> ggplot(aes(x = tmin, y = tmax, color = name, shape = name)) + geom_point(aes(size = prcp), alpha = 0.3) + geom_smooth(se = FALSE) + facet_grid(. ~ name) ``` Learning Assessment: Write a code chain that starts with weather_df; focuses only on Central Park, converts temperatures to Fahrenheit, makes a scatterplot of min vs. max temperature, and overlays a linear regression line (using options in geom_smooth()). LA plot: ```{r} weather_df |> filter(name == "CentralPark_NY") |> mutate( tmax_fahr = tmax * (9/5) + 32, tmin_fahr = tmin * (9/5) + 32 ) |> ggplot(aes(x = tmin_fahr, y = tmax_fahr)) + geom_point() + geom_smooth(se = FALSE, method = "lm") ``` ## Small things ```{r} weather_df |> ggplot(aes(x = tmin, y = tmax, color = name, shape = name)) + # geom_point(alpha = 0.3) + geom_smooth(se = FALSE) weather_df |> ggplot(aes(x = tmin, y = tmax, color = name, shape = name)) + geom_smooth(se = FALSE) + geom_point() ``` ```{r} weather_df |> ggplot(aes(x = tmin, y = tmax)) + geom_hex() ``` ```{r} weather_df |> ggplot(aes(x = tmin, y = tmax)) + geom_point(color = "#086bfd") ``` ## Univariate plots ```{r} weather_df |> ggplot(aes(x = tmin)) + geom_histogram(color = "white", fill = "red") ``` ```{r} weather_df |> ggplot(aes(x = tmin, color = name)) + geom_histogram() weather_df |> ggplot(aes(x = tmin, fill = name)) + geom_hi
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
