Skip to content

SatvikPraveen/PlotlyVizPro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

๐Ÿ“Š PlotlyVizPro โ€“ Mastering Interactive Visualizations with Plotly

License: GPL v3 Python Jupyter Plotly Docker Ready Tests Code Quality


๐Ÿ“ฆ Overview

PlotlyVizPro is a modular, multi-notebook visualization project crafted to help you master interactive plotting using Plotly, Streamlit, and Python utilities. From chart fundamentals to advanced dashboards, this project equips you with:

โœ… A reusable, utility-first visualization toolkit
โœ… A thematic, notebook-driven learning framework
โœ… A polished, production-grade portfolio project


๐Ÿš€ Highlights

  • ๐Ÿ“ˆ Express + Graph Objects: Built using both Plotly APIs
  • ๐Ÿ“Š Charts: Line, bar, pie, box, histogram, heatmap, KDE
  • ๐Ÿงญ Maps: Choropleth, Mapbox, GeoJSON overlays
  • ๐Ÿงฎ Statistical Add-ons: Trendlines, Z-bands, moving averages
  • ๐Ÿ”„ Animations: Sliders, dropdown filters, animation_frame
  • ๐Ÿงผ Clean Output: HTML for interactivity, PNG for documentation
  • ๐Ÿงฐ Modular Design: Plotting utilities, reusable layout functions
  • ๐Ÿณ Docker Support: Containerized Jupyter environment for reproducibility
  • โœ… Full Test Suite: Comprehensive testing with pytest
  • ๐Ÿ”„ CI/CD Pipeline: Automated testing and quality checks
  • ๐Ÿ“š Complete Documentation: API reference, tutorials, deployment guides

โš–๏ธ Why Plotly?

Feature Matplotlib Seaborn Plotly
Interactivity โŒ Static โŒ Static โœ… Fully interactive
Dashboards/Animations โŒ Minimal โŒ Minimal โœ… Native support
Hover/Zoom Features โŒ โŒ โœ… Built-in
Publication Quality โœ… โœ… โœ…

PlotlyVizPro builds on this by organizing all core concepts in modular, theme-consistent notebooks.


๐ŸŽฏ Project Philosophy

PlotlyVizPro was built to:

  • ๐Ÿงฉ Encourage modular design using utilities and thematic structuring
  • ๐Ÿ“ฆ Package core visualization skills into reusable functions
  • ๐Ÿ’ก Help learners think like developers by designing reusable pipelines
  • ๐Ÿงฑ Promote reproducibility with Docker + synthetic datasets
  • ๐Ÿš€ Act as a launchpad for portfolio enhancement and tech interviews

๐Ÿง  Core Concepts Covered

Area Concepts
Basic Charts Line, scatter, bar, pie, histogram, box plots
Chart Styling Theming, axis config, layout tuning, custom tooltips
Interactivity Hover templates, sliders, dropdowns, callbacks
Statistical Layers Trendlines, rolling averages, ยฑz-score confidence bands
Dashboard Design Subplots, grids, shared axes, spacings, annotations
Geo Visuals Choropleths, GeoJSON overlays, Mapbox tokens
Plot Architecture .pipe() overlays, centralized plot_utils.py, layout automation
Exports Dynamic HTML and static PNG renderings for reporting

๐Ÿ“‰ Sample: Line & Scatter

Line Plot

Scatter Plot


๐Ÿ—บ๏ธ Sample: Statistical Overlays

Trend Plot


## ๐Ÿ—‚๏ธ Project Structure
โ”œโ”€โ”€ .github/                  # GitHub workflows and templates
โ”‚   โ”œโ”€โ”€ workflows/           # CI/CD pipelines
โ”‚   โ”‚   โ”œโ”€โ”€ test.yml         # Automated testing
โ”‚   โ”‚   โ”œโ”€โ”€ lint.yml         # Code quality checks
โ”‚   โ”‚   โ””โ”€โ”€ docker.yml       # Docker build tests
โ”‚   โ””โ”€โ”€ ISSUE_TEMPLATE/      # Issue and PR templates
โ”œโ”€โ”€ docs/                     # Extended documentation
โ”‚   โ”œโ”€โ”€ API.md               # Complete API reference
โ”‚   โ”œโ”€โ”€ TUTORIALS.md         # Step-by-step tutorials
โ”‚   โ”œโ”€โ”€ DEPLOYMENT.md        # Deployment guides
โ”‚   โ””โ”€โ”€ TROUBLESHOOTING.md   # Common issues & solutions
โ”œโ”€โ”€ tests/                    # Test suite
โ”‚   โ”œโ”€โ”€ test_plot_utils.py   # Utility function tests
โ”‚   โ”œโ”€โ”€ test_data_generation.py
โ”‚   โ”œโ”€โ”€ test_notebooks.py
โ”‚   โ””โ”€โ”€ test_streamlit_app.py
โ”œโ”€โ”€ exports/                  # HTML and PNG exports by notebook
โ”œโ”€โ”€ notebooks/                # 10 structured Jupyter notebooks
โ”œโ”€โ”€ pages/                    # Streamlit pages for app mode
โ”œโ”€โ”€ utils/                    # Reusable plotting utilities
โ”œโ”€โ”€ datasets/                # Synthetic datasets
โ”œโ”€โ”€ .editorconfig            # Editor configuration
โ”œโ”€โ”€ .env.example             # Environment variables template
โ”œโ”€โ”€ .gitignore               # Git ignore patterns
โ”œโ”€โ”€ .pre-commit-config.yaml  # Pre-commit hooks
โ”œโ”€โ”€ config.py                # Configuration management
โ”œโ”€โ”€ Dockerfile               # Docker environment for reproducibility
โ”œโ”€โ”€ Makefile                 # Common development commands
โ”œโ”€โ”€ pyproject.toml           # Modern Python project config
โ”œโ”€โ”€ pytest.ini               # Test configuration
โ”œโ”€โ”€ app.py                   # Main Streamlit app entry point
โ”œโ”€โ”€ generate_datasets.py     # Generates synthetic datasets using Faker
โ”œโ”€โ”€ requirements.txt         # Minimal dependencies to run the project
โ”œโ”€โ”€ requirements_dev.txt     # Full dev environment
โ”œโ”€โ”€ requirements.txt         # Minimal dependencies to run the project
โ””โ”€โ”€ README.md                # You're here!
# Clone the repo
git clone https://github.com/SatvikPraveen/PlotlyVizPro.git
cd PlotlyVizPro

# Install dependencies (creates venv automatically)
make install

# Or for development (includes testing tools)
make install-dev

# Run tests
make test

# Launch JupyterLab
make run-jupyter

# Launch Streamlit app
make run-app

# See all available commands
make help

โ–ถ๏ธ Manual Setup

# Clone the repo
git clone https://github.com/SatvikPraveen/PlotlyVizPro.git
cd PlotlyVizPro

# Create a virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# For development (includes testing tools)
pip install -r requirements_devatmaps      | Distribution plots, hexbin overlays          |
| 04  | Choropleth & GeoJSON Maps      | Choropleth, projections, custom shape tuning |
| 05  | Animation & Interactivity      | Sliders, dropdowns, animation_frame          |
| 06  | Dashboards & Subplots          | Grid layouts, spacing, multi-panel views     |
| 07  | Graph Objects Deep Dive        | Manual axis, layout, annotation control      |
| 08  | Mapbox & Geo Layers            | Mapbox tokens, styles, satellite maps        |
| 09  | Real-World Visualizations      | COVID & Superstore use cases                 |
| 10  | Statistical Overlays + .pipe() | Modular overlays, Z-bands, moving average    |

---

## โš™๏ธ Setup Instructions

### โ–ถ๏ธ Local Setup

```bash
# Clone the repo
git clone https://github.com/SatvikPraveen/PlotlyVizPro.git
cd PlotlyVizPro

# Create a virtual environment
python3 -m venv plotly_env
source plotly_env/bin/activate  # On Windows: plotly_env\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Launch JupyterLab
jupyter lab

๐Ÿณ Docker Setup (Optional)

# Build image
docker build -t plotlyvizpro .

# Run container (auto-launches JupyterLab at port 8888)
docker run -p 8888:8888 plotlyvizpro

๐Ÿ›ก๏ธ No token/password required. Uses --allow-root for compatibility.


๐ŸŒ Streamlit Dashboard Features

Launch the app with streamlit run app.py and explore:

  • ๐Ÿ”„ Real-time filtering and visualization controls
  • ๐Ÿ“Š Embedded charts from exported HTMLs
  • ๐Ÿงฎ Summary statistics + quick insights
  • ๐ŸŽจ Toggle between chart types with ease

๐Ÿงช Datasets

All datasets are synthetically generated via generate_datasets.py using the faker library.

  • ๐Ÿ” Fully reproducible
  • ๐Ÿ”“ License-free
  • ๐Ÿ”ฌ Customizable complexity (sales, dates, geography, etc.)

๐Ÿงฐ Utility Functions (utils/plot_utils.py)

Type Utilities
Core Charts line_plot(), bar_plot(), scatter_plot(), box_plot()
Interactivity Sliders, hover templates, dropdowns
Stats Add-ons add_trendline(), add_moving_average(), add_zscore_band()
Layout Tools make_subplots_custom(), add_annotations(), apply_theme()
Export Tools save_fig_as_html(), save_fig_as_png()

๐Ÿ“š Full API Reference: See docs/API.md for complete function documentation.


๐Ÿงช Testing & Quality Assurance

PlotlyVizPro includes a comprehensive test suite and CI/CD pipeline:

# Run all tests
make test

# Run with coverage report
make test-cov

# Run code quality checks
make lint

# Auto-format code
make format

Test Coverage

  • โœ… Unit tests for plotting utilities
  • โœ… Data generation validation
  • โœ… Notebook structure verification
  • โœ… Streamlit app testing
  • โœ… CI/CD with GitHub Actions

Code Quality

  • Black for code formatting
  • Flake8 for linting
  • isort for import sorting
  • MyPy for type checking
  • Pre-commit hooks for automated checks

๐Ÿ“š Documentation

Comprehensive documentation is available in the docs/ directory:


๐Ÿ“ค Plot Exports

Each notebook saves plots in:

exports/
โ”œโ”€โ”€ html/             # Interactive outputs
โ”‚   โ”œโ”€โ”€ 01_line_scatter/
โ”‚   โ”œโ”€โ”€ ...
โ”œโ”€โ”€ images/           # PNG renders
โ”‚   โ”œโ”€โ”€ 01_line_scatter/
โ”‚   โ”œโ”€โ”€ ...

๐Ÿ’ผ Use Case Scenarios

  • ๐Ÿ“Š Portfolio Project: Showcase your visualization skills to recruiters with modular, professional-quality notebooks and dashboards.
  • ๐Ÿง‘โ€๐Ÿซ Learning Companion: Study Plotlyโ€™s API differences (plotly.express vs graph_objects) across notebooks.
  • ๐Ÿงช Interactive Reporting: Generate rich HTML reports or launch dashboards with Streamlit using synthetic, reproducible datasets.
  • ๐Ÿงฐ Toolkit for Projects: Plug in your own data and reuse plot_utils.py utilities for fast prototyping and visualization pipelines.

๐Ÿ“Œ Cheatsheet

A compact markdown cheatsheet available at:

docs/plotly_cheatsheet.md

Includes:

  • Plotly syntax patterns
  • Utility usage demos
  • Dashboard tips
  • Export best practices

๐Ÿ“œ License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.


๐Ÿค Contributions Welcome

  • ๐Ÿ›  Got a bug fix or improvement? Open a PR
  • ๐Ÿง  Found a bug or want to request a feature? File an issue
  • โญ If this helped you, consider starring the repository!

๐Ÿ’ฌ Join the Conversation

Got an idea, stuck on something, or want to share your use-case?

๐Ÿ‘‰ Visit the Discussions tab and say hello!


๐Ÿงญ Related Projects

Explore the full suite of Python data mastery repositories:

  • ๐Ÿ“Š PandasPlayground
    Modular pipelines for mastering data wrangling, merging, and analysis using pandas.

  • ๐Ÿ”ข NumPyMasterPro
    A concept-to-implementation NumPy project covering arrays, broadcasting, and indexing.

  • ๐Ÿ“ˆ MatplotlibMasterPro
    Comprehensive Matplotlib practice with style guides, animations, and thematic plots.

  • ๐Ÿ–ผ๏ธ SeabornMasterPro
    Complete mastery of Seaborn's statistical plots, themes, dashboards, and time series.

Each project is standalone but follows a consistent pedagogical and modular structure, forming a progressive learning track in data visualization and numerical computing with Python.


About

๐Ÿ“ˆ A modular, multi-notebook visualization suite built with Plotly and Streamlit, showcasing advanced charting techniques, subplot dashboards, z-score bands, regression overlays, and app-based exploration. Ideal for mastering interactive data storytelling and production-ready Python workflows.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors