This file has been truncated, but you can view the full file.
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
| ZIP,LAT,LNG | |
| 00601,18.180555, -66.749961 | |
| 00602,18.361945, -67.175597 | |
| 00603,18.455183, -67.119887 | |
| 00606,18.158327, -66.932928 | |
| 00610,18.295366, -67.125135 | |
| 00612,18.402253, -66.711397 | |
| 00616,18.420412, -66.671979 | |
| 00617,18.447538, -66.557681 | |
| 00622,17.991245, -67.153993 |
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
| require(lubridate) | |
| require(quantmod) | |
| require(forecast) | |
| require(alphavantager) | |
| require(dplyr) | |
| require(plyr) | |
| require(purrr) | |
| #stock.data <- filtered.data[1:1000,] | |
| #output <- price.shift(stock.data) |
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
| -- Code came from the article here:' | |
| -- https://www.mssqltips.com/sqlservertip/4054/creating-a-date-dimension-or-calendar-table-in-sql-server/ | |
| --Declare temp table to drive later tables | |
| DECLARE @StartDate DATE = '20000101', @NumberOfYears INT = 30; | |
| -- prevent set or regional settings from interfering with | |
| -- interpretation of dates / literals | |
| SET DATEFIRST 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
| require(dplyr) | |
| require(stats) | |
| require(data.table) | |
| require(RODBC) | |
| require(DBI) | |
| require(RODBCext) | |
| #PULL CONNECTION | |
| my_connection <- odbcDriverConnect('driver={SQL Server};server=SERVER;database=DATABASE;trusted_connection=true') |
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
| require(gtrendsR) | |
| require(data.table) | |
| require(RODBC) | |
| #GTRENDS ACCOUNT INFORMATION | |
| usr <- "USERNAME" | |
| psw <- "PASSWORD" | |
| #PULL STUDIO DATA |
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
| #functions for altering your peceptions of standard daily OHLC values | |
| price.diff <- function(stock.data) { | |
| price <- stock.data$adj | |
| output <- vector() | |
| for (i in 1:length(price)) { | |
| if (i < 2) { | |
| output[i] <- 0 |
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
| require(arules) | |
| require(arulesViz) | |
| require(reshape2) | |
| require(gender) | |
| require(plyr) | |
| require(dplyr) | |
| require(ggplot2) | |
| transaction.data <- read.csv('fact table; transaction data with first and last customer names') | |
| customer.data <- read.csv('dim table; Customer information') |
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
| require(zoo) | |
| require(lubridate) | |
| require(forecast) | |
| require(RODBC) | |
| require(DBI) | |
| require(RODBCext) | |
| FN_ExecuteForecast <- function(myDataSet, myConnection) { | |
| #browser() | |
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
| require(rlang) | |
| require(rlanf) | |
| require(tibble) | |
| require(tidyr) | |
| require(tidyverse) | |
| require(xgboost) | |
| ############################### | |
| ## XGB OVERVIEW ## | |
| ############################### |