GST Growth Rates with Trendlines

Published: 2 December 2024| Version 1 | DOI: 10.17632/5bybp8892x.1
Contributor:
Sunil Maria Benedict

Description

Description of the Dataset The dataset analyzed in this code snippet focuses on the Goods and Services Tax (GST) growth rates for India, specifically comparing national growth rates with those of two major states: Maharashtra and Karnataka. The data is structured to facilitate a time series analysis, allowing for the examination of trends and patterns in GST growth over a specified period. Dataset Structure Index: Month-Year: The index of the DataFrame is composed of datetime objects representing specific months and years. This format allows for effective time-based analysis and visualization. Columns: National Growth Rate (%): This column contains the percentage growth rate of GST at the national level. It provides insights into how GST revenue has changed across India over time. Maharashtra Growth Rate (%): This column reflects the GST growth rate specifically for Maharashtra, one of India's largest and economically significant states. Analyzing this data helps assess Maharashtra's economic performance relative to national trends. Karnataka Growth Rate (%): Similar to the Maharashtra column, this one details the GST growth rate for Karnataka, another key state known for its robust economy and technological advancements. Purpose of the Dataset The primary purpose of this dataset is to enable stakeholders—such as policymakers, economists, business analysts, and researchers—to analyze and compare GST growth rates across different regions over time. By visualizing these trends, users can identify patterns, assess regional economic health, and make informed decisions based on historical performance. Visualization The accompanying code snippet creates a visual representation of this dataset using line plots with trendlines. Key features of the visualization include: Comparative Analysis: The plot displays three distinct lines representing national, Maharashtra, and Karnataka GST growth rates, allowing for easy comparison between these datasets. Markers and Colors: Each line is marked with circular markers and colored differently to enhance clarity and facilitate differentiation among the three growth rate trends. Trendlines: Linear trendlines are added for each dataset using polynomial fitting (np.polyfit), which helps illustrate overall trends in GST growth rates over time. Grid and Labels: The plot includes grid lines for better readability and clearly labeled axes to indicate what each dimension represents (Month-Year on the x-axis and GST Growth Rate (%) on the y-axis).

Files

Steps to reproduce

import pandas as pd import matplotlib.pyplot as plt import numpy as np # Convert "Month-Year" to datetime format (already done in the previous code) df_month_year = df.index.to_numpy() # Already in datetime format df_national_growth = df["National Growth Rate (%)"].dropna().to_numpy() df_maharashtra_growth = df["Maharashtra Growth Rate (%)"].dropna().to_numpy() df_karnataka_growth = df["Karnataka Growth Rate (%)"].dropna().to_numpy() # Plot Growth Rates plt.figure(figsize=(14, 8)) plt.plot(df_month_year, df_national_growth, label="National Growth Rate (%)", marker='o', color=plt.cm.Set2(0)) plt.plot(df_month_year, df_maharashtra_growth, label="Maharashtra Growth Rate (%)", marker='o', color=plt.cm.Set2(1)) plt.plot(df_month_year, df_karnataka_growth, label="Karnataka Growth Rate (%)", marker='o', color=plt.cm.Set2(2)) # Add Trendlines z_national = np.polyfit(range(len(df_national_growth)), df_national_growth, 1) p_national = np.poly1d(z_national) plt.plot(df_month_year, p_national(range(len(df_national_growth))), linestyle='--', color=plt.cm.Set2(0), alpha=0.7) z_maharashtra = np.polyfit(range(len(df_maharashtra_growth)), df_maharashtra_growth, 1) p_maharashtra = np.poly1d(z_maharashtra) plt.plot(df_month_year, p_maharashtra(range(len(df_maharashtra_growth))), linestyle='--', color=plt.cm.Set2(1), alpha=0.7) z_karnataka = np.polyfit(range(len(df_karnataka_growth)), df_karnataka_growth, 1) p_karnataka = np.poly1d(z_karnataka) plt.plot(df_month_year, p_karnataka(range(len(df_karnataka_growth))), linestyle='--', color=plt.cm.Set2(2), alpha=0.7) # Add labels, title, and legend plt.xlabel("Month-Year", fontsize=12) plt.ylabel("GST Growth Rate (%)", fontsize=12) plt.title("GST Growth Rates with Trendlines", fontsize=14) plt.legend(fontsize=10) plt.grid(True) plt.xticks(rotation=45) plt.tight_layout() plt.show()

Institutions

United International Business Schools

Categories

India, Business Tax, Commercial Services

Licence