Comments (6)
Try without risk and does your tables have NaN for alot of the Risk or ECR fields?
from ffanalytics.
Still does not work, I even limit it to just POS and ID, and the adp does not show up. My entire script is below.
library(ffanalytics)
library(tidyverse)
scoring_syracuse <- list(
pass = list(
pass_att = 0, pass_comp = 0, pass_inc = 0, pass_yds = 0.04, pass_tds = 4,
pass_int = -1, pass_40_yds = 0, pass_300_yds = 0, pass_350_yds = 0,
pass_400_yds = 0
),
rush = list(
all_pos = TRUE,
rush_yds = 0.1, rush_att = 0, rush_40_yds = 0, rush_tds = 6,
rush_100_yds = 0, rush_150_yds = 0, rush_200_yds = 0),
rec = list(
all_pos = TRUE,
rec = 0, rec_yds = 0.1, rec_tds = 6, rec_40_yds = 0, rec_100_yds = 0,
rec_150_yds = 0, rec_200_yds = 0
),
misc = list(
all_pos = TRUE,
fumbles_lost = -2, fumbles_total = 0,
sacks = 0, two_pts = 2
),
kick = list(
xp = 1.0, fg_0019 = 3.0, fg_2029 = 3.0, fg_3039 = 3.0, fg_4049 = 4.0,
fg_50 = 5.0, fg_miss = 0.0
),
ret = list(
all_pos = TRUE,
return_tds = 6, return_yds = 0
),
dst = list(
dst_fum_rec = 2, dst_int = 2, dst_safety = 2, dst_sacks = 1, dst_td = 6,
dst_blk = 2, dst_ret_yds = 0, dst_pts_allowed = 0
),
pts_bracket = list(
list(threshold = 0, points = 10),
list(threshold = 6, points = 7),
list(threshold = 20, points = 4),
list(threshold = 34, points = 0),
list(threshold = 99, points = -4)
)
)
baseline_syracuse <- c(QB = 16, RB = 35, WR = 48, TE = 13, K = 8, DST = 8)
syracuse_scrape <- scrape_data(pos = c("QB", "RB", "WR", "TE", "DST"),
season = 2019, week = 0)
syracuse_projections <- projections_table(syracuse_scrape, scoring_rules = scoring_syracuse, vor_baseline = baseline_syracuse)
projections_syracuse <- syracuse_projections %>%
select(pos, id) %>%
add_adp()
from ffanalytics.
The issue is at line 468 in calc_projections.R. the rename_at function is not renaming the 2nd column to adp
adp_tbl <- get_adp(sources, type = "ADP") %>% select(1, length(.)) %>%
rename_at(length(.), ~ function(x)return("adp"))
The rename_at is not working. I tested this in my repo branch Dev and it worked.
adp_tbl <- get_adp(sources, type = "ADP") %>% select(1, length(.))
names(adp_tbl)[2] <- c("adp")
from ffanalytics.
Posting this here in case anyone is interested in helping with the project:
https://fantasyfootballanalytics.net/2019/09/call-for-help-lead-r-shiny-developer.html
from ffanalytics.
Had the same issue as @RandalMorris and found the same cause: the rename_at().
Testing it locally, changing "rename_at(length(.), ~ function(x)return("adp"))" to " rename_at(length(.), function(x){return("adp")})" worked. The same idea applies to changing "rename_at(length(.), ~ function(x)return("aav"))" to "rename_at(length(.), function(x){return("aav")})"
from ffanalytics.
Good catch! We're hard at work on other things at the moment, but feel free to make a pull request for these fixes--thanks!
from ffanalytics.
Related Issues (20)
- Scrape error HOT 4
- Scrape issue HOT 1
- continue to get empty tibbles for ESPN & Yahoo projections. HOT 3
- FantasyPros Weekly Projections on Different URL HOT 3
- update cbs to include season long and weekly projections HOT 1
- scrape data returns 1 week HOT 2
- Custom Scoring in R HOT 2
- FFToday scrape is incomplete HOT 2
- FFToday scrape is broken HOT 2
- tiers HOT 3
- Install Issue HOT 4
- Getting error message for Week 1 FFToday scrape HOT 3
- Error in CBS scrape of Kenneth walker in Week 2 HOT 2
- Getting Actuals Data HOT 1
- Missing players with weekly scrape when injury status exists HOT 2
- Example Scrape no longer works HOT 1
- CBS scrape pulling previous weeks stats, not projections HOT 1
- Error in FFToday scrape: HOT 1
- FantasyPros projections Week 18 look like season totals HOT 1
- Installation Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffanalytics.