Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Universal Analytics Dashboard

Streamlit app for uploading CSV or Excel files, inferring a dashboard mapping, filtering and lightly cleaning the data, visualizing two charts, and generating cached AI chart insights.

Final Files

  • app.py: final deployable dashboard
  • requirements.txt: Python dependencies
  • README.md: setup, deployment notes, and learning journal
  • project_instructions.md: assignment prompt

Features

  • Upload csv, xlsx, xls, or xlsm
  • AI-first dataset mapping with rule-based fallback
  • Editable mapping for datetime, grouping, category, and metrics
  • Sidebar filters based on the chosen chart fields
  • Lightweight data prep:
    • drop null rows by selected columns
    • drop zero rows by selected numeric columns
    • impute missing values using mode, mean, median, zero-fill, or forward-fill
  • KPI summary row
  • Time-series chart with configurable:
    • time grain
    • chart style
    • aggregation method
  • Bar chart with configurable top-category limit
  • Quick insights panel
  • AI chart analysis with caching and reusable history

Local Setup

  1. Create and activate a virtual environment.
  2. Install dependencies:
pip install -r requirements.txt
  1. Add your API key locally in .env:
OPENAI_API_KEY=your_key_here
  1. Run the app:
streamlit run app.py

Deployment

Deploy app.py as the entrypoint.

Do not commit .env or .streamlit/secrets.toml.

For deployment, set OPENAI_API_KEY in the host platform's secret manager.

Examples:

  • Streamlit Community Cloud: add OPENAI_API_KEY in app Secrets
  • Render / Railway / Hugging Face Spaces: add OPENAI_API_KEY as an environment variable

The app checks for OPENAI_API_KEY in this order:

  1. Streamlit secrets
  2. Environment variables loaded from .env

If your current key has ever been committed, shared, or exposed publicly, rotate it before deploying.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages