Phrazor SDK
Get API KeyPhrazor API
  • 👋Welcome
  • Docs
    • ⚡Quick Start
    • 🔑Get your API Key
    • Documentation
      • 📥Download and Import
      • 🔗Connect your Data
      • 🛠️Setup your Analysis
        • Descriptor
        • Change
        • Trend
        • Compare
        • Target vs Achievement
        • Budget vs Expense
        • Others
          • Filter your Data
      • 📋Generate your Insights
      • 📝Generate your Summary
      • 🔌Integrations
      • 💣Rate Limits
Powered by GitBook
On this page
  • Input Combinations
  • Topics
  • Examples
  • Generate Insights by Analysis
  • Generate Insights by Topics
  1. Docs
  2. Documentation
  3. Setup your Analysis

Change

PreviousDescriptorNextTrend

Last updated 1 year ago

Change analysis reveals how a dimension has evolved over time, whether it has grown or declined. It's ideal for diagnostics, allowing you to explore different dimensions and understand why hierarchies have changed.

Input Combinations

There are several different input combinations that you can leverage to bring out the different types of insights we offer for the Change analysis.

Sr No
Combination
1

Date and Metric

2

Date, Metric and Dimension

All the above mentioned input combinations are to be set using method.

Topics

This section gives description about the topics that are associated with Change Analysis. You can choose the topics of your choice to generate insights according to your requirements.

Topic
Description

growth_primary

Analyzes the growth pattern of the metric over time. Input - Date and Metric

dim_growth_primary

Provides insights on growing value/entity of the dimension for the given metric. Input - Date, Metric and Dimension

dim_decline_primary

Provides insights on declining value/entity of the dimension for the given metric. Input - Date, Metric and Dimension

top_n_growing_d2

Offers insights into the increasing value or entity within one dimension for a specific metric, while concurrently examining the growth of value or entity within another dimension.

Input - Date, Metric and 2 Dimensions Requires two dimensions in input.

top_n_declining_2d

Offers insights into the decreasing value or entity within one dimension for a specific metric, while concurrently examining the decline of value or entity within another dimension.

Input - Date, Metric and 2 Dimensions Requires two dimensions in input.

change_other

Gives other miscellaneous insights. Input - Date and Metric / Date, Metric and Dimension

Examples

Generate Insights by Analysis

Generate Insights on Monthly Sales for each Region.

# Set column meta according to the input combination.
phrzr.set_column_meta(
    date_column={"name": "Date", "period": "month"},
    metric_column="Sales",
    dimension_column="Region" 
)

insights = phrzr.get_insights('change')

print(insights)

Generate Insights by Topics

Let's analyze and identify the Regions with growth and decline based on monthly Sales.

# Set column meta according to the topic input combination.
phrzr.set_column_meta(
    date_column={"name": "Date", "period": "month"},
    metric_column="Sales",
    dimension_column="Region" 
)

insights = phrzr.get_insights(["dim_growth_primary", "dim_decline_primary"])

print(insights)

Let's dive deeper to pinpoint the specific State within the declining Region that is not performing well.

# Set column meta according to the topic input combination.
phrzr.set_column_meta(
    date_column={"name": "Date", "period": "month"},
    metric_column="Sales",
    dimension_column=["Region","State"]
)

insights = phrzr.get_insights(["top_n_declining_2d"])

print(insights)

🛠️
set_column_meta