Last active
July 7, 2020 23:23
-
-
Save Tadge-Analytics/58a49896a5648175f95b3b61af67f653 to your computer and use it in GitHub Desktop.
Revisions
-
Tadge-Analytics revised this gist
Jul 7, 2020 . 1 changed file with 31 additions and 8 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,37 @@ library(tidyverse) library(lubridate) actuals <- seq.Date(today() - 400, today(), "day") %>% tibble(Date = .) %>% crossing( `Reporting Level 1` = paste0("Level 1_", LETTERS[1:3]), `Reporting Level 2` = paste0("Level 2_", LETTERS[1:3]), `Reporting Level 3` = paste0("Level 3_", LETTERS[1:4]), `Fund Strm` = c("CAPEX", "OPEX") ) %>% mutate(`SAP Version` = "ACTUALS", Amount = runif(n(), 2, 25)) budget <- seq.Date(today() - 400, today() + 400, "month") %>% tibble(Date = .) %>% mutate(Date = floor_date(Date, "month")) %>% crossing( `Reporting Level 1` = paste0("Level 1_", LETTERS[1:3]), `Reporting Level 2` = paste0("Level 2_", LETTERS[1:3]), `Reporting Level 3` = paste0("Level 3_", LETTERS[1:4]), `Fund Strm` = c("CAPEX", "OPEX") ) %>% mutate(`SAP Version` = "BUDGET", Amount = runif(n(), 2, 25)*30) bind_rows(actuals, budget) %>% openxlsx::write.xlsx("example data.xlsx", asTable = T) -
Tadge-Analytics revised this gist
Jul 6, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ library(tidyverse) library(lubridate) seq.Date(today() - 400, today() + 400, 1) %>% tibble(Date = .) %>% crossing( `Reporting Level 1` = paste0("Level 1_", LETTERS[1:3]), -
Tadge-Analytics created this gist
Jul 6, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ library(tidyverse) library(lubridate) seq.Date(today() - 500, today(), 1) %>% tibble(Date = .) %>% crossing( `Reporting Level 1` = paste0("Level 1_", LETTERS[1:3]), `Reporting Level 2` = paste0("Level 2_", LETTERS[1:5]), `Reporting Level 3` = paste0("Level 3_", LETTERS[1:10]), `Fund Strm` = c("CAPEX", "OPEX"), `SAP Version` = c("ACTUALS", "BUDGET") ) %>% mutate(Amount = runif(n(), 2, 25)) %>% openxlsx::write.xlsx("example data.xlsx", asTable = T)