Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

New portfolio_description #25

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Conversation

maurolepore
Copy link
Contributor

@maurolepore
Copy link
Contributor Author

@vintented, thanks for contributing this help file. Who might be able to review this text before I merge it into master?

This is what we have right now:

Title:
Description of a generic equity or debt portfolio dataset

Description:
A equity or debt portfolio mapped to the physical assets of financial securities issuers. The PACTA methodology is applied to the mapped data to produce a results file with the portfolio's relative alignment with different climate scenarios for technologies in climate-relevant sectors. The portfolio results include the emissions factors and the absolute and scaled production associated with the portfolio's exposure to each technology in climate-relevant sectors.

@maurolepore
Copy link
Contributor Author

@vintented,

Can you define the columns of the portfolio dataset?

cat(names(r2dii.analysis::portfolio), sep = ":\n")
#> Investor.Name:
#> Portfolio.Name:
#> Scenario:
#> ScenarioGeography:
#> Allocation:
#> Year:
#> Sector:
#> Plan.Sec.EmissionsFactor:
#> Scen.Sec.EmissionsFactor:

Created on 2019-12-18 by the reprex package (v0.3.0.9001)

@2diiKlaus
Copy link

@maurolepore @vintented
check this for the descriptions. https://github.com/2DegreesInvesting/Reference/tree/master/Documentation
the "Scenario-Analysis-Description-of-Results.docx" should help for the descriptions of the columns

@vintented
Copy link

@maurolepore taken from https://github.com/2DegreesInvesting/Reference/tree/master/Documentation
per @2diiKlaus's suggestion.

cat(names(r2dii.analysis::portfolio), sep = ":\n")

#> Investor.Name: Investor Name.
#> Portfolio.Name: Portfolio Name
#> Scenario: Identifies the scenario applied to calculate production “under the scenario”. 
#> ScenarioGeography: A grouping/filtering variable based on the country where production is located. Every country is mapped to one or more of the following regional ScenarioGeographies: Global, OECD, Non-OECD, North America, Europe, and Asia Pacific.
#> Allocation: Identifies the allocation method used for allocating some portion of the production of an entire company (pulled from ALD) to the company’s securities held in the portfolio. Also referred to as the Accounting Principle. 
#> Year: Year. 
#> Sector: Identifies the sector of production, based on the asset-level data.
#> Plan.Sec.EmissionsFactor: Emissions Factor in CO2/production units for the given sector. This is the weighted average (by production) of Plan.EmissionsFactor for all technologies within the sector.
#> Scen.Sec.EmissionsFactor: Emissions Factor consistent with the given Scenario in CO2/production units for the given sector. This is the weighted average (by production) of Scen.EmissionsFactor for all technologies within the sector.

@maurolepore
Copy link
Contributor Author

maurolepore commented Jan 14, 2020

Thanks @vintented,

The commits above add the dataset portfolio_demo, which relate to the documentation of portfolio_description. Meanwhile I did the same for the dataset market_demo, which relates to #24.

In summary, the steps involved are those listed by the internal function r2dii.dataraw:::use_newdata_checklist():

Checklist to add a new dataset called newdata:

  • Add 'data-raw/newdata.csv'
  • Add 'inst/extdata/data_dictionary_newdata.csv'
  • In 'data-raw/newdata.R', do something like this:
  # Source: @<contributor> <URL to issue or pull request>
  newdata <- readr::read_csv(here::here('data-raw', 'newdata.csv'))
  use_data(newdata, overwrite = TRUE)
  • In 'R/newdata.R', document newdata
  • In 'test/testthat/test-newdata.R', add a regression test for newdata
  • In 'R/data_dictionary.R', extend data_dictionary() to use newdata
  • In 'test/testthat/test-data_dictionary.R', add at least one test for newdata
  • In 'test/testthat/test-data_dictionary.R', update expect_known_value()

[market_description] will come soon, but it's not yet here.
We don't need it so we can save time and trouble.
Same for r2dii.utils
@maurolepore
Copy link
Contributor Author

/style to test pr-commands.yaml

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New portfolio_description
3 participants