r2dii.data 0.1.0 is now on CRAN

This release includes new and improved datasets.

Mauro Lepore https://github.com/maurolepore
2020-06-03

Table of Contents


r2dii.data 0.1.0 is now on CRAN. r2dii.data provides public datasets to help you study how financial assets align to climate scenarios.

This release signals that r2dii.data is now maturing. You can install it from CRAN with:


install.packages("r2dii.data")

Then use it with:


library(r2dii.data)

I also use the package dplyr; it is not necessary but convenient.


library(dplyr)

All user-facing changes are listed in the changelog; here I’ll show the most important ones.

We fixed a bug in the dataset naics_classification; it now contains the correct data.


naics_classification
#> # A tibble: 1,057 x 4
#>      code naics_title                            sector     borderline
#>     <dbl> <chr>                                  <chr>      <lgl>     
#>  1 111110 soybean farming                        not in sc… FALSE     
#>  2 111120 oilseed (except soybean) farming       not in sc… FALSE     
#>  3 111130 dry pea and bean farming               not in sc… FALSE     
#>  4 111140 wheat farming                          not in sc… FALSE     
#>  5 111150 corn farming                           not in sc… FALSE     
#>  6 111160 rice farming                           not in sc… FALSE     
#>  7 111191 oilseed and grain combination farming  not in sc… FALSE     
#>  8 111199 all other grain farming                not in sc… FALSE     
#>  9 111211 potato farming                         not in sc… FALSE     
#> 10 111219 other vegetable (except potato) and m… not in sc… FALSE     
#> # … with 1,047 more rows

The dataset region_isos now includes the value “global” in the column region; it also gained the column source.


region_isos %>% filter(region == "global")
#> # A tibble: 206 x 3
#>    region isos  source  
#>    <chr>  <chr> <chr>   
#>  1 global bg    weo_2019
#>  2 global hr    weo_2019
#>  3 global cy    weo_2019
#>  4 global mt    weo_2019
#>  5 global ro    weo_2019
#>  6 global au    weo_2019
#>  7 global at    weo_2019
#>  8 global be    weo_2019
#>  9 global ca    weo_2019
#> 10 global cl    weo_2019
#> # … with 196 more rows

The dataset ald_demo gained the column ald_emission_factor_unit.


select(ald_demo, ald_emission_factor_unit)
#> # A tibble: 17,368 x 1
#>    ald_emission_factor_unit       
#>    <chr>                          
#>  1 tons of CO2 per per hour per MW
#>  2 tons of CO2 per per hour per MW
#>  3 tons of CO2 per per hour per MW
#>  4 tons of CO2 per per hour per MW
#>  5 tons of CO2 per per hour per MW
#>  6 tons of CO2 per per hour per MW
#>  7 tons of CO2 per per hour per MW
#>  8 tons of CO2 per per hour per MW
#>  9 tons of CO2 per per hour per MW
#> 10 tons of CO2 per per hour per MW
#> # … with 17,358 more rows

Finally, we added three new datasets: co2_intensity_scenario_demo, region_isos_demo, and scenario_demo_2020.


glimpse(region_isos_demo)
#> Rows: 334
#> Columns: 3
#> $ region <chr> "advanced economies", "advanced economies", "advance…
#> $ isos   <chr> "bg", "hr", "cy", "mt", "ro", "au", "at", "be", "ca"…
#> $ source <chr> "demo_2020", "demo_2020", "demo_2020", "demo_2020", …

glimpse(scenario_demo_2020)
#> Rows: 1,323
#> Columns: 8
#> $ scenario        <chr> "cps", "cps", "cps", "cps", "cps", "cps", "…
#> $ sector          <chr> "automotive", "automotive", "automotive", "…
#> $ technology      <chr> "electric", "hybrid", "ice", "electric", "h…
#> $ region          <chr> "global", "global", "global", "global", "gl…
#> $ year            <int> 2020, 2020, 2020, 2021, 2021, 2021, 2022, 2…
#> $ tmsr            <dbl> 1.000000, 1.000000, 1.000000, 1.120288, 1.1…
#> $ smsp            <dbl> 0.000000000, 0.000000000, 0.000000000, 0.00…
#> $ scenario_source <chr> "demo_2020", "demo_2020", "demo_2020", "dem…

glimpse(co2_intensity_scenario_demo)
#> Rows: 22
#> Columns: 7
#> $ scenario_source      <chr> "demo_2020", "demo_2020", "demo_2020",…
#> $ scenario             <chr> "demo", "demo", "demo", "demo", "demo"…
#> $ sector               <chr> "cement", "cement", "cement", "cement"…
#> $ region               <chr> "global", "global", "global", "global"…
#> $ year                 <dbl> 2020, 2021, 2022, 2023, 2024, 2025, 20…
#> $ emission_factor_unit <chr> "tons of CO2 per ton of Cement", "tons…
#> $ emission_factor      <dbl> 0.700000, 0.640000, 0.580000, 0.520000…

Acknowledgements

While this release includes commits from only a few of us (jdhoffa, maurolepore), it is thanks to ideas and feedback from many more colleagues at 2DII.

Citation

For attribution, please cite this work as

Lepore (2020, June 3). Data science at 2DII: r2dii.data 0.1.0 is now on CRAN. Retrieved from https://2degreesinvesting.github.io/posts/2020-06-03-r2dii-data-0-1-0/

BibTeX citation

@misc{lepore2020r2dii.data,
  author = {Lepore, Mauro},
  title = {Data science at 2DII: r2dii.data 0.1.0 is now on CRAN},
  url = {https://2degreesinvesting.github.io/posts/2020-06-03-r2dii-data-0-1-0/},
  year = {2020}
}