This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library("devtools") | |
install_github(c("hadley/ggplot2", "jrnold/ggthemes", "abresler/nbastatR")) | |
packages <- | |
c('nbastatR', 'dplyr', 'magrittr', 'ggthemes', 'ggplot2') | |
lapply(packages, library, character.only = T) | |
teams2015 <- | |
get_all_team_traditional_stat_tables(year.season_start = 2015) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packages <- c('dplyr','purrr','magrittr','tidyr', 'ggplot2', 'stringr', 'jsonlite', 'ggthemes') | |
lapply(packages, library, character.only = T) | |
library(nbastatR) #devtools::install_github("abresler/nbastatR") | |
byQuarter <- | |
1:4 %>% | |
purrr::map(function(x) get_nba_traditional_player_season_stat_table(period = x, | |
per_mode = "Totals" | |
) | |
) %>% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
period | name.player | id.position | fgm | fga | |
---|---|---|---|---|---|
Q1 | Andrea Bargnani | PF | 2 | 6 | |
Q1 | Bojan Bogdanovic | SF | 6 | 9 | |
Q1 | Brook Lopez | C | 11 | 18 | |
Q1 | Donald Sloan | PG | 0 | 2 | |
Q1 | Jarrett Jack | PG | 6 | 15 | |
Q1 | Joe Johnson | SF | 5 | 11 | |
Q1 | Markel Brown | SG | 2 | 4 | |
Q1 | Rondae Hollis-Jefferson | SF | 2 | 3 | |
Q1 | Shane Larkin | PG | 2 | 7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packages <- #need all of these installed including some from github | |
c('dplyr', | |
'magrittr', | |
'jsonlite', | |
'tidyr', | |
'stringr', | |
'data.table', | |
'tidyr') | |
options(warn = -1) | |
lapply(packages, library, character.only = T) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installation | |
#install.packages("devtools") | |
devtools::install_github("rich-iannone/DiagrammeR") | |
library(DiagrammeR) | |
# Create a graph of border coordinates | |
country_graph <- country_graph() | |
# Read in a CSV with location and population data for cities all over the world |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' GET NBA PLAYER SHOT DETAIL DATA | |
#' | |
#' @param player | |
#' @param year_season_end | |
#' @param use_shot_zone_side | |
#' @param season_type | |
#' @param shot_types | |
#' @param shot_areas | |
#' @param vs_conference | |
#' @param vs_division |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packages <- #need all of these installed including some from github | |
c( | |
'dplyr', | |
'magrittr', | |
'jsonlite', | |
'tidyr', | |
'stringr', | |
'tidyr' | |
) | |
options(warn = -1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set a seed | |
set.seed(500) | |
library(MASS) | |
data <- Boston | |
# Check that no data is missing | |
apply(data,2,function(x) sum(is.na(x))) | |
# Train-test random splitting for linear model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' NBA Player Shot Chart | |
#' | |
#' @param player name the player, must be exact | |
#' @param author, year_end_season: numeric end of season | |
#' | |
#' @return | |
#' @export | |
#' | |
#' @examples boggie_bog <- plot_player_shot_chart(player = "Bojan Bogdanovic", | |
#year_season_end = 2015, exclude_backcourt = T |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"x" | |
"1" "5r Amendments: lf(i) the Company receives a Partial Loan Increase (ii) the Company does not receive a Commitment prior to the Outside Date or (iii) a Failure to Close occurs, then the Current Agreement shall automatically be amended as of the Closing Date (in the case ofa Partial Loan Increase), the Outside Date (in the case ofa failure to receive a Commitment) or the funding ofthe Balance Payment (in the case ofa Failure to Close), as applicable, by deleting Section 8.2 ofthe Current Agreement in its entirety and replacing it with the following: “Section 8.2 Distributions ofNet Cash Plow and Capital Proceeds. All Net Cash Flow and all Capital Proceeds shall be distributed in the following order of priority: .(a) m, l00% to the Carlyle Member andthe HFZ Member, pro rata in accordance with their Capital Sharing Ratios, until thc Carlyle Member has received distributions sufficient to achieve an Internal Rate of Return on its Capital Contributions equal to |2%; then (b) Second, (i) 85% to the Carlyle M |