Title: | pacta.data.validation |
---|---|
Description: | For more information visit <https://rmi.org/>. |
Authors: | CJ Yetman [aut, cre, ctr] , Jackson Hoffart [aut, ctr] , Jacob Kastl [aut, ctr], Alex Axthelm [aut, ctr] , RMI [cph, fnd] |
Maintainer: | CJ Yetman <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.0.9000 |
Built: | 2024-10-30 12:23:47 UTC |
Source: | https://github.com/rmi-pacta/pacta.data.validation |
abcd_flags_bonds
objectThis function creates an example abcd_flags_bonds
object.
fake_abcd_flags_bonds( credit_parent_id = "000BGD-E", has_asset_level_data = TRUE, has_ald_in_fin_sector = TRUE, sectors_with_assets = "Power + Oil&Gas" )
fake_abcd_flags_bonds( credit_parent_id = "000BGD-E", has_asset_level_data = TRUE, has_ald_in_fin_sector = TRUE, sectors_with_assets = "Power + Oil&Gas" )
credit_parent_id |
value/s to be used for the |
has_asset_level_data |
value/s to be used for the |
has_ald_in_fin_sector |
value/s to be used for the
|
sectors_with_assets |
value/s to be used for the |
A data frame with the specified columns and/or their default values
abcd_flags_equity
objectThis function creates an example abcd_flags_equity
object.
fake_abcd_flags_equity( isin = "US3140KKGV04", has_asset_level_data = TRUE, has_ald_in_fin_sector = TRUE, sectors_with_assets = "Power + Oil&Gas" )
fake_abcd_flags_equity( isin = "US3140KKGV04", has_asset_level_data = TRUE, has_ald_in_fin_sector = TRUE, sectors_with_assets = "Power + Oil&Gas" )
isin |
value/s to be used for the |
has_asset_level_data |
value/s to be used for the |
has_ald_in_fin_sector |
value/s to be used for the
|
sectors_with_assets |
value/s to be used for the |
A data frame with the specified columns and/or their default values
currencies
objectThis function creates an example currencies
object.
fake_currencies(currency = "USD", exchange_rate = 1)
fake_currencies(currency = "USD", exchange_rate = 1)
currency |
value/s to be used for the |
exchange_rate |
value/s to be used for the |
A data frame with the specified columns and/or their default values
financial_data
objectThis function creates an example financial_data
object.
fake_financial_data( isin = "US3140KKGV04", unit_share_price = 12.3, current_shares_outstanding_all_classes = 333000, asset_type = "Equity", factset_entity_id = "000Y86-E" )
fake_financial_data( isin = "US3140KKGV04", unit_share_price = 12.3, current_shares_outstanding_all_classes = 333000, asset_type = "Equity", factset_entity_id = "000Y86-E" )
isin |
value/s to be used for the |
unit_share_price |
value/s to be used for the |
current_shares_outstanding_all_classes |
value/s to be used for the
|
asset_type |
value/s to be used for the |
factset_entity_id |
value/s to be used for the |
A data frame with the specified columns and/or their default values
intermediate_scenario_data
objectThis function creates an example intermediate_scenario_data
object.
fake_intermediate_scenario_data( source = "WEO2022", scenario = "NZE_2050", scenario_geography = "Global", sector = "Power", technology = "RenewablesCap", indicator = "Capacity: installed", units = "GW", year = 2025, value = 500 )
fake_intermediate_scenario_data( source = "WEO2022", scenario = "NZE_2050", scenario_geography = "Global", sector = "Power", technology = "RenewablesCap", indicator = "Capacity: installed", units = "GW", year = 2025, value = 500 )
source |
value/s to be used for the |
scenario |
value/s to be used for the |
scenario_geography |
value/s to be used for the |
sector |
value/s to be used for the |
technology |
value/s to be used for the |
indicator |
value/s to be used for the |
units |
value/s to be used for the |
year |
value/s to be used for the |
value |
value/s to be used for the |
A data frame with the specified columns and/or their default values
masterdata_debt_datastore
objectThis function creates an example masterdata_debt_datastore
object.
fake_masterdata_debt_datastore( id = "8", id_name = "credit_parent_ar_company_id", ald_sector = "Oil&Gas", ald_location = "DE", technology = "Gas", year = 2022, country_of_domicile = "DE", ald_production_unit = "GJ", ald_production = 52281230, ald_emissions_factor_unit = "tonnes of CO2 per GJ", ald_emissions_factor = 0.06202439 )
fake_masterdata_debt_datastore( id = "8", id_name = "credit_parent_ar_company_id", ald_sector = "Oil&Gas", ald_location = "DE", technology = "Gas", year = 2022, country_of_domicile = "DE", ald_production_unit = "GJ", ald_production = 52281230, ald_emissions_factor_unit = "tonnes of CO2 per GJ", ald_emissions_factor = 0.06202439 )
id |
value/s to be used for the |
id_name |
value/s to be used for the |
ald_sector |
value/s to be used for the |
ald_location |
value/s to be used for the |
technology |
value/s to be used for the |
year |
value/s to be used for the |
country_of_domicile |
value/s to be used for the |
ald_production_unit |
value/s to be used for the |
ald_production |
value/s to be used for the |
ald_emissions_factor_unit |
value/s to be used for the
|
ald_emissions_factor |
value/s to be used for the |
A data frame with the specified columns and/or their default values
masterdata_ownership_datastore
objectThis function creates an example masterdata_ownership_datastore
object.
fake_masterdata_ownership_datastore( id = "8", id_name = "ar_company_id", ald_sector = "Oil&Gas", ald_location = "DE", technology = "Gas", year = 2022, ald_production = 52281230, ald_production_unit = "GJ", ald_emissions_factor = 0.06202439, ald_emissions_factor_unit = "tonnes of CO2 per GJ", country_of_domicile = "DE" )
fake_masterdata_ownership_datastore( id = "8", id_name = "ar_company_id", ald_sector = "Oil&Gas", ald_location = "DE", technology = "Gas", year = 2022, ald_production = 52281230, ald_production_unit = "GJ", ald_emissions_factor = 0.06202439, ald_emissions_factor_unit = "tonnes of CO2 per GJ", country_of_domicile = "DE" )
id |
value/s to be used for the |
id_name |
value/s to be used for the |
ald_sector |
value/s to be used for the |
ald_location |
value/s to be used for the |
technology |
value/s to be used for the |
year |
value/s to be used for the |
ald_production |
value/s to be used for the |
ald_production_unit |
value/s to be used for the |
ald_emissions_factor |
value/s to be used for the |
ald_emissions_factor_unit |
value/s to be used for the
|
country_of_domicile |
value/s to be used for the |
A data frame with the specified columns and/or their default values
This function validates that a vector of ISINs are valid codes that conform
to the ISO 6166 specification with TRUE
or FALSE
. It checks the basic
structure (2 alpha characters, 9 alpha-numeric characters, 1 check digit)
and also validates the check digit using the Luhn algorithm.
is_valid_isin(isins)
is_valid_isin(isins)
isins |
A character vector |
A logical vector the same length as isins
.
abcd_flags_bonds
objectThis function validates that an object is a valid abcd_flags_bonds
dataset.
validate_abcd_flags_bonds(data)
validate_abcd_flags_bonds(data)
data |
An object (typically a data frame) |
TRUE
if the object is valid, otherwise an error with a message
explaining the failed assertions
abcd_flags_equity
objectThis function validates that an object is a valid abcd_flags_equity
dataset.
validate_abcd_flags_equity(data)
validate_abcd_flags_equity(data)
data |
An object (typically a data frame) |
TRUE
if the object is valid, otherwise an error with a message
explaining the failed assertions
currencies
objectThis function validates that an object is a valid currencies
dataset.
validate_currencies(data)
validate_currencies(data)
data |
An object (typically a data frame) |
TRUE
if the object is valid, otherwise an error with a message
explaining the failed assertions
financial_data
objectThis function validates that an object is a valid financial_data
dataset.
validate_financial_data(data)
validate_financial_data(data)
data |
An object (typically a data frame) |
TRUE
if the object is valid, otherwise an error with a message
explaining the failed assertions
This function validates that an object is a valid intermediate scenario
dataset (e.g. weo_2022
, geco_2022
, or more generally, publication_YYYY
).
validate_intermediate_scenario_output(data)
validate_intermediate_scenario_output(data)
data |
An object (typically a data frame) |
TRUE
if the object is valid, otherwise an error with a message
explaining the failed assertions
masterdata_debt_datastore
objectThis function validates that an object is a valid masterdata_debt_datastore
dataset.
validate_masterdata_debt_datastore(data)
validate_masterdata_debt_datastore(data)
data |
An object (typically a data frame) |
TRUE
if the object is valid, otherwise an error with a message
explaining the failed assertions
masterdata_ownership_datastore
objectThis function validates that an object is a valid masterdata_ownership_datastore
dataset.
validate_masterdata_ownership_datastore(data)
validate_masterdata_ownership_datastore(data)
data |
An object (typically a data frame) |
TRUE
if the object is valid, otherwise an error with a message
explaining the failed assertions