R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

## Warning: package 'stringr' was built under R version 3.4.4
## Warning: package 'XML' was built under R version 3.4.4
## Warning: Missing column names filled in: 'X1' [1]

Scrape my fantasy legue

## character(0)
## Joining by: Name, Team

Checks

## Joining by: Name
## [1] "Thompson, Chris"
## NULL

Run if necessary

Cheese team is a bunch of old men
Franchise Mean_age
Cheese 26.28571
Watts 26.21053
Herman 25.90476
Miller 25.80000
Fberg 25.70000
Donk 25.22727
Kiyoon 24.59091
Launchpad 24.47619
James 24.45000
Woods 24.36364
Steve 24.26316
Katz 23.95000
Median age says fberg team a bunch old men
Franchise Median_age
Fberg 26.5
Watts 26.0
Cheese 25.0
Herman 25.0
Donk 24.0
James 24.0
Kiyoon 24.0
Launchpad 24.0
Miller 24.0
Steve 24.0
Woods 23.5
Katz 23.0
KATZ killing it
Franchise ADP_average
Kiyoon 172.1364
James 159.2500
Cheese 138.3333
Herman 132.5714
Woods 128.5455
Donk 125.7727
Launchpad 123.0476
Fberg 121.5000
Watts 121.3684
Katz 114.3500
Steve 112.7368
Miller 89.5200

Graphs

## Warning: Removed 27 rows containing missing values (geom_point).

## Warning: Removed 21 rows containing missing values (geom_point).

## `geom_smooth()` using method = 'loess'
## Warning: Removed 27 rows containing non-finite values (stat_smooth).

## Warning: Removed 27 rows containing missing values (geom_point).

## `geom_smooth()` using method = 'loess'
## Warning: Removed 27 rows containing non-finite values (stat_smooth).

## Warning: Removed 27 rows containing missing values (geom_point).

## `geom_smooth()` using method = 'loess'
## Warning: Removed 19 rows containing non-finite values (stat_smooth).
## Warning: Removed 19 rows containing missing values (geom_point).

Explanation

  • These lines balance out the relationship between age and ADP
    • Fberg’s Team gets stronger with age
    • Cheese team has alot of useless older and younger players but has a strong mid age player range
    • Donk team has some solid veterans and solid youth
    • Herman’s team has some solid youth, strong middle age and some useless veterans
    • James team has some young crappy players but has strong mid to older aged players
    • Watts has some strong young talent, similar trend to James, but is deeper with strong veterans. Brees, is an outlier. Without Brees I think Watts shows strongest Trends in this group
## `geom_smooth()` using method = 'loess'
## Warning: Removed 21 rows containing non-finite values (stat_smooth).
## Warning: Removed 21 rows containing missing values (geom_point).

## `geom_smooth()` using method = 'loess'
## Warning: Removed 14 rows containing non-finite values (stat_smooth).
## Warning: Removed 14 rows containing missing values (geom_point).

  • Miller graph is distorted by Brady(overall 3 35+ players, likely qb’s). Seems to have a strong and consistent trend across all ages
  • Kiyoons team gets worse by age, but does not have any really old players
  • Woods team follows similar trend to Kiyoon but woods has strongest youth players and overall stronger team than Kiyoon
  • Katz has strength at young to mid age(20-25), then some 30 y.o.+ veterans that are not that great
  • LP team looks very consistent most players hovering around 120 ADP
  • Steves team gets stronger with age, overall solid team

Top 100 tables

total player per team with adp under 100
Franchise total_player_count
Miller 16
Fberg 10
Herman 10
Launchpad 9
Woods 9
Katz 8
Steve 8
Watts 8
Cheese 7
Donk 7
James 5
Kiyoon 3
total players adp under 100 and younger than 25
Franchise total_player_count
Miller 9
Katz 8
Launchpad 8
Woods 8
Donk 7
Cheese 5
Herman 5
Steve 4
Fberg 3
James 3
Kiyoon 3
Watts 3
top 50 guys
Franchise total_player_count
Miller 11
Fberg 6
Katz 6
Steve 6
Herman 4
Woods 4
Donk 3
Launchpad 3
Watts 3
Cheese 2
James 2

Position graphs

## Warning: Removed 4 rows containing missing values (geom_point).

## Warning: Removed 8 rows containing missing values (geom_point).

## Warning: Removed 7 rows containing missing values (geom_point).

## Warning: Removed 9 rows containing missing values (geom_point).

# url <- "https://www.fantasypros.com/nfl/rankings/half-point-ppr-cheatsheets"
# html <- htmlTreeParse(url,useInternalNodes=T)
# x_path_5 <- paste('//*[contains(concat( " ", @class, " " ), concat( " ", "full-name", " " ))]', sep="")
# my_adp <- xpathSApply(html, x_path_5, xmlValue)
# adp <- strsplit(all_players_r, " ")
# adp <- as.data.frame(do.call(rbind, adp))