R/compareUniverse.R

Defines functions totalLandscapeSummary plotCountRatioForSubUniverse plotAUMRatioForSubUniverse

totalLandscapeSummary <- function(universe, subUniverse, benchmarkKeywords) {
  sum(esgTable$esgCount)
  sum(esgTable$fundsCount)
  sum(esgTable$esgCount)/sum(esgTable$fundsCount)
  sum(esgTable$esgAUM)/sum(esgTable$AUM)
}

plotCountRatioForSubUniverse <- function(universe, subuniverse, benchmarkKeywords) {
  esgTable %>%
    ggplot(aes(x=provider, y=esgRatio, fill=provider)) +
    geom_bar(stat="identity") +
    geom_label(fill='white',aes(label=round(esgRatio, digits=4))) +
    fillTheme
}

plotAUMRatioForSubUniverse <- function(universe, subuniverse, benchmarkKeywords) {
  esgTable %>%
    ggplot(aes(x=provider, y=aumRatio, fill=provider)) +
    geom_bar(stat="identity") +
    geom_label(fill='white',aes(label=round(aumRatio, digits=4))) +
    fillTheme
}
yezhaoqin/morningStarAnalytics documentation built on May 4, 2019, 2:32 p.m.