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
| {"request":{"command":"series","series_id":"EBA.LGEE-ALL.D.H"},"series":[{"series_id":"EBA.LGEE-ALL.D.H","name":"Demand for LG&E and KU Services Company as agent for Louisville Gas and Electric Company and Kentucky Utilities Company (LGEE), Hourly","units":"megawatthours","f":"H","description":"Timestamps follow the ISO8601 standard (https:\/\/en.wikipedia.org\/wiki\/ISO_8601). Hourly representations are provided in Universal Time.","start":"20150701T00Z","end":"20180201T16Z","updated":"2018-02-01T12:02:29-0500","data":[["20180201T16Z",4392],["20180201T15Z",4363],["20180201T14Z",4385],["20180201T13Z",4387],["20180201T12Z",4171],["20180201T11Z",3818],["20180201T10Z",3622],["20180201T09Z",3586],["20180201T08Z",3628],["20180201T07Z",3644],["20180201T06Z",3725],["20180201T05Z",3866],["20180201T04Z",4050],["20180201T03Z",4255],["20180201T02Z",4408],["20180201T01Z",4419],["20180201T00Z",4384],["20180131T23Z",4105],["20180131T22Z",4050],["20180131T21Z",4142],["20180131T20Z",4197],["20180131T19Z",4368],["20180131T18Z |
We can't make this file beautiful and searchable because it's too large.
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
| DateTime,Station,Temp,Humidity,Fcst_Time,Source | |
| 2015-01-01 00:00:00.000,KLOU,23,52,1900-01-01 00:00:00.000,Weather DB | |
| 2015-01-01 01:00:00.000,KLOU,23,55,1900-01-01 00:00:00.000,Weather DB | |
| 2015-01-01 02:00:00.000,KLOU,23,55,1900-01-01 00:00:00.000,Weather DB | |
| 2015-01-01 03:00:00.000,KLOU,23,57,1900-01-01 00:00:00.000,Weather DB | |
| 2015-01-01 04:00:00.000,KLOU,23,57,1900-01-01 00:00:00.000,Weather DB | |
| 2015-01-01 05:00:00.000,KLOU,24,58,1900-01-01 00:00:00.000,Weather DB | |
| 2015-01-01 06:00:00.000,KLOU,24,58,1900-01-01 00:00:00.000,Weather DB | |
| 2015-01-01 07:00:00.000,KLOU,23,63,1900-01-01 00:00:00.000,Weather DB | |
| 2015-01-01 08:00:00.000,KLOU,25,58,1900-01-01 00:00:00.000,Weather DB |
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
| pks <- c("forecast", "lubridate", "xts", "zoo", "ggplot2", "fpp2", "seasonal", "devtools", "dygraphs", "quantmod", "DT", "knitr", "rmarkdown", "shiny", "shinydashboard", "roxygen2") | |
| install.packages(pks[!pks %in% installed.packages()]) |
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(sqldf) | |
| a <- c(1, 3, 5, 7, 9) | |
| b <- c(1:3, 8:10) | |
| df <- data.frame(Both = union(a, b)) | |
| a <- data.frame(a = a) | |
| b <- data.frame(b = b) | |
| sqldf("SELECT df.*, a.a, b.b FROM df LEFT JOIN a ON df.Both = a.a LEFT JOIN b ON df.Both = b.b ORDER BY df.Both") |
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
| folder_walk <- function(currMonth = month, walk = -1, mydir = home_dir) { | |
| # requries lubridate | |
| # currMonth in format YYYYMM | |
| # walk as integer (+ve / -ve) | |
| # home_dir - filepath where date/time folders are based | |
| in_month <- as.Date(paste(substr(currMonth, 1, 4), substr(currMonth, 5, 6), "01", sep = "-")) | |
| out_month <- in_month | |
| lubridate::month(out_month) <- lubridate::month(in_month) + as.numeric(walk) | |
| folders <- data.frame(Number = formatC(seq(1:12), width = 2, format = "d", flag = "0"), Month = month.abb) | |
| folders <- dplyr::transmute(folders, Folder = paste(Number, Month, sep = "_")) |
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(RCurl); | |
| nb_url <- "https://gist.githubusercontent.com/Smudgerville/7e91e7fad887df4339090f1183be9967/raw/84c1b57453d1be7c3f381bbf7177233c5c83b0ba/r_notebook_web.yaml" | |
| nb_yaml <- readLines(nb_url) | |
| file.create("H:/Temp/Test_Notebook.Rmd") | |
| writeLines(nb_yaml, "H:/Temp/Test_Notebook.Rmd") |
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
| --- | |
| author: | |
| date: | |
| --- |
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
| --- | |
| title: "" | |
| date: "" | |
| output: | |
| html_notebook: | |
| fig_caption: yes | |
| highlight: textmate | |
| theme: cosmo | |
| toc: yes | |
| toc_depth: 4 |
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
| a <- paste(month.abb, "Binary", sep = "_") | |
| df <- data.frame(matrix(vector(), 0, 12, dimnames = list(c(), a)), stringsAsFactors = F) | |
| for(i in 1:length(month.abb)) { | |
| df[i,] <- as.numeric(substr(a, 1, 3)==month.abb[i]) | |
| } |
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
| qry_files <- list.files(paste0(home_dir, "/Queries"), full.names = T) | |
| for(i in 1:length(qry_files)) { | |
| # wouldn't work with periods in the actual file name | |
| assign(gsub("\\.(.*)", "", basename(qry_files))[i], readChar(qry_files[i], nchar = file.info(qry_files[i])$size)) | |
| } |
NewerOlder