generateDataTables <- function(rawDataCSV, benchmarkKeywords, subUniverseKeywords) {
filePath <- "~/Desktop/morningstar.csv"
sysKeyword <- "(Summary|Percentile|Sum|Average|Count|Maximum|Minimum|Median|Deviation)"
msciKeyword <-"MSCI"
ftseKeyword <-"(FTSE|Russell)"
stoxxKeyword <-"STOXX"
spdjKeyword <-"(S&P|Dow|DJ)"
esgKeywords <- '(Sustain|ESG|esg|SRI|sri|Social|Governance|Catholic|Ethical)'
envKeywords <-'(Water|Carbon|Climate|Enviro|Green|Energy|Renew|Tech|Fossil|Alternative|Clean|Fuel|Pollution|Prevention)'
blackrockKeyword <- '(iShare|BlackRock|BLK|Blackrock)'
sumF <- function(vec) {sum(as.numeric(gsub(",", "", as.character(vec))), na.rm=TRUE)}
toP <- function(c,d) {paste(as.character(c), "(",as.character(round(d*100,digits=1)),"%)",sep="")}
"^" <- function(x,y) ifelse(y==0,0,base:::"/"(x,y))
provider <- c("MSCI","FTSE Russell","STOXX","SPDJ")
esgIndexTotal <- c(82,5,35,67)
envIndexTotal <- c(7,34,5,11)
myPalette <- c("#722287","#0079C1","#009941","#002960")
fillTheme <- scale_fill_manual(values=myPalette)
colorTheme <- scale_color_manual(values=myPalette)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.