Skip to content

Hellinferno/rbi_correlation_analysis

Repository files navigation

RBI Data Correlation Analysis

This project analyzes the correlation between the Consumer Price Index (CPI) and Sectoral Deployment of Bank Credit using data from the Reserve Bank of India (RBI).

It is built as a Streamlit web application that allows for dynamic data fetching (from RBI DBIE) or manual Excel file uploads.

Features

Dual Data Source:

  • Auto-Download: Attempts to fetch the latest data directly from RBI's static URLs.
  • Manual Upload: Fallback support for uploading local cpi.xlsx and credit.xlsx files if RBI URLs are down or changed.

Smart Parsing: Automatically detects header rows in RBI Excel files (which often contain metadata in the first few rows).

Analysis:

  • Merges datasets on overlapping dates.
  • Calculates the Pearson Correlation Coefficient.

Visualizations:

  • Dual-axis time series chart (CPI vs. Credit).
  • Scatter plot with regression line.

Installation (Local)

To run this app on your local machine:

  1. Clone the repository:

    git clone https://github.com/Hellinferno/rbi_correlation_analysis.git
    cd rbi_correlation_analysis
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the app:

    streamlit run streamlit_app.py

The app will open in your default browser at http://localhost:8501.

Deployment (Streamlit Cloud)

This app is ready for 1-click deployment on Streamlit Cloud:

  1. Push this code to your GitHub repository.
  2. Go to share.streamlit.io.
  3. Click "New App".
  4. Select this repository and the main file streamlit_app.py.
  5. Click Deploy.

File Structure

  • streamlit_app.py: The main application code.
  • requirements.txt: List of Python libraries required.
  • rbi_correlation_analysis.py: (Optional) The standalone script version for local execution without a UI.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages