BlackRock’s ESG ETF

Author

Okung Obang

Part I: Loading R Packages

Load R Packages

library(tidyverse)
Warning: package 'tidyverse' was built under R version 4.2.2
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
✔ ggplot2 3.4.0     ✔ purrr   1.0.1
✔ tibble  3.1.8     ✔ dplyr   1.1.0
✔ tidyr   1.3.0     ✔ stringr 1.5.0
✔ readr   2.1.2     ✔ forcats 0.5.2
Warning: package 'ggplot2' was built under R version 4.2.2
Warning: package 'tidyr' was built under R version 4.2.2
Warning: package 'purrr' was built under R version 4.2.2
Warning: package 'dplyr' was built under R version 4.2.2
Warning: package 'stringr' was built under R version 4.2.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()

Load Data

# assign the url to `github_raw_csv_url`
github_raw_csv_url <- "https://raw.githubusercontent.com/t-emery/sais-susfin_data/main/datasets/blackrock_etf_screener_2022-08-30.csv"

# read in the data, and assign it to the object `blackrock_etf_data`
blackrock_etf_data <- read_csv(github_raw_csv_url)
Rows: 393 Columns: 22
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (14): ticker, name, incept_date, net_assets_as_of, asset_class, sub_asse...
dbl  (8): gross_expense_ratio_percent, net_expense_ratio_percent, net_assets...

ℹ 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.

Print out tibble

# print out the tibble to take a look at the data
blackrock_etf_data
# A tibble: 393 × 22
   ticker name    incep…¹ gross…² net_e…³ net_a…⁴ net_a…⁵ asset…⁶ sub_a…⁷ region
   <chr>  <chr>   <chr>     <dbl>   <dbl>   <dbl> <chr>   <chr>   <chr>   <chr> 
 1 IVV    iShare… 5/15/00    0.03    0.03 297663. 8/30/22 Equity  Large … North…
 2 IEFA   iShare… 10/18/…    0.07    0.07  84222. 8/30/22 Equity  All Cap Global
 3 AGG    iShare… 9/22/03    0.04    0.03  82344. 8/30/22 Fixed … Multi … North…
 4 IJR    iShare… 5/22/00    0.06    0.06  66533. 8/30/22 Equity  Small … North…
 5 IEMG   iShare… 10/18/…    0.09    0.09  64920. 8/30/22 Equity  All Cap Global
 6 IWF    iShare… 5/22/00    0.18    0.18  61831. 8/30/22 Equity  Large/… North…
 7 IJH    iShare… 5/22/00    0.05    0.05  61424. 8/30/22 Equity  Mid Cap North…
 8 IWM    iShare… 5/22/00    0.19    0.19  53048. 8/30/22 Equity  Small … North…
 9 IWD    iShare… 5/22/00    0.18    0.18  51913. 8/30/22 Equity  Large/… North…
10 EFA    iShare… 8/14/01    0.32    0.32  44144. 8/30/22 Equity  Large/… Global
# … with 383 more rows, 12 more variables: market <chr>, location <chr>,
#   investment_style <chr>,
#   sustainability_characteristics_msci_esg_fund_ratings_msci_esg_fund_rating_aaa_ccc <chr>,
#   msci_esg_quality_score_0_10 <dbl>,
#   msci_weighted_average_carbon_intensity_tons_co2e_m_sales <dbl>,
#   msci_esg_percent_coverage <dbl>, sustainable_classification <chr>,
#   name_wo_ishares_etf <chr>, is_esg <chr>, years_from_inception <dbl>, …

Glimpse BlackRock data

glimpse(blackrock_etf_data)
Rows: 393
Columns: 22
$ ticker                                                                            <chr> …
$ name                                                                              <chr> …
$ incept_date                                                                       <chr> …
$ gross_expense_ratio_percent                                                       <dbl> …
$ net_expense_ratio_percent                                                         <dbl> …
$ net_assets_usd_mn                                                                 <dbl> …
$ net_assets_as_of                                                                  <chr> …
$ asset_class                                                                       <chr> …
$ sub_asset_class                                                                   <chr> …
$ region                                                                            <chr> …
$ market                                                                            <chr> …
$ location                                                                          <chr> …
$ investment_style                                                                  <chr> …
$ sustainability_characteristics_msci_esg_fund_ratings_msci_esg_fund_rating_aaa_ccc <chr> …
$ msci_esg_quality_score_0_10                                                       <dbl> …
$ msci_weighted_average_carbon_intensity_tons_co2e_m_sales                          <dbl> …
$ msci_esg_percent_coverage                                                         <dbl> …
$ sustainable_classification                                                        <chr> …
$ name_wo_ishares_etf                                                               <chr> …
$ is_esg                                                                            <chr> …
$ years_from_inception                                                              <dbl> …
$ year_launched                                                                     <dbl> …

Part II: Dplyr

Creating a mini-data set from BlackRock’s data

Create Mini-Data Set

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()
Adding missing grouping variables: `is_esg`
mini_blackrock_data
# A tibble: 10 × 9
   is_esg       ticker name       asset…¹ sub_a…² region incep…³ net_a…⁴ co2_i…⁵
   <chr>        <chr>  <chr>      <chr>   <chr>   <chr>  <chr>     <dbl>   <dbl>
 1 ESG Fund     ESGU   iShares E… Equity  Large/… North… 12/1/16  22377.   104. 
 2 ESG Fund     ESGD   iShares E… Equity  Large/… Global 6/28/16   6426.   104. 
 3 ESG Fund     ICLN   iShares G… Equity  All Cap Global 6/24/08   5628.   266. 
 4 ESG Fund     ESGE   iShares E… Equity  Large/… Global 6/28/16   4234.   168. 
 5 ESG Fund     DSI    iShares M… Equity  Large/… North… 11/14/…   3689.    72.7
 6 Regular Fund IVV    iShares C… Equity  Large … North… 5/15/00 297663.   148. 
 7 Regular Fund IEFA   iShares C… Equity  All Cap Global 10/18/…  84222.   127. 
 8 Regular Fund AGG    iShares C… Fixed … Multi … North… 9/22/03  82344.   283. 
 9 Regular Fund IJR    iShares C… Equity  Small … North… 5/22/00  66533.   133. 
10 Regular Fund IEMG   iShares C… Equity  All Cap Global 10/18/…  64920.   369. 
# … with abbreviated variable names ¹​asset_class, ²​sub_asset_class,
#   ³​incept_date, ⁴​net_assets_usd_mn, ⁵​co2_intensity

Viewing data with glimpse

mini_blackrock_data |> glimpse()
Rows: 10
Columns: 9
$ is_esg            <chr> "ESG Fund", "ESG Fund", "ESG Fund", "ESG Fund", "ESG…
$ ticker            <chr> "ESGU", "ESGD", "ICLN", "ESGE", "DSI", "IVV", "IEFA"…
$ name              <chr> "iShares ESG Aware MSCI USA ETF", "iShares ESG Aware…
$ asset_class       <chr> "Equity", "Equity", "Equity", "Equity", "Equity", "E…
$ sub_asset_class   <chr> "Large/Mid Cap", "Large/Mid Cap", "All Cap", "Large/…
$ region            <chr> "North America", "Global", "Global", "Global", "Nort…
$ incept_date       <chr> "12/1/16", "6/28/16", "6/24/08", "6/28/16", "11/14/0…
$ net_assets_usd_mn <dbl> 22376.688, 6425.673, 5628.011, 4233.544, 3688.930, 2…
$ co2_intensity     <dbl> 103.60, 103.83, 265.82, 167.71, 72.73, 148.34, 126.6…

Dplyr Commands

Verb 1: select()

mini_blackrock_data |>
  select(is_esg, name, net_assets_usd_mn)
# A tibble: 10 × 3
   is_esg       name                                   net_assets_usd_mn
   <chr>        <chr>                                              <dbl>
 1 ESG Fund     iShares ESG Aware MSCI USA ETF                    22377.
 2 ESG Fund     iShares ESG Aware MSCI EAFE ETF                    6426.
 3 ESG Fund     iShares Global Clean Energy ETF                    5628.
 4 ESG Fund     iShares ESG Aware MSCI EM ETF                      4234.
 5 ESG Fund     iShares MSCI KLD 400 Social ETF                    3689.
 6 Regular Fund iShares Core S&P 500 ETF                         297663.
 7 Regular Fund iShares Core MSCI EAFE ETF                        84222.
 8 Regular Fund iShares Core U.S. Aggregate Bond ETF              82344.
 9 Regular Fund iShares Core S&P Small-Cap ETF                    66533.
10 Regular Fund iShares Core MSCI Emerging Markets ETF            64920.
mini_blackrock_data |>
  select(contains("asset"))
# A tibble: 10 × 3
   asset_class  sub_asset_class net_assets_usd_mn
   <chr>        <chr>                       <dbl>
 1 Equity       Large/Mid Cap              22377.
 2 Equity       Large/Mid Cap               6426.
 3 Equity       All Cap                     5628.
 4 Equity       Large/Mid Cap               4234.
 5 Equity       Large/Mid Cap               3689.
 6 Equity       Large Cap                 297663.
 7 Equity       All Cap                    84222.
 8 Fixed Income Multi Sectors              82344.
 9 Equity       Small Cap                  66533.
10 Equity       All Cap                    64920.

Now You Try:

# Select the columns with fund name, ESG characteristic, and asset class.
mini_blackrock_data |>
  select(name, is_esg, asset_class)
# A tibble: 10 × 3
   name                                   is_esg       asset_class 
   <chr>                                  <chr>        <chr>       
 1 iShares ESG Aware MSCI USA ETF         ESG Fund     Equity      
 2 iShares ESG Aware MSCI EAFE ETF        ESG Fund     Equity      
 3 iShares Global Clean Energy ETF        ESG Fund     Equity      
 4 iShares ESG Aware MSCI EM ETF          ESG Fund     Equity      
 5 iShares MSCI KLD 400 Social ETF        ESG Fund     Equity      
 6 iShares Core S&P 500 ETF               Regular Fund Equity      
 7 iShares Core MSCI EAFE ETF             Regular Fund Equity      
 8 iShares Core U.S. Aggregate Bond ETF   Regular Fund Fixed Income
 9 iShares Core S&P Small-Cap ETF         Regular Fund Equity      
10 iShares Core MSCI Emerging Markets ETF Regular Fund Equity      

Verb 2: filter()

Equals: ==

mini_blackrock_data |>
  # note that it uses `==` not `=`
  filter(is_esg == "ESG Fund")
# A tibble: 5 × 9
  is_esg   ticker name            asset…¹ sub_a…² region incep…³ net_a…⁴ co2_i…⁵
  <chr>    <chr>  <chr>           <chr>   <chr>   <chr>  <chr>     <dbl>   <dbl>
1 ESG Fund ESGU   iShares ESG Aw… Equity  Large/… North… 12/1/16  22377.   104. 
2 ESG Fund ESGD   iShares ESG Aw… Equity  Large/… Global 6/28/16   6426.   104. 
3 ESG Fund ICLN   iShares Global… Equity  All Cap Global 6/24/08   5628.   266. 
4 ESG Fund ESGE   iShares ESG Aw… Equity  Large/… Global 6/28/16   4234.   168. 
5 ESG Fund DSI    iShares MSCI K… Equity  Large/… North… 11/14/…   3689.    72.7
# … with abbreviated variable names ¹​asset_class, ²​sub_asset_class,
#   ³​incept_date, ⁴​net_assets_usd_mn, ⁵​co2_intensity

Greater than, Less than: > or <

mini_blackrock_data |>
  # column name goes on the left
  filter(net_assets_usd_mn > 10000)
# A tibble: 6 × 9
  is_esg       ticker name        asset…¹ sub_a…² region incep…³ net_a…⁴ co2_i…⁵
  <chr>        <chr>  <chr>       <chr>   <chr>   <chr>  <chr>     <dbl>   <dbl>
1 ESG Fund     ESGU   iShares ES… Equity  Large/… North… 12/1/16  22377.    104.
2 Regular Fund IVV    iShares Co… Equity  Large … North… 5/15/00 297663.    148.
3 Regular Fund IEFA   iShares Co… Equity  All Cap Global 10/18/…  84222.    127.
4 Regular Fund AGG    iShares Co… Fixed … Multi … North… 9/22/03  82344.    283.
5 Regular Fund IJR    iShares Co… Equity  Small … North… 5/22/00  66533.    133.
6 Regular Fund IEMG   iShares Co… Equity  All Cap Global 10/18/…  64920.    369.
# … with abbreviated variable names ¹​asset_class, ²​sub_asset_class,
#   ³​incept_date, ⁴​net_assets_usd_mn, ⁵​co2_intensity
mini_blackrock_data |>
  # column name goes on the left
  filter(net_assets_usd_mn < 10000)
# A tibble: 4 × 9
  is_esg   ticker name            asset…¹ sub_a…² region incep…³ net_a…⁴ co2_i…⁵
  <chr>    <chr>  <chr>           <chr>   <chr>   <chr>  <chr>     <dbl>   <dbl>
1 ESG Fund ESGD   iShares ESG Aw… Equity  Large/… Global 6/28/16   6426.   104. 
2 ESG Fund ICLN   iShares Global… Equity  All Cap Global 6/24/08   5628.   266. 
3 ESG Fund ESGE   iShares ESG Aw… Equity  Large/… Global 6/28/16   4234.   168. 
4 ESG Fund DSI    iShares MSCI K… Equity  Large/… North… 11/14/…   3689.    72.7
# … with abbreviated variable names ¹​asset_class, ²​sub_asset_class,
#   ³​incept_date, ⁴​net_assets_usd_mn, ⁵​co2_intensity

Selecting more than one variable:

mini_blackrock_data |> 
  filter(ticker %in% c("ESGU", "IVV", "DSI"))
# A tibble: 3 × 9
  is_esg       ticker name        asset…¹ sub_a…² region incep…³ net_a…⁴ co2_i…⁵
  <chr>        <chr>  <chr>       <chr>   <chr>   <chr>  <chr>     <dbl>   <dbl>
1 ESG Fund     ESGU   iShares ES… Equity  Large/… North… 12/1/16  22377.   104. 
2 ESG Fund     DSI    iShares MS… Equity  Large/… North… 11/14/…   3689.    72.7
3 Regular Fund IVV    iShares Co… Equity  Large … North… 5/15/00 297663.   148. 
# … with abbreviated variable names ¹​asset_class, ²​sub_asset_class,
#   ³​incept_date, ⁴​net_assets_usd_mn, ⁵​co2_intensity

Now You Try:

# Filter for 1) ESG funds
mini_blackrock_data |>
  filter(is_esg == "ESG Fund")
# A tibble: 5 × 9
  is_esg   ticker name            asset…¹ sub_a…² region incep…³ net_a…⁴ co2_i…⁵
  <chr>    <chr>  <chr>           <chr>   <chr>   <chr>  <chr>     <dbl>   <dbl>
1 ESG Fund ESGU   iShares ESG Aw… Equity  Large/… North… 12/1/16  22377.   104. 
2 ESG Fund ESGD   iShares ESG Aw… Equity  Large/… Global 6/28/16   6426.   104. 
3 ESG Fund ICLN   iShares Global… Equity  All Cap Global 6/24/08   5628.   266. 
4 ESG Fund ESGE   iShares ESG Aw… Equity  Large/… Global 6/28/16   4234.   168. 
5 ESG Fund DSI    iShares MSCI K… Equity  Large/… North… 11/14/…   3689.    72.7
# … with abbreviated variable names ¹​asset_class, ²​sub_asset_class,
#   ³​incept_date, ⁴​net_assets_usd_mn, ⁵​co2_intensity
# Filter for 2) fixed income
mini_blackrock_data |>
  filter(asset_class == "Fixed Income")
# A tibble: 1 × 9
  is_esg       ticker name        asset…¹ sub_a…² region incep…³ net_a…⁴ co2_i…⁵
  <chr>        <chr>  <chr>       <chr>   <chr>   <chr>  <chr>     <dbl>   <dbl>
1 Regular Fund AGG    iShares Co… Fixed … Multi … North… 9/22/03  82344.    283.
# … with abbreviated variable names ¹​asset_class, ²​sub_asset_class,
#   ³​incept_date, ⁴​net_assets_usd_mn, ⁵​co2_intensity

Verb 3: mutate()

mini_blackrock_data |> 
  #select the columns we want
  select(name, is_esg, incept_date) 
# A tibble: 10 × 3
   name                                   is_esg       incept_date
   <chr>                                  <chr>        <chr>      
 1 iShares ESG Aware MSCI USA ETF         ESG Fund     12/1/16    
 2 iShares ESG Aware MSCI EAFE ETF        ESG Fund     6/28/16    
 3 iShares Global Clean Energy ETF        ESG Fund     6/24/08    
 4 iShares ESG Aware MSCI EM ETF          ESG Fund     6/28/16    
 5 iShares MSCI KLD 400 Social ETF        ESG Fund     11/14/06   
 6 iShares Core S&P 500 ETF               Regular Fund 5/15/00    
 7 iShares Core MSCI EAFE ETF             Regular Fund 10/18/12   
 8 iShares Core U.S. Aggregate Bond ETF   Regular Fund 9/22/03    
 9 iShares Core S&P Small-Cap ETF         Regular Fund 5/22/00    
10 iShares Core MSCI Emerging Markets ETF Regular Fund 10/18/12   
mini_blackrock_data |> 
  #select the columns we want
  select(name, is_esg, incept_date) |> 
  # use mdy() from the lubridate package to turn the character string into a date object
  mutate(incept_date = lubridate::mdy(incept_date))
# A tibble: 10 × 3
   name                                   is_esg       incept_date
   <chr>                                  <chr>        <date>     
 1 iShares ESG Aware MSCI USA ETF         ESG Fund     2016-12-01 
 2 iShares ESG Aware MSCI EAFE ETF        ESG Fund     2016-06-28 
 3 iShares Global Clean Energy ETF        ESG Fund     2008-06-24 
 4 iShares ESG Aware MSCI EM ETF          ESG Fund     2016-06-28 
 5 iShares MSCI KLD 400 Social ETF        ESG Fund     2006-11-14 
 6 iShares Core S&P 500 ETF               Regular Fund 2000-05-15 
 7 iShares Core MSCI EAFE ETF             Regular Fund 2012-10-18 
 8 iShares Core U.S. Aggregate Bond ETF   Regular Fund 2003-09-22 
 9 iShares Core S&P Small-Cap ETF         Regular Fund 2000-05-22 
10 iShares Core MSCI Emerging Markets ETF Regular Fund 2012-10-18 
mini_blackrock_data |> 
  #select the columns we want
  select(name, is_esg, incept_date) |> 
  # use mdy() from the lubridate package to turn the character string into a date object
  mutate(incept_date = lubridate::mdy(incept_date),
         # extract the year from the date
         incept_year = lubridate::year(incept_date),
         # calculate how many years since the fund was launched.
         years_since_incept = lubridate::interval(incept_date, Sys.Date())/lubridate::years(1))
# A tibble: 10 × 5
   name                                   is_esg      incept_d…¹ incep…² years…³
   <chr>                                  <chr>       <date>       <dbl>   <dbl>
 1 iShares ESG Aware MSCI USA ETF         ESG Fund    2016-12-01    2016    6.2 
 2 iShares ESG Aware MSCI EAFE ETF        ESG Fund    2016-06-28    2016    6.63
 3 iShares Global Clean Energy ETF        ESG Fund    2008-06-24    2008   14.6 
 4 iShares ESG Aware MSCI EM ETF          ESG Fund    2016-06-28    2016    6.63
 5 iShares MSCI KLD 400 Social ETF        ESG Fund    2006-11-14    2006   16.2 
 6 iShares Core S&P 500 ETF               Regular Fu… 2000-05-15    2000   22.7 
 7 iShares Core MSCI EAFE ETF             Regular Fu… 2012-10-18    2012   10.3 
 8 iShares Core U.S. Aggregate Bond ETF   Regular Fu… 2003-09-22    2003   19.4 
 9 iShares Core S&P Small-Cap ETF         Regular Fu… 2000-05-22    2000   22.7 
10 iShares Core MSCI Emerging Markets ETF Regular Fu… 2012-10-18    2012   10.3 
# … with abbreviated variable names ¹​incept_date, ²​incept_year,
#   ³​years_since_incept

Now You Try:

# Create net assets in BN from net assets in MN

mini_blackrock_data |>
  select(name, is_esg,net_assets_usd_mn) |>
  mutate(net_assets_usd_bn = net_assets_usd_mn/100)
# A tibble: 10 × 4
   name                                   is_esg       net_assets_usd_mn net_a…¹
   <chr>                                  <chr>                    <dbl>   <dbl>
 1 iShares ESG Aware MSCI USA ETF         ESG Fund                22377.   224. 
 2 iShares ESG Aware MSCI EAFE ETF        ESG Fund                 6426.    64.3
 3 iShares Global Clean Energy ETF        ESG Fund                 5628.    56.3
 4 iShares ESG Aware MSCI EM ETF          ESG Fund                 4234.    42.3
 5 iShares MSCI KLD 400 Social ETF        ESG Fund                 3689.    36.9
 6 iShares Core S&P 500 ETF               Regular Fund           297663.  2977. 
 7 iShares Core MSCI EAFE ETF             Regular Fund            84222.   842. 
 8 iShares Core U.S. Aggregate Bond ETF   Regular Fund            82344.   823. 
 9 iShares Core S&P Small-Cap ETF         Regular Fund            66533.   665. 
10 iShares Core MSCI Emerging Markets ETF Regular Fund            64920.   649. 
# … with abbreviated variable name ¹​net_assets_usd_bn

Verb 4: arrange()

mini_blackrock_data |> 
  arrange(co2_intensity)
# A tibble: 10 × 9
   is_esg       ticker name       asset…¹ sub_a…² region incep…³ net_a…⁴ co2_i…⁵
   <chr>        <chr>  <chr>      <chr>   <chr>   <chr>  <chr>     <dbl>   <dbl>
 1 ESG Fund     DSI    iShares M… Equity  Large/… North… 11/14/…   3689.    72.7
 2 ESG Fund     ESGU   iShares E… Equity  Large/… North… 12/1/16  22377.   104. 
 3 ESG Fund     ESGD   iShares E… Equity  Large/… Global 6/28/16   6426.   104. 
 4 Regular Fund IEFA   iShares C… Equity  All Cap Global 10/18/…  84222.   127. 
 5 Regular Fund IJR    iShares C… Equity  Small … North… 5/22/00  66533.   133. 
 6 Regular Fund IVV    iShares C… Equity  Large … North… 5/15/00 297663.   148. 
 7 ESG Fund     ESGE   iShares E… Equity  Large/… Global 6/28/16   4234.   168. 
 8 ESG Fund     ICLN   iShares G… Equity  All Cap Global 6/24/08   5628.   266. 
 9 Regular Fund AGG    iShares C… Fixed … Multi … North… 9/22/03  82344.   283. 
10 Regular Fund IEMG   iShares C… Equity  All Cap Global 10/18/…  64920.   369. 
# … with abbreviated variable names ¹​asset_class, ²​sub_asset_class,
#   ³​incept_date, ⁴​net_assets_usd_mn, ⁵​co2_intensity
mini_blackrock_data |> 
  arrange(co2_intensity |> desc())
# A tibble: 10 × 9
   is_esg       ticker name       asset…¹ sub_a…² region incep…³ net_a…⁴ co2_i…⁵
   <chr>        <chr>  <chr>      <chr>   <chr>   <chr>  <chr>     <dbl>   <dbl>
 1 Regular Fund IEMG   iShares C… Equity  All Cap Global 10/18/…  64920.   369. 
 2 Regular Fund AGG    iShares C… Fixed … Multi … North… 9/22/03  82344.   283. 
 3 ESG Fund     ICLN   iShares G… Equity  All Cap Global 6/24/08   5628.   266. 
 4 ESG Fund     ESGE   iShares E… Equity  Large/… Global 6/28/16   4234.   168. 
 5 Regular Fund IVV    iShares C… Equity  Large … North… 5/15/00 297663.   148. 
 6 Regular Fund IJR    iShares C… Equity  Small … North… 5/22/00  66533.   133. 
 7 Regular Fund IEFA   iShares C… Equity  All Cap Global 10/18/…  84222.   127. 
 8 ESG Fund     ESGD   iShares E… Equity  Large/… Global 6/28/16   6426.   104. 
 9 ESG Fund     ESGU   iShares E… Equity  Large/… North… 12/1/16  22377.   104. 
10 ESG Fund     DSI    iShares M… Equity  Large/… North… 11/14/…   3689.    72.7
# … with abbreviated variable names ¹​asset_class, ²​sub_asset_class,
#   ³​incept_date, ⁴​net_assets_usd_mn, ⁵​co2_intensity
mini_blackrock_data |> 
  arrange(is_esg,co2_intensity |> desc())
# A tibble: 10 × 9
   is_esg       ticker name       asset…¹ sub_a…² region incep…³ net_a…⁴ co2_i…⁵
   <chr>        <chr>  <chr>      <chr>   <chr>   <chr>  <chr>     <dbl>   <dbl>
 1 ESG Fund     ICLN   iShares G… Equity  All Cap Global 6/24/08   5628.   266. 
 2 ESG Fund     ESGE   iShares E… Equity  Large/… Global 6/28/16   4234.   168. 
 3 ESG Fund     ESGD   iShares E… Equity  Large/… Global 6/28/16   6426.   104. 
 4 ESG Fund     ESGU   iShares E… Equity  Large/… North… 12/1/16  22377.   104. 
 5 ESG Fund     DSI    iShares M… Equity  Large/… North… 11/14/…   3689.    72.7
 6 Regular Fund IEMG   iShares C… Equity  All Cap Global 10/18/…  64920.   369. 
 7 Regular Fund AGG    iShares C… Fixed … Multi … North… 9/22/03  82344.   283. 
 8 Regular Fund IVV    iShares C… Equity  Large … North… 5/15/00 297663.   148. 
 9 Regular Fund IJR    iShares C… Equity  Small … North… 5/22/00  66533.   133. 
10 Regular Fund IEFA   iShares C… Equity  All Cap Global 10/18/…  84222.   127. 
# … with abbreviated variable names ¹​asset_class, ²​sub_asset_class,
#   ³​incept_date, ⁴​net_assets_usd_mn, ⁵​co2_intensity

Now You Try:

# Arrange funds by asset class and size.
mini_blackrock_data |>
  mutate(net_assets_usd_bn = net_assets_usd_mn/100)|>
  select(name, asset_class, net_assets_usd_bn) |>
  arrange(asset_class, net_assets_usd_bn |> desc())
# A tibble: 10 × 3
   name                                   asset_class  net_assets_usd_bn
   <chr>                                  <chr>                    <dbl>
 1 iShares Core S&P 500 ETF               Equity                  2977. 
 2 iShares Core MSCI EAFE ETF             Equity                   842. 
 3 iShares Core S&P Small-Cap ETF         Equity                   665. 
 4 iShares Core MSCI Emerging Markets ETF Equity                   649. 
 5 iShares ESG Aware MSCI USA ETF         Equity                   224. 
 6 iShares ESG Aware MSCI EAFE ETF        Equity                    64.3
 7 iShares Global Clean Energy ETF        Equity                    56.3
 8 iShares ESG Aware MSCI EM ETF          Equity                    42.3
 9 iShares MSCI KLD 400 Social ETF        Equity                    36.9
10 iShares Core U.S. Aggregate Bond ETF   Fixed Income             823. 

The second largest fixed income fund is ~

Verb 5: summarize()

mini_blackrock_data |> 
  summarize(sum_assets_mn = sum(net_assets_usd_mn),
            avg_assets_mn = mean(net_assets_usd_mn))
# A tibble: 1 × 2
  sum_assets_mn avg_assets_mn
          <dbl>         <dbl>
1       638036.        63804.

Now You Try:

# Find the median of carbon intensity of the funds
mini_blackrock_data |>
  summarize(med_co2_intensity = median(co2_intensity))
# A tibble: 1 × 1
  med_co2_intensity
              <dbl>
1              141.

Verb 6: group_by()

mini_blackrock_data |> 
  group_by(is_esg) |> 
  summarize(sum_assets_mn = sum(net_assets_usd_mn),
            avg_assets_mn = mean(net_assets_usd_mn))
# A tibble: 2 × 3
  is_esg       sum_assets_mn avg_assets_mn
  <chr>                <dbl>         <dbl>
1 ESG Fund            42353.         8471.
2 Regular Fund       595683.       119137.

Now You Try:

# Calculate the average carbon intesity of the funds by asset class and sub asset class
mini_blackrock_data |>
  group_by(asset_class, sub_asset_class) |>
  summarize(avg_co2_intensity = mean(co2_intensity))
`summarise()` has grouped output by 'asset_class'. You can override using the
`.groups` argument.
# A tibble: 5 × 3
# Groups:   asset_class [2]
  asset_class  sub_asset_class avg_co2_intensity
  <chr>        <chr>                       <dbl>
1 Equity       All Cap                      254.
2 Equity       Large Cap                    148.
3 Equity       Large/Mid Cap                112.
4 Equity       Small Cap                    133.
5 Fixed Income Multi Sectors                283.

Homework

view(blackrock_etf_data)

Data Visualization I

asset_blackrock <- blackrock_etf_data |>
  group_by(asset_class) |>
  summarize(avg_net_assets_usd_mn = mean(net_assets_usd_mn))
ggplot(asset_blackrock, mapping=aes(x=asset_class, y=avg_net_assets_usd_mn, fill = asset_class)) + geom_col()

#ggplot(data = asset_blackrock) + 
  #geom_col(mapping = aes(x=asset_class, y=avg_net_assets_usd_mn))

From this visualization, we can understand that BlackRock holds the highest amount of average net assests, in millions of USD, in equity, followed by commodities, and then fixed income.

Data Visualization II

blackrock_etf_data |>
  group_by(region)
# A tibble: 393 × 22
# Groups:   region [7]
   ticker name    incep…¹ gross…² net_e…³ net_a…⁴ net_a…⁵ asset…⁶ sub_a…⁷ region
   <chr>  <chr>   <chr>     <dbl>   <dbl>   <dbl> <chr>   <chr>   <chr>   <chr> 
 1 IVV    iShare… 5/15/00    0.03    0.03 297663. 8/30/22 Equity  Large … North…
 2 IEFA   iShare… 10/18/…    0.07    0.07  84222. 8/30/22 Equity  All Cap Global
 3 AGG    iShare… 9/22/03    0.04    0.03  82344. 8/30/22 Fixed … Multi … North…
 4 IJR    iShare… 5/22/00    0.06    0.06  66533. 8/30/22 Equity  Small … North…
 5 IEMG   iShare… 10/18/…    0.09    0.09  64920. 8/30/22 Equity  All Cap Global
 6 IWF    iShare… 5/22/00    0.18    0.18  61831. 8/30/22 Equity  Large/… North…
 7 IJH    iShare… 5/22/00    0.05    0.05  61424. 8/30/22 Equity  Mid Cap North…
 8 IWM    iShare… 5/22/00    0.19    0.19  53048. 8/30/22 Equity  Small … North…
 9 IWD    iShare… 5/22/00    0.18    0.18  51913. 8/30/22 Equity  Large/… North…
10 EFA    iShare… 8/14/01    0.32    0.32  44144. 8/30/22 Equity  Large/… Global
# … with 383 more rows, 12 more variables: market <chr>, location <chr>,
#   investment_style <chr>,
#   sustainability_characteristics_msci_esg_fund_ratings_msci_esg_fund_rating_aaa_ccc <chr>,
#   msci_esg_quality_score_0_10 <dbl>,
#   msci_weighted_average_carbon_intensity_tons_co2e_m_sales <dbl>,
#   msci_esg_percent_coverage <dbl>, sustainable_classification <chr>,
#   name_wo_ishares_etf <chr>, is_esg <chr>, years_from_inception <dbl>, …
ggplot(blackrock_etf_data, mapping=aes(x=region, y = msci_weighted_average_carbon_intensity_tons_co2e_m_sales, fill=region)) + geom_col()
Warning: Removed 62 rows containing missing values (`position_stack()`).

Within this chart, we can note that within Blackrock’s ETF that the most carbon intensive regions is North America, followed by firms operating in multiple regions, then the Asia Pacific. But the underlying carbon intensity could be due to a number of reasons, such as owning more shares in NA companies and less in other regions, etc.

Data Visualization III

mini_blackrock_data |>
  group_by(is_esg)
# A tibble: 10 × 9
# Groups:   is_esg [2]
   is_esg       ticker name       asset…¹ sub_a…² region incep…³ net_a…⁴ co2_i…⁵
   <chr>        <chr>  <chr>      <chr>   <chr>   <chr>  <chr>     <dbl>   <dbl>
 1 ESG Fund     ESGU   iShares E… Equity  Large/… North… 12/1/16  22377.   104. 
 2 ESG Fund     ESGD   iShares E… Equity  Large/… Global 6/28/16   6426.   104. 
 3 ESG Fund     ICLN   iShares G… Equity  All Cap Global 6/24/08   5628.   266. 
 4 ESG Fund     ESGE   iShares E… Equity  Large/… Global 6/28/16   4234.   168. 
 5 ESG Fund     DSI    iShares M… Equity  Large/… North… 11/14/…   3689.    72.7
 6 Regular Fund IVV    iShares C… Equity  Large … North… 5/15/00 297663.   148. 
 7 Regular Fund IEFA   iShares C… Equity  All Cap Global 10/18/…  84222.   127. 
 8 Regular Fund AGG    iShares C… Fixed … Multi … North… 9/22/03  82344.   283. 
 9 Regular Fund IJR    iShares C… Equity  Small … North… 5/22/00  66533.   133. 
10 Regular Fund IEMG   iShares C… Equity  All Cap Global 10/18/…  64920.   369. 
# … with abbreviated variable names ¹​asset_class, ²​sub_asset_class,
#   ³​incept_date, ⁴​net_assets_usd_mn, ⁵​co2_intensity
ggplot(data = mini_blackrock_data) + geom_col(mapping = aes(x=is_esg, y=co2_intensity, fill= is_esg))

Within BlackRock’s minidata set, the average C02 intensity of an ESG fund is lower than a regular fund, confirming that ESG tend to produce less c02 emissions than a regular fund.