Created
October 27, 2020 23:23
-
-
Save adisarid/66ace78d77575ec9ad070b762b33c4b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
wind_turbine <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-10-27/wind-turbine.csv') | |
p1 <- ggplot(wind_turbine, aes(x = rotor_diameter_m, y = turbine_rated_capacity_k_w)) + | |
geom_point() + | |
stat_smooth(method = "lm") + | |
ggtitle("Capacity vs rotor diameter") + | |
ylab("Capacity [kW]") + | |
xlab("Rotor diameter [m]") | |
p2 <- ggplot(wind_turbine, aes(x = hub_height_m, y = turbine_rated_capacity_k_w)) + | |
geom_point() + | |
stat_smooth(method = "lm") + | |
ggtitle("Capacity vs hub height") + | |
ylab("Capacity [kW]") + | |
xlab("Hub height [m]") | |
library(patchwork) | |
p1 + p2 | |
lm1 <- lm(data = wind_turbine, formula = turbine_rated_capacity_k_w ~ hub_height_m + rotor_diameter_m) | |
lm1 %>% | |
summary() | |
gtsummary::tbl_regression(lm1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment