Class 2 Data Visualization Homework
library(tidyverse)
github_raw_csv_url <- “https://raw.githubusercontent.com/t-emery/sais-susfin_data/main/datasets/blackrock_etf_screener_2022-08-30.csv”
blackrock_etf_data <- read_csv(github_raw_csv_url)
View(blackrock_etf_data)
?blackrock_etf_data
glimpse(blackrock_etf_data)
mini_blackrock_data <- blackrock_etf_data |> # group by whether the fund is an ESG fund or not group_by(is_esg) |> # take the top 5 from each group, by net assets slice_max(order_by = net_assets_usd_mn, n = 5) |> # select the following columns select(ticker, name, asset_class, sub_asset_class, region, incept_date, net_assets_usd_mn, msci_weighted_average_carbon_intensity_tons_co2e_m_sales) |> # rename to co2_intensity because the full name is a mouthful, if descriptive. rename(co2_intensity = msci_weighted_average_carbon_intensity_tons_co2e_m_sales) |> # always good to ungroup() if you’ve used a group_by(). We’ll discuss later. ungroup()
mini_blackrock_data
mini_blackrock_data |> glimpse()
ggplot(data = blackrock_etf_data) + geom_point(mapping = aes(x = is_esg, y = msci_weighted_average_carbon_intensity_tons_co2e_m_sales, color = region))
#this is interesting because it lets us know how carbon intensive ESG funds are versus regular funds. While it is interesting to see that ESG funds tend to be less carbon intensive than regular funds, there are some ESGs that are more carbon intensive than many regular funds. When looking at it by region, no strong conclusion can be made.
ggplot(data = blackrock_etf_data) + geom_bar(mapping = aes(x = year_launched, fill = is_esg))
#This is interesting because it shows the rise in new ESG funds over time. We can conclude that over the past 7 years ESG funds have risen steadily, with 2020 showing the largest new ESG funds founded.
ggplot(data = blackrock_etf_data) + geom_point(mapping = aes(x = market, y = net_assets_usd_mn, color = is_esg), position = “jitter”)
#There is a ton of important information that can be concluded from this chart. First, it can be seen that most funds are located in developed regions of the world. This makes sense because investors want to limit their risks. However, it is especially interesting that the majority of ESG funds are also in developed regions. One could make an argument that the S in ESG should make more ESG funds be in emerging regions. FInally, it can be seen that the largest funds are concentrated in developed regions. Again, this makes sense since developed regions have lower risks.