LA si knewsoidh ksadjfndsl kjfhdslk fhasklufd klasfhaksljh asklhjd asdkhasbdlkash dlkasjhdlksahjsakldhaskldhas sa
### Process
First, a Web Scrape was done to gather the data from The L.A. Almanac
library(tidyverse)## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.5 ✓ purrr 0.3.4
## ✓ tibble 3.1.6 ✓ dplyr 1.0.7
## ✓ tidyr 1.1.4 ✓ stringr 1.4.0
## ✓ readr 2.1.1 ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
# install.packages("rvest")
library(rvest)##
## Attaching package: 'rvest'
## The following object is masked from 'package:readr':
##
## guess_encoding
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_df#weather_df$Year
#as.Date(weather_df$Year)
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).
Some text.