Segments/Dimensional¶
Data from dimensionalized tables, operating and geographic segments for example. The data behind the Calcbench Segment page www.calcbench.com/segments.
- class calcbench.dimensional.DimensionalDataPoint(*args, **kwargs)¶
The data returned by calls to the dimensional api end-point
- CIK: str¶
- calcbench_entity_id: int¶
- calendar_period: calcbench.api_query_params.Period¶
- calendar_year: int¶
- container: str¶
- date_reported: str¶
- dimensions: Dict[str, str]¶
- filing_type: str¶
- fiscal_period: calcbench.api_query_params.Period¶
- fiscal_year: int¶
- metric: str¶
- period: Any¶
- preliminary: bool¶
- ticker: str¶
- trace_facts: Sequence[calcbench.standardized_numeric.TraceData]¶
- trace_url: Optional[str]¶
- value: Union[str, float, int]¶
- class calcbench.dimensional.Metric(value)¶
An enumeration.
- AcquiredFiniteLivedIntangibleAssetsWeightedAverageUsefulLife = 123¶
- AssetsAndLiabilitiesAtFairValue = 21¶
- AssetsAndLiabilitiesAtFairValueLevel1 = 22¶
- AssetsAndLiabilitiesAtFairValueLevel2 = 23¶
- AssetsAndLiabilitiesAtFairValueLevel3 = 24¶
- BusinessAcquisitionCostOfAcquiredEntityCashPaid = 108¶
- BusinessAcquisitionCostOfAcquiredEntityTransactionCosts = 132¶
- BusinessAcquisitionsProFormaRevenue = 131¶
- BusinessCombination = 94¶
- BusinessCombinationAcquisitionDate = 104¶
- BusinessCombinationAcquisitionRelatedCosts = 112¶
- BusinessCombinationAdjustment = 95¶
- BusinessCombinationAsAdjusted = 96¶
- BusinessCombinationAssetsAcquiredCashAndEquivalents = 116¶
- BusinessCombinationAssetsAcquiredInventory = 118¶
- BusinessCombinationAssetsAcquiredPropertyPlantAndEquipment = 119¶
- BusinessCombinationAssetsAcquiredReceivables = 117¶
- BusinessCombinationAssetsAquiredGoodwill = 120¶
- BusinessCombinationBargainPurchaseGainAdjustment = 130¶
- BusinessCombinationBargainPurchaseGainRecognizedAmount = 129¶
- BusinessCombinationConsideration = 93¶
- BusinessCombinationConsiderationTransferredEquityInterestsIssuedAndIssuable = 110¶
- BusinessCombinationConsiderationTransferredIncludingEquityInterestInAcquireeHeldPriorToCombination1 = 109¶
- BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueHigh = 115¶
- BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueLow = 114¶
- BusinessCombinationContingentConsiderationLiability = 113¶
- BusinessCombinationIntangibleAssetsAcquired = 97¶
- BusinessCombinationIntangibleAssetsAcquiredWeightedAverageUsefulLife = 98¶
- BusinessCombinationLiabilitiesAssumed = 128¶
- BusinessCombinationLiabilitiesAssumedCurrentLiabilitiesAccountsPayable = 125¶
- BusinessCombinationLiabilitiesAssumedDeferredRevenue = 127¶
- BusinessCombinationLiabilitiesAssumedLongTermDebt = 126¶
- BusinessCombinationPurchasePrice = 105¶
- BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets = 124¶
- ConcentrationRiskPercentageCustomer = 91¶
- ConcentrationRiskPercentageSupplier = 92¶
- DebtInstrumentCarryingAmount = 49¶
- DebtInstrumentFaceAmount = 47¶
- DebtInstrumentInterestRateEffectivePercentage = 51¶
- DebtInstrumentInterestRateStatedPercentage = 50¶
- DebtInstrumentMaturityDate = 52¶
- DebtInstrumentMaturityYear = 53¶
- DebtInstrumentUnamortizedDiscountPremiumNet = 48¶
- DeferredTaxAssets = 17¶
- DeferredTaxLiabilities = 18¶
- DefinedBenefitPlanAccumulatedBenefitObligation = 156¶
- DefinedBenefitPlanActualReturnOnPlanAssets = 158¶
- DefinedBenefitPlanActuarialGainLoss = 147¶
- DefinedBenefitPlanAmortizationOfGainsLoss = 140¶
- DefinedBenefitPlanAmortizationOfPriorServiceCostCredit = 139¶
- DefinedBenefitPlanAmortizationOfTransitionObligationsAssets = 138¶
- DefinedBenefitPlanAssetsOtherChanges = 164¶
- DefinedBenefitPlanBenefitObligation = 143¶
- DefinedBenefitPlanBenefitsPaid = 148¶
- DefinedBenefitPlanBenefitsPaid_Asset = 161¶
- DefinedBenefitPlanBusinessCombinationsAndAcquisitionsBenefitObligation = 151¶
- DefinedBenefitPlanChangeInBenefitObligationInterestCost = 145¶
- DefinedBenefitPlanChangeInBenefitObligationServiceCost = 144¶
- DefinedBenefitPlanChangeInDiscountRate = 152¶
- DefinedBenefitPlanContributionsByEmployer = 159¶
- DefinedBenefitPlanContributionsByPlanParticipants = 146¶
- DefinedBenefitPlanContributionsByPlanParticipants_Asset = 160¶
- DefinedBenefitPlanDBOOtherChanges = 155¶
- DefinedBenefitPlanDirectBenefitsPaid = 149¶
- DefinedBenefitPlanExpectedReturnOnPlanAssets = 137¶
- DefinedBenefitPlanFairValueOfPlanAssets = 157¶
- DefinedBenefitPlanForeignCurrencyExchangeRateChangesBenefitObligation = 154¶
- DefinedBenefitPlanForeignCurrencyExchangeRateChangesPlanAssets = 163¶
- DefinedBenefitPlanInterestCost = 136¶
- DefinedBenefitPlanNetPeriodicBenefitCost = 134¶
- DefinedBenefitPlanOtherCosts = 142¶
- DefinedBenefitPlanPlanAmendments = 150¶
- DefinedBenefitPlanPurchasesSalesAndSettlements = 162¶
- DefinedBenefitPlanRecognizedNetGainLossDueToSettlementsAndCurtailments = 141¶
- DefinedBenefitPlanServiceCost = 135¶
- DefinedBenefitPlanTransfers = 153¶
- DerivativeAssetNotionalAmount = 55¶
- DerivativeFairValueOfDerivativeAsset = 57¶
- DerivativeFairValueOfDerivativeLiability = 58¶
- DerivativeLiabilityNotionalAmount = 56¶
- DerivativeNotionalAmount = 54¶
- DisposalGroup = 75¶
- EffectiveIncomeTaxReconciliation = 20¶
- EquityMethodInvestmentDividendsOrDistributions = 101¶
- EquityMethodInvestmentRealizedGainLossOnDisposal = 102¶
- EquityMethodInvestments = 99¶
- FairValueMeasurementWithUnobservableInputsReconciliationLiabilityTransfersIntoLevel3 = 38¶
- FairValueMeasurementWithUnobservableInputsReconciliationLiabilityTransfersOutOfLevel3 = 39¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInEarnings = 31¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInOtherComprehensiveIncomeLoss = 32¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetIssues = 36¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetPurchases = 33¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetSales = 34¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetSettlements = 35¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetTransfersIntoLevel3 = 29¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetTransfersOutOfLevel3 = 30¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetValue = 37¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings = 40¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInOtherComprehensiveIncome = 41¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityIssues = 45¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityPurchases = 42¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySales = 43¶
- FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySettlements = 44¶
- FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue = 46¶
- FairValueOfPensionPlanAssets = 25¶
- FairValueOfPensionPlanAssetsLevel1 = 26¶
- FairValueOfPensionPlanAssetsLevel2 = 27¶
- FairValueOfPensionPlanAssetsLevel3 = 28¶
- FiniteLivedIntangibleAssetsAccumulatedAmortization = 77¶
- FiniteLivedIntangibleAssetsGross = 76¶
- FiniteLivedIntangibleAssetsNet = 78¶
- FinitelivedIntangibleAssetsAcquired = 121¶
- GeographicalSegmentAssets = 10¶
- GeographicalSegmentCapitalExpenditures = 12¶
- GeographicalSegmentDepreciation = 13¶
- GeographicalSegmentGeographicalIncome = 14¶
- GeographicalSegmentGoodwill = 16¶
- GeographicalSegmentInterestExpense = 15¶
- GeographicalSegmentLongLivedAssets = 11¶
- GeographicalSegmentRevenue = 9¶
- ImpairmentOfIntangibleAssetsExcludingGoodwill = 79¶
- IncomeLossFromEquityMethodInvestments = 100¶
- IncomeTaxReconciliation = 19¶
- IndefiniteLivedIntangibleAssetsExcludingGoodwill = 80¶
- IndefinitelivedIntangibleAssetsAcquired = 122¶
- OperatingSegmentAssets = 2¶
- OperatingSegmentCapitalExpenditures = 4¶
- OperatingSegmentDepreciation = 5¶
- OperatingSegmentGoodwill = 8¶
- OperatingSegmentInterestExpense = 7¶
- OperatingSegmentLongLivedAssets = 3¶
- OperatingSegmentOperatingIncome = 6¶
- OperatingSegmentRevenue = 1¶
- PaymentsToAcquireBusinessesGross = 106¶
- PaymentsToAcquireBusinessesNetOfCashAcquired = 107¶
- PlanName = 133¶
- RealEstateAccumulatedDepreciation = 89¶
- RealEstateAndAccumulatedDepreciationAmountOfEncumbrances = 81¶
- RealEstateAndAccumulatedDepreciationCarryingAmountOfBuildingsAndImprovements = 88¶
- RealEstateAndAccumulatedDepreciationCarryingAmountOfLand = 87¶
- RealEstateAndAccumulatedDepreciationCostsCapitalizedSubsequentToAcquisitionCarryingCosts = 84¶
- RealEstateAndAccumulatedDepreciationInitialCostOfBuildingsAndImprovements = 83¶
- RealEstateAndAccumulatedDepreciationInitialCostOfLand = 82¶
- RealEstateGrossAtCarryingValue = 90¶
- SECScheduleIIIRealEstateAndAccumulatedDepreciationCostsCapitalizedSubsequentToAcquisitionBuildingsAndImprovements = 86¶
- SECScheduleIIIRealEstateAndAccumulatedDepreciationCostsCapitalizedSubsequentToAcquisitionLand = 85¶
- filing_date = 103¶
- calcbench.dimensional.dimensional(company_identifiers=[], metrics=[], start_year=None, start_period=None, end_year=None, end_period=None, period_type=PeriodType.Annual, all_history=True, trace_url=False, as_originally_reported=False)¶
Segments and Breakouts in a DataFrame
The data behind the breakouts/segment page, https://www.calcbench.com/breakout.
If there are no results an empty dataframe is returned
- Parameters
company_identifiers (sequence) – Tickers/CIK codes. eg. [‘msft’, ‘goog’, ‘appl’, ‘0000066740’]
metrics (
Sequence
[Metric
]) – list of dimension tuple strings, get the list @ https://www.calcbench.com/api/availableBreakouts, pass in the “databaseName”start_year (int) – first year of data to get
start_period (
Union
[Period
,Literal
[0, 1, 2, 3, 4],None
]) – first period of data to get. 0 for annual data, 1, 2, 3, 4 for quarterly data.end_year (int) – last year of data to get
end_period (
Union
[Period
,Literal
[0, 1, 2, 3, 4],None
]) – last period of data to get. 0 for annual data, 1, 2, 3, 4 for quarterly data.period_type (
PeriodType
) – only applicable when other period data not supplied.trace_url (
bool
) – include a column with URL that point to the source document.as_originally_reported (
bool
) – Show the first reported, rather than revised, values
- Returns
A list of points. The points correspond to the lines @ https://www.calcbench.com/breakout. For each requested metric there will be a the formatted value and the unformatted value denote bya _effvalue suffix. The label is the dimension label associated with the values.
- Return type
pd.DataFrame
Usage:
>>> cb.dimensional( >>> company_identifiers=cb.tickers(index="DJIA"), >>> metrics=["OperatingSegmentRevenue", "OperatingSegmentOperatingIncome"], >>> period_type="annual", >>> )
- calcbench.dimensional.dimensional_raw(company_identifiers=[], metrics=[], start_year=None, start_period=None, end_year=None, end_period=None, period_type=PeriodType.Annual, all_history=True, as_originally_reported=False)¶
Segments and Breakouts
The data behind the breakouts/segment page, https://www.calcbench.com/breakout.
- Parameters
company_identifiers (
Sequence
[Union
[str
,int
]]) – Tickers/CIK codes. eg. [‘msft’, ‘goog’, ‘appl’, ‘0000066740’]metrics (
Sequence
[Metric
]) – list of dimension tuple strings, get the list @ https://www.calcbench.com/api/availableBreakouts, pass in the “databaseName”start_year (
Optional
[int
]) – first year of data to getstart_period (
Union
[Period
,Literal
[0, 1, 2, 3, 4],None
]) – first period of data to get.end_year (
Optional
[int
]) – last year of data to getend_period (
Union
[Period
,Literal
[0, 1, 2, 3, 4],None
]) – last period of data to get.period_type (
PeriodType
) – Only applicable when other period data not supplied.all_history (
bool
) – Get data for all historyas_originally_reported (
bool
) – Show the first reported, rather than revised, values
- Usage::
>>> cb.dimensional_raw(company_identifiers=['fdx'], >>> metrics=['OperatingSegmentRevenue'], >>> start_year=2018 >>> )
- Return type
Sequence
[DimensionalDataPoint
]