Rows: 537 Columns: 14
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (4): ticker, company_name, sector, esg_uw_ow
dbl (7): esg_etf, standard_etf, esg_tilt, esg_tilt_z_score, esg_tilt_rank, e...
lgl (3): in_esg_only, in_standard_only, in_on_index_only
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
ggplot(blackrock_esg_vs_non_esg_etf) +aes(x = esg_etf, y = standard_etf, colour = sector) +geom_point(shape =19, size =2) +geom_smooth(method ="loess", se =FALSE, color ="darkgrey") +scale_x_continuous(trans ="log10", labels = scales::comma) +scale_y_continuous(trans ="log10", labels = scales::comma) +labs(x ="Weight in ESG ETF (ESGU) [Log Scale]",y ="Weight in Standard ETF (IVV) [Log Scale]",title ="Large Cap American Equities ETFs: ESG vs. Non-ESG",subtitle ="A comparison of the holdings of BlackRock iShares ESGU and IVV",caption ="Visualization by Nadia Xing" ) +theme_minimal() +theme(legend.position ="bottom") +facet_wrap(vars(sector), ncol =3) +scale_color_brewer(palette ="Set2")
Warning: Transformation introduced infinite values in continuous x-axis
Warning: Transformation introduced infinite values in continuous y-axis
Warning: Transformation introduced infinite values in continuous x-axis
Warning: Transformation introduced infinite values in continuous y-axis
Warning in RColorBrewer::brewer.pal(n, pal): n too large, allowed maximum for palette Set2 is 8
Returning the palette you asked for with that many colors
# A tibble: 1,074 × 4
company_name sector fund_type weight
<chr> <chr> <chr> <dbl>
1 PRUDENTIAL FINANCIAL INC Financials ESG ETF (ESGU) 0.537
2 PRUDENTIAL FINANCIAL INC Financials Standard ETF (IV… 0.106
3 GENERAL MILLS INC Consumer Staples ESG ETF (ESGU) 0.552
4 GENERAL MILLS INC Consumer Staples Standard ETF (IV… 0.151
5 KELLOGG Consumer Staples ESG ETF (ESGU) 0.453
6 KELLOGG Consumer Staples Standard ETF (IV… 0.0592
7 AUTOMATIC DATA PROCESSING INC Information Technology ESG ETF (ESGU) 0.649
8 AUTOMATIC DATA PROCESSING INC Information Technology Standard ETF (IV… 0.312
9 ECOLAB INC Materials ESG ETF (ESGU) 0.441
10 ECOLAB INC Materials Standard ETF (IV… 0.118
# ℹ 1,064 more rows
library(dplyr)library(ggplot2)blackrock_esg_vs_non_esg_etf_long %>%filter(weight >=1& weight <=100) %>%ggplot() +aes(x = weight, y = company_name, colour = fund_type, size = weight) +geom_point(shape ="circle") +scale_color_manual(values =c(`ESG ETF (ESGU)`="green", `Standard ETF (IVV)`="gray")) +labs(x ="Weight", y ="Company Name", title ="Comparation of Weight in ESG and non-ESG", caption ="Nadia Xing") +theme_minimal()
Short Reflection: This chart shows different companies’ weight on ESG ETF and Standard ETF. We cans see that a majority of those companies put similar weight on this two kinds of ETF.
ggplot(blackrock_esg_vs_non_esg_etf) +aes(x = esg_etf, y = standard_etf) +#change the size and colourgeom_point(shape ="circle", size =1.5, colour ="green") +#change the size and colourgeom_smooth(span =0.75, color ="purple") +# format the axes to make the units clearscale_x_continuous(trans ="log10") +scale_y_continuous(trans ="log10") +#label the axes to clarify x and y titles labs(x ="ESG ETF", y ="Standard ETF") +theme_minimal()
Warning: Transformation introduced infinite values in continuous x-axis
Warning: Transformation introduced infinite values in continuous y-axis
Warning: Transformation introduced infinite values in continuous x-axis
Warning: Transformation introduced infinite values in continuous y-axis
`geom_smooth()` using method = 'loess' and formula = 'y ~ x'
library(dplyr)library(ggplot2)blackrock_esg_vs_non_esg_etf_long %>%filter(weight >=1& weight <=100) %>%ggplot(aes(x =reorder(company_name, -weight), y = weight, fill = fund_type)) +geom_bar(stat ="identity", position =position_dodge(), width =0.7) +scale_fill_manual(values =c(`ESG ETF (ESGU)`="green", `Standard ETF (IVV)`="darkgray")) +labs(x ="Company Name", y ="Weight", title ="Comparison of Company Weight in ESG vs. Non-ESG ETFs",subtitle ="Bar chart showing the weight distribution across companies", caption ="Data visualization by Nadia Xing") +theme_minimal() +theme(axis.text.x =element_text(angle =45, hjust =1))
Warning in RColorBrewer::brewer.pal(n, pal): n too large, allowed maximum for palette Set1 is 9
Returning the palette you asked for with that many colors