Skip to content

toaaot/python-pivotchart-lib-comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Pivot Chart Library Comparison

------ Overview ------

This project explores various Python libraries that can be used to create pivot tables and pivot charts, comparing their:

  • (?) Ease of Use: How intuitive is the API?
  • (?) Functionality: What features do they offer?
  • (?) Performance: How fast are they with different dataset sizes?
  • (?) Output Quality: What kind of visualizations can they produce?

How it works

Libraries to Compare

  • pandas - Data manipulation with pivot tables
  • plotly - Interactive visualizations
  • pivottable.js - Interactive client-side pivot tables (JavaScript)
  • ...

Learning Objectives

  • Understand how pivot tables work
  • Learn different approaches to data aggregation
  • Compare visualization libraries
  • Analyze performance trade-offs
  • Create reproducible data analysis examples

------ Getting Started ------

Prerequisites

  • Python 3.8 or higher
  • pip package manager

Setup

Step 1: Clone & Setup Locally

$ git clone https://github.com/toaaot/python-pivotchart-lib-comparison.git
$ cd python-pivotchart-lib-comparison

Step 2: Create & Activate Virtual Environment

$ python -m venv venv
$ source venv/bin/activate  # On Windows: venv\Scripts\activate

Step 3: Install Dependencies

$ pip install -r requirements.txt

Step 4: (optional) Run Unit Tests locally

$ pytest tests/ -v

Step 5: Create HTML file locally for the individual examples.
Each library has its own example file in the examples/ directory.

$ python examples/bokeh_example.py
$ python examples/pivottablejs_example.py
$ python examples/hvplot_example.py
$ python examples/plotly_example.py

------ Build and Deployment with GitHub Actions ------

NOTE:
The default "pages build and deployment" workflow will not run the python scripts in our project.

"jekyll-build-pages" GitHub Action

  • run "jekyll build" which converts Markdown and Liquid template files into static HTML, CSS, and JavaScript files
  • package them into an artifact compatible with GitHub's deployment system
  • supports Jekyll themes

NOTE:
If you have a ".nojekyll" file in the root of your repository, this default action will be skipped

------ Project Structure ------

python-pivotchart-lib-comparison/
├── data/
│   └── game_sessions.csv
├── src/
│   ├── __init__.py
│   ├── main.py
│   ├── data_loader.py
│   ├── bokeh_example.py
│   ├── pivottablejs_example.py
│   ├── hvplot_example.py
│   └── plotly_example.py
├── docs/                          # GitHub Pages content
│   ├── index.html                 # Landing page with links
│   ├── bokeh.html                 # Generated by bokeh example
│   ├── pivottablejs.html          # Generated by pivottablejs example
│   ├── hvplot.html                # Generated by hvplot example
│   ├── plotly.html                # Generated by plotly example
│   └── plotly.min.js              # Generated by plotly example
├── tests/
│   ├── __init__.py
│   ├── pytest.ini
│   ├── test_data_loader.py
│   └── test_examples.py
├── LICENSE
├── README.md
├── TODO.md
├── requirements.txt
└── .gitignore

------ Resources ------

Pivot Tables/Charts

GitHub

About

Compare different python libraries for pivot charts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages