|
Post by Orlando Magic Johnson on Mar 5, 2022 11:20:13 GMT -8
need a great tc from spo i guess need a good tc
|
|
|
Post by Stevie B on Mar 5, 2022 12:14:00 GMT -8
518 Harry Gallatin PF 27 6'6'' 210 A- C B- B+ B+ C 250 Mel Payton PF 28 6'4'' 185 A- C C A B+ A 570 Dwight Swails SF 23 6'4'' 200 B- A- A- B C+ B 410 Cliff Hagan SF 23 6'4'' 210 B+ B- C+ B- C+ A 483 Billy Kenville SG 24 6'2'' 187 B B+ C C+ C B 200 Jack George PG 26 6'2'' 190 C+ B C+ B- C B 311 Chuck Noble PG 23 6'4'' 190 C B+ A- C+ C B My beautiful team ohhh you gonna win, but dont think you'll get past Andrew or me lol
|
|
|
Post by nybombers3 on Mar 5, 2022 13:42:40 GMT -8
where the hell did my pick disappear to? Dempsey to PHI for cap as a tradeback. Vic for Monk, Kelley and Garmaker Garmaker to NO for Baechtold and Nolan.
|
|
|
Post by nybombers3 on Mar 5, 2022 13:46:26 GMT -8
Essentially Lakers Kings deal had a salary cap clusterfuck. They found a way around it that included Dick going to SAC. He's supposed to end up with you anyways.
|
|
|
Post by nybombers3 on Mar 5, 2022 13:47:00 GMT -8
Unless I read that whole shit wrong then someone can correct me. I'm on the phone
|
|
|
Post by Lasagna and tears of failure on Mar 5, 2022 14:40:20 GMT -8
ohhh you gonna win, but dont think you'll get past Andrew or me lol Greeme is gonna knock you off in the 8 v 1 opening round
|
|
|
Post by Brophdog88 on Mar 5, 2022 15:01:08 GMT -8
So I scraped all the player pages and made a DB so I can make articles off that info, anybody have any ideas for articles they would like outta that. Can check attributes, any season stats, current position league ratings etc.
|
|
|
Post by Stevie B on Mar 5, 2022 15:01:33 GMT -8
where the hell did my pick disappear to? post a filler my way and I’ll confirm
|
|
|
Post by Brophdog88 on Mar 5, 2022 15:01:59 GMT -8
Didnt wanna spend the time to figure out scraping the Awards/Career Highs, so dont have those.
|
|
|
Post by Lasagna and tears of failure on Mar 5, 2022 15:04:09 GMT -8
So I scraped all the player pages and made a DB so I can make articles off that info, anybody have any ideas for articles they would like outta that. Can check attributes, any season stats, current position league ratings etc. what did you use for the scraping? Also would you be willing to share the code? have you seen the R code I got working for the leagues box scores?
|
|
|
Post by Lasagna and tears of failure on Mar 5, 2022 15:11:04 GMT -8
I wrote a script that makes all my posts the perfect mix of ironic and horny if only I didn't have ED, I'd be hard as a rock about this
|
|
|
Post by Brophdog88 on Mar 5, 2022 15:27:32 GMT -8
see, I setup all this data to get dumped to an aws free tier Mysql db. Im very much a noob at Scraping, just had a thought to do something. also, the way I set it up it should make checking TC out pretty quick lol, so thats one article. I will try and get the DB available to everybody here to poke through.
|
|
|
Post by Lasagna and tears of failure on Mar 5, 2022 15:46:34 GMT -8
see, I setup all this data to get dumped to an aws free tier Mysql db. Im very much a noob at Scraping, just had a thought to do something. also, the way I set it up it should make checking TC out pretty quick lol, so thats one article. I will try and get the DB available to everybody here to poke through. the current build with a couple extra team functions rm(list=ls()) options(stringsAsFactors = FALSE) options(digits=3) library('rvest') path <- "https://bballsim2020.com/" # ADD YEAR PLUS / FOR PAST SEASONS teams <- c("Celtics", "Heat", "Nets", "Knicks", "Magic", "76ers", "Wizards", "Hawks", "Hornets", "Bulls", "Cavaliers", "Pistons", "Pacers", "Bucks", "Raptors", "Mavericks", "Nuggets", "Rockets", "Timberwolves", "Spurs", "Jazz", "Grizzlies", "Warriors", "Clippers", "Lakers", "Suns", "Trail Blazers", "Kings", "Super Sonics") colMax <- function(data) sapply(data, max, na.rm = TRUE) get_player_stats <- function(player, team, start=1, end=200, per36=2){ stats <- c() for(i in 1:length(team)){ index <- which(team[i] == teams) url <- paste(path, "/rosters/roster", index, "sched.htm", sep="") webpage <- read_html(url) links <- html_attr(html_nodes(webpage, "a"), "href") links <- links[10:(length(links)-1)] for(j in 1:length(links)){ url <- paste(path, substr(links[j], 3, nchar(links[j])), sep="") day <- as.numeric(substr(url, gregexpr("boxes/", url)[[1]][1]+6, gregexpr("-", url)[[1]][1]-1)) if(day >= start & day <= end){ full_box <- html_table(read_html(url), header=TRUE, fill=TRUE) if(colnames(full_box[[2]])[1] == team[i]){ my_team_index <- 2 opp_team_index <- 3 } else{ my_team_index <- 3 opp_team_index <- 2 } box <- full_box[[my_team_index]] box_team <- box[1:(nrow(box)-2), 1:(ncol(box)-1)] box_team[,3:16] <- lapply(box_team[,3:16], as.numeric) colnames(box_team)[6:7] <- c("X3P", "X3PA") if(colnames(box_team)[1] == team[i]){ index <- which(box_team[,1] == player) if(length(index) > 0){ colnames(box_team)[1] <- "Team" stats <- rbind(stats, box_team[index,]) } } } } } if(is.null(stats)){ cat("No stats found.\n") } else if(nrow(stats) == 0){ cat("No stats found.\n") } else{ stats <- cbind.data.frame(GM=nrow(stats), stats[, 3:16]) cat("AVERAGES\n") averages <- colMeans(stats) print(round(averages, digits=1)) if(per36 == 1){ cat("PER 36\n") constant <- (36 / averages[2]) for(i in 2:length(averages)){ averages[i] <- constant * averages[i] } print(round(averages, digits=1)) } cat("PERCENTAGES\n") print(c(sum(stats$FG) / sum(stats$FGA), sum(stats$X3P) / sum(stats$X3PA), sum(stats$FT) / sum(stats$FTA))) cat("Totals\n") cat("points boards steals blocks\n") print(c(sum(stats$FG)*2 + sum(stats$X3P) + sum(stats$FT) , sum(stats$REB) , sum(stats$ST), sum(stats$BL))) } }
get_player_tot <- function(player, team, start=1, end=200, per36=2){ stats <- c() for(i in 1:length(team)){ index <- which(team[i] == teams) url <- paste(path, "/rosters/roster", index, "sched.htm", sep="") webpage <- read_html(url) links <- html_attr(html_nodes(webpage, "a"), "href") links <- links[10:(length(links)-1)] for(j in 1:length(links)){ url <- paste(path, substr(links[j], 3, nchar(links[j])), sep="") day <- as.numeric(substr(url, gregexpr("boxes/", url)[[1]][1]+6, gregexpr("-", url)[[1]][1]-1)) if(day >= start & day <= end){ full_box <- html_table(read_html(url), header=TRUE, fill=TRUE) if(colnames(full_box[[2]])[1] == team[i]){ my_team_index <- 2 opp_team_index <- 3 } else{ my_team_index <- 3 opp_team_index <- 2 } box <- full_box[[my_team_index]] box_team <- box[1:(nrow(box)-2), 1:(ncol(box)-1)] box_team[,3:16] <- lapply(box_team[,3:16], as.numeric) colnames(box_team)[6:7] <- c("X3P", "X3PA") if(colnames(box_team)[1] == team[i]){ index <- which(box_team[,1] == player) if(length(index) > 0){ colnames(box_team)[1] <- "Team" stats <- rbind(stats, box_team[index,]) } } } } } if(is.null(stats)){ cat("No stats found.\n") } else if(nrow(stats) == 0){ cat("No stats found.\n") } else{ stats <- cbind.data.frame(GM=nrow(stats), stats[, 3:16]) pts <- (sum(stats$FG)*2 + sum(stats$X3P) + sum(stats$FT)) tsper <- ((sum(stats$FG)*2 + sum(stats$X3P) + sum(stats$FT)) / (2*(sum(stats$FGA)+ 0.44* sum(stats$FTA))))
stocks <- (( sum(stats$ST) / sum(stats$MIN) *2) + (sum(stats$BL) / sum(stats$MIN))+ ((sum(stats$REB) / sum(stats$MIN) )/ 2.0) + ((pts / sum(stats$MIN)) / 3.0) -(sum(stats$TO) / sum(stats$MIN) *2)) rcemr <- (((tsper*1.3)+stocks)*25) bihp <- (pts / (sum(stats$FGA)+(sum(stats$FTA) / 2.2)))
print(c(sum(stats$MIN), sum(stats$FG)*2 + sum(stats$X3P) + sum(stats$FT) , sum(stats$REB) , sum(stats$ST), sum(stats$BL), sum(stats$TO), sum(stats$FG), sum(stats$FGA), sum(stats$FT),sum(stats$FTA), sum(stats$X3P),sum(stats$X3PA) , ( sum(stats$FG)*2 + sum(stats$X3P) + sum(stats$FT)) / (2*(sum(stats$FGA)+ 0.44* sum(stats$FTA))), rcemr, bihp )) } }
get_Bteam_stats <- function(start=1, end=200, per36=1){ team_N <- "Celtics" player_N <- c( "Mike Smith", "Chuck Darling", "Ben Gibson", "Paul Horvath", "Dashawn Alexanders", "George Kok", "Louis Leonard", "Paul Hicks", "Don Lofgran", "Ricky Francis III", "Paulie Fracci", "Paul Hoffman"
) for (i in player_N) { print(i) get_player_stats(i, team_N , start , end, per36) cat("\n") cat("\n") } }
get_Bteam_tot <- function(start=1, end=200, per36=1){ team_N <- "Celtics" player_N <- c( "Mike Smith", "Chuck Darling", "Ben Gibson", "Paul Horvath", "Dashawn Alexanders", "George Kok", "Louis Leonard", "Paul Hicks", "Don Lofgran", "Ricky Francis III", "Paulie Fracci", "Paul Hoffman"
) for (i in player_N) { print(i) get_player_tot(i, team_N , start , end, per36)
} }
get_Andyteam_stats <- function(start=1, end=200, per36=1){ team_N <- "Bucks" player_N <- c( "Stan Kamens", "Maximillian Procaccino", "Mike Smith", "Bailey Clark", "John Collins", "Brock Call", "Zeke Nnaji", "Jackson Leaf", "Ivan Radejevic", "Terrell Thompson", "Zach LaVine", "Aaron Harrison", "Anthony House", "Tyus Jones", "Zaire Wade"
) for (i in player_N) { print(i) get_player_stats(i, team_N , start , end, per36) cat("\n") cat("\n") } }
get_Manas_stats <- function(start=1, end=200, per36=1){ team_N <- "Magic" player_N <- c( "George Brown", "Diego Garcia", "Brent Krause", "Jim Pollard", "Bobby Johnson", "Renato Cleaves", "Dax Drakes", "Josip Matic", "Bulbs Ehlers", "Javier Rodriguez", "Taven Whitehorse", "Paul Hoffman", "Francis Crossin", "Elias Bauer"
) for (i in player_N) { print(i) get_player_stats(i, team_N , start , end, per36) cat("\n") cat("\n") } }
|
|