# 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 datablackrock_etf_data
mini_blackrock_data <- blackrock_etf_data |># group by whether the fund is an ESG fund or notgroup_by(is_esg) |># take the top 5 from each group, by net assetsslice_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
# 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 leftfilter(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 leftfilter(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
# 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 fundsmini_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 incomemini_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 wantselect(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 wantselect(name, is_esg, incept_date) |># use mdy() from the lubridate package to turn the character string into a date objectmutate(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 wantselect(name, is_esg, incept_date) |># use mdy() from the lubridate package to turn the character string into a date objectmutate(incept_date = lubridate::mdy(incept_date),# extract the year from the dateincept_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 MNmini_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
# 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 classmini_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.
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()
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
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.