Title: | 'FactSet' 'STACH' Extensions Package |
---|---|
Description: | Allow clients to convert 'FactSet' 'STACH' formatted data to simpler tabular formats in the form of data frames. This package also provides helper methods to extract the meta data from 'FactSet' 'STACH' formatted data. See documentation on the 'GitHub' repository for more information. |
Authors: | Veda Bhaskara Ramanth [aut, cre] |
Maintainer: | Veda Bhaskara Ramanth <[email protected]> |
License: | Apache License 2.0 |
Version: | 1.0.4 |
Built: | 2024-11-17 05:25:42 UTC |
Source: | https://github.com/cran/factset.protobuf.stachextensions |
The purpose of this class is to provide the helper methods for converting stach(column organized) to Tabular format and to get meta data from stach
ConvertToDataFrame()
This function is used for converting stach to Tabular format
V2ColumnOrganizedStachExtension$ConvertToDataFrame(package, mergeHeaders)
package
Stach Data which is represented as a Package object
mergeHeaders
Accepts Type as BOOLEAN,by default takes TRUE. If the value is TRUE, headers will be merged with column data as output in dataframe If the value is FALSE, headers will be added to column data as output in dataframe
Returns the List of data frame for the stach data
GetMetadata()
This function is used to get meta data from stach
V2ColumnOrganizedStachExtension$GetMetadata(package)
package
Stach Data which is represented as a Package object
Returns the List of metadata for the stach data
clone()
The objects of this class are cloneable with this method.
V2ColumnOrganizedStachExtension$clone(deep = FALSE)
deep
Whether to make a deep clone.
## Not run: package <- 'Stach data which is converted into ColumnOrganized Package' stachExtensioncol <- factset.protobuf.stachextensions::V2ColumnOrganizedStachExtension$new() dataFrame <- stachExtensioncol$ConvertToDataFrame(package) ## End(Not run)
## Not run: package <- 'Stach data which is converted into ColumnOrganized Package' stachExtensioncol <- factset.protobuf.stachextensions::V2ColumnOrganizedStachExtension$new() dataFrame <- stachExtensioncol$ConvertToDataFrame(package) ## End(Not run)
Provide helper functions for column organized stach
GetPrimaryTableIds()
Get Primary Table Ids
V2ColumnOrganizedStachUtilities$GetPrimaryTableIds(package)
package
Stach Data which is represented as a Package object
Returns list of primary table ids
Decompress()
Get decompress stach data
V2ColumnOrganizedStachUtilities$Decompress(package)
package
Stach Data which is represented as a Package object
Returns decompressed stach data
clone()
The objects of this class are cloneable with this method.
V2ColumnOrganizedStachUtilities$clone(deep = FALSE)
deep
Whether to make a deep clone.
## Not run: compressedFilePath <- 'Path of your json file' compressedData <- jsonlite::read_json(path=compressedFilePath, auto_unbox=TRUE) stachUtilities <- factset.protobuf.stachextensions::V2ColumnOrganizedStachUtilities primaryTableIds <- stachUtilities$public_methods$GetPrimaryTableIds(compressedData) ## End(Not run) ## Not run: compressedFilePath <- 'Path of your json file' compressedData <- jsonlite::read_json(path=compressedFilePath, auto_unbox=TRUE) utility <- factset.protobuf.stachextensions::V2ColumnOrganizedStachUtilities$new() deCompressedData <- utility$Decompress(compressedData) ## End(Not run)
## Not run: compressedFilePath <- 'Path of your json file' compressedData <- jsonlite::read_json(path=compressedFilePath, auto_unbox=TRUE) stachUtilities <- factset.protobuf.stachextensions::V2ColumnOrganizedStachUtilities primaryTableIds <- stachUtilities$public_methods$GetPrimaryTableIds(compressedData) ## End(Not run) ## Not run: compressedFilePath <- 'Path of your json file' compressedData <- jsonlite::read_json(path=compressedFilePath, auto_unbox=TRUE) utility <- factset.protobuf.stachextensions::V2ColumnOrganizedStachUtilities$new() deCompressedData <- utility$Decompress(compressedData) ## End(Not run)
The purpose of this class is to provide the helper methods for converting stach(row organized) to Tabular format and to get meta data from stach
ConvertToDataFrame()
This function is used for converting stach to Tabular format
V2RowOrganizedStachExtension$ConvertToDataFrame(package, mergeHeaders)
package
Stach Data which is represented as a Package object
mergeHeaders
Accepts Type as BOOLEAN,by default takes TRUE. If the value is TRUE, headers will be merged with column data as output in dataframe If the value is FALSE, headers will be added to column data as output in dataframe
Returns the List of data frame for the stach data
GetMetadata()
This function is used to get meta data from stach
V2RowOrganizedStachExtension$GetMetadata(package)
package
Stach Data which is represented as a Package object
Returns the List of metadata for the stach data
clone()
The objects of this class are cloneable with this method.
V2RowOrganizedStachExtension$clone(deep = FALSE)
deep
Whether to make a deep clone.
## Not run: package <- 'Stach data which is converted into RowOrganized Package' stachExtensionrow <- factset.protobuf.stachextensions::V2RowOrganizedStachExtension$new() dataFrame <- stachExtensionrow$ConvertToDataFrame(package) ## End(Not run)
## Not run: package <- 'Stach data which is converted into RowOrganized Package' stachExtensionrow <- factset.protobuf.stachextensions::V2RowOrganizedStachExtension$new() dataFrame <- stachExtensionrow$ConvertToDataFrame(package) ## End(Not run)
The purpose of this class is to provide the helper methods
GetMappingObject()
Helper method for getting the value corresponding to the given key from the object.
V2StachUtilities$GetMappingObject(objectMap, key, keyname = "key")
objectMap
Mapping object value
key
Mapping object corresponding key value
keyname
Mapping object corresponding key name
Returns the value corresponding to the given key from the object
ValueToString()
Helper method for converting value to string
V2StachUtilities$ValueToString(value)
value
Value that should be converted to string
Returns the value by converting corresponding value to string
clone()
The objects of this class are cloneable with this method.
V2StachUtilities$clone(deep = FALSE)
deep
Whether to make a deep clone.
## Not run: package <- 'Stach data which is converted into RowOrganized Package' tableData <- V2StachUtilities$public_methods$GetMappingObject(package$tables, primaryTableId)$value ## End(Not run)
## Not run: package <- 'Stach data which is converted into RowOrganized Package' tableData <- V2StachUtilities$public_methods$GetMappingObject(package$tables, primaryTableId)$value ## End(Not run)