This report analyzes the average temepraoefh s;f dslkfjhsl kfj as seen on
First, we load the necessary packages:
library(tidyverse)
# install.packages("rvest")
library(rvest)Then we’d load the data:
weather <- read_html("http://www.laalmanac.com/weather/we04a.php")
table <- html_nodes(weather, "table")
# look at each one
weather_table <- weather %>%
html_nodes("table") %>%
.[1] %>%
html_table(fill = TRUE)
as.data.frame(weather_table) -> weather_dfAnd now let’s visualize the results:
weather_df %>%
filter(Temp %in% "High") %>%
ggplot(aes(as.numeric(Year), as.numeric(Annual))) + geom_line() + geom_smooth()## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## Warning: Removed 2 rows containing non-finite values (stat_smooth).
## Warning: Removed 2 row(s) containing missing values (geom_path).