Overview

From raw CSV to clear visuals in minutes. This project cleans the Stats NZ data, builds focused subsets, and outputs PNG charts for your portfolio.

  Data

business_financial_data.csv
Quarterly NZ business financials — sales (operating income), operating profit, assets, inventories and more, broken down by industry.

  Stack

Python 3 • pandas • matplotlib • seaborn • matplotlib.ticker

  Outputs

High‑res PNGs exported by the script:
financial_correlation_heatmap.png, growth_profit_matrix.png, industry_profitability_scorecard.png, industry_sales_volatility.png, key_sector_sales_trends.png, manufacturing_profit_margin.png, post_covid_recovery.png, profit_contribution_over_time.png, sector_seasonality.png, top_industries_by_profit.png, top_industries_by_sales.png, yoy_sales_growth.png


How to run locally

  1. Open the folder in VS Code.
  2. Ensure the CSV is named business_financial_data.csv and sits next to the Python file.
  3. Create a virtual env (optional) and install deps:
    python -m venv .venv
    . .venv/bin/activate    # (Mac/Linux)
    # .venv\Scripts\activate  # (Windows)
    pip install pandas matplotlib seaborn
  4. Run the script:
    python "try 1 gemini.py"    # uses the provided filename
    # or rename to main.py and run
    # python main.py
  5. PNG charts will be saved in the project folder. Move them into images/projects/python/ to show on this page.

Tip: commit both the code and images/projects/python/ folder to GitHub Pages so the visuals appear on your live site.


Gallery (auto‑generated charts)


Key highlights

  • Clean, typed time series (e.g., period to datetime) and numeric casting with safe coercion.
  • Focused subsets: Sales vs Profit vs Assets vs Inventories; key sectors like Manufacturing & Retail.
  • Consistent chart styling, proper currency tick formatting and readable legends.
  • Scorecards for profit margin & contribution; recovery comparison (pre/post‑COVID); efficiency (asset turnover).
  • Portable: produces static PNGs ready for portfolio pages like this.
  • VS Code + GitHub friendly: simple run, commit, and publish on GitHub Pages.

Code

Below is a trimmed header so recruiters can preview the project. The full code lives in the repository.

# analyze_business_financials() — loads the CSV, cleans columns & types,
# creates sales/profit/assets/inventories subsets, and exports 10+ charts.
# Stack: pandas, matplotlib, seaborn, matplotlib.ticker

if __name__ == "__main__":
    analyze_business_financials()

Location

Hamilton, New Zealand